serversideup / webext-bridge

💬 Messaging in Web Extensions made easy. Batteries included.
https://serversideup.net/open-source/webext-bridge
MIT License
505 stars 46 forks source link

Error: This script should only be loaded in a browser extension. when importing bridge in the window context #7

Open celsobonutti opened 2 years ago

celsobonutti commented 2 years ago

Error: This script should only be loaded in a browser extension.

Version used: 5.0.0

Errors is thrown from webextension-polyfill when trying to import bridge in a window context.

Using Chromium 93.0.4577.63 and Mozilla Firefox version 92.0, both on ArchLinux

pakholeung37 commented 2 years ago

Same. Something similar to zikaari/crx-bridge#7, don't know did he fix it.

zikaari commented 2 years ago

Fixed in https://github.com/antfu/webext-bridge/pull/24

Please help us expedite the merge and release by reviewing the PR and testing the code locally on your system to make sure it's all good.