Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop explicit webextension-polyfill import #70

Merged
merged 1 commit into from
Mar 29, 2022
Merged

Conversation

fregante
Copy link
Collaborator

@fregante fregante commented Mar 29, 2022

Required for pixiebrix/pixiebrix-extension#3043

This means that the webextension-polyfill must be pre-loaded before this

The browser tests still pass in Chrome 🎉

@fregante fregante marked this pull request as ready for review March 29, 2022 03:50
@fregante fregante changed the title Drop explicit webextension-polyfill import Drop explicit webextension-polyfill import Mar 29, 2022
@fregante fregante merged commit b210e74 into main Mar 29, 2022
@fregante fregante deleted the update-polyfill branch March 29, 2022 03:50
@@ -0,0 +1,3 @@
import browser from "webextension-polyfill";

globalThis.browser = browser;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required because the polyfill does not automatically set the browser global when bundled.

mozilla/webextension-polyfill#350

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant