-
Notifications
You must be signed in to change notification settings - Fork 834
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
Firefox build for Backpack #1496
Comments
Would love some help with this @beeman! |
I've tried to get it running in Firefox and it looks there are a few issues. 1: Firefox doesn't support Manifest v3 yet, but there is a developer preview and it will be a matter of time for that to land. 2: The next blocker is the lack of background service workers in Firefox. To install the extension anyway, you can change this in the "background": {
- "service_worker": "background.js",
- "type": "module"
+ "scripts": ["background.js"]
},
The fix for this seems simple enough, conditionally loading that LedgerIframe when the service worker is enabled. const LedgerIframe = () => {
if (typeof serviceWorker in navigator) {
return <LoadLedgerIframe />;
}
return null;
}; With that in place, the extension loads and seems to work as expected! 🥳 In terms of next steps, I'm happy to submit a PR that conditionally loads the LedgerIframe if the service worker is found. With regards to the other change, it should be simple enough to patch the |
Build script sounds great! Unfortunately, that conditional iframe load will break ledgers, and so we need to also add back in the ledger injection somehow. One solution is to mirror that conditional step, but in the background script, and inject there (which is what we used to do when we were using manifest v2). The PR that migrated from v2 -> v3 can be found here. Feel free to use this for inspiration (or if you have a better solution, even better!). |
Resurfacing this issue and taking a quick look at it while some other stuff is building This are the errors that would need addressing after running TODO
After that all references to I'll update this thread as any progress is made |
I would love to see a Firefox build for Backpack. Happy to contribute to make this happen
The text was updated successfully, but these errors were encountered: