You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After #376 is merged, I'll send another PR to simplify/condense the various import methods because currently each section is too long to follow.
#351 wasn't documented either and that's probably the easiest usage for most webpack users since it works across contexts.
The usage would be prefaced with a section like:
without a bundler:
static: add browser-polyfill.js to manifest.json
dynamic: inject file via executeScript before other files
bundler usage:
simple: use const browser = require('webextension-polyfill')
invisible webpack usage: use ProvidePlugin
polyfill the global: use require('webextension-polyfill/register')
And the ESM usage section should be dropped because there's nothing ESM-related about it, type=module effectively doesn't change anything here. It's also rather confusing because the example is an HTML page but it does not mention how to load such HTML page (which is also deprecated)
The text was updated successfully, but these errors were encountered:
After #376 is merged, I'll send another PR to simplify/condense the various import methods because currently each section is too long to follow.
#351 wasn't documented either and that's probably the easiest usage for most webpack users since it works across contexts.
The usage would be prefaced with a section like:
browser-polyfill.js
to manifest.jsonexecuteScript
before other filesconst browser = require('webextension-polyfill')
ProvidePlugin
require('webextension-polyfill/register')
And the ESM usage section should be dropped because there's nothing ESM-related about it,
type=module
effectively doesn't change anything here. It's also rather confusing because the example is an HTML page but it does not mention how to load such HTML page (which is also deprecated)The text was updated successfully, but these errors were encountered: