Wrapper around Mozilla’s webextension-polyfill to make it available as a global variable even with a bundler
Mozilla’s webextension-polyfill
makes it difficult to be imported as an actual polyfill, so you can import this package as a minimal wrapper to make it available as a global.
npm install webextension-polyfill-global
or if you're a TypeScript user:
npm install webextension-polyfill-global
npm install @types/webextension-polyfill -D
Just this. Types will also be available globally.
import 'webextension-polyfill-global';
-
mozilla/webextension-polyfill
: A "polyfill" that doesn't act as a polyfill. -
webext-dynamic-content-scripts
: Automatically inject yourcontent_scripts
on custom domains. -
webext-content-script-ping
: One-file interface to detect whether your content scripts have loaded. -
webext-options-sync
: Helps you manage and autosave your extension's options. -
Awesome WebExtensions
: A curated list of awesome resources for Web Extensions development.
MPL-2.0 © Federico Brigante