import AbortController from "abort-controller"const controller = new AbortController()const signal = controller.signalsignal.addEventListener("abort", () => { console.log("aborted!")})controller.abort()
import AbortController from "abort-controller"// orconst AbortController = require("abort-controller")// or UMD version defines a global variable:const AbortController = window.AbortControllerShim
If your bundler recognizes browser field of package.json, the imported AbortController is the native one and it doesn't contain shim (even if the native implementation was nothing).
If you wanted to polyfill AbortController for IE, use abort-controller/polyfill.
Polyfilling
Importing abort-controller/polyfill assigns the AbortController shim to the AbortController global variable if the native implementation was nothing.