DEV Community

Discussion on: How to Abort a Fetch Request in JavaScript using AbortController

digitalbrainjs profile image
Dmitriy Mozgovoy • Edited on

Probably no, unless you mean that bundling the frontend of your app with webpack requires node.js. But the building process is in no way associated with Web servers. If you need to use it in old-school way directly without building, just import the UMD browser module as a script:

<script src=""></script> 
const promise1 = cpFetch("")
  .then((res) => res.json())
  .then(console.log, console.warn);

setTimeout(() => promise1.cancel(), 10);
Enter fullscreen mode Exit fullscreen mode