-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support manifest v3 #161
Comments
closed in Just to explain what we did to support v3. We migrated off We now have full control of the extension webpack compilation. I actually removed the paths to I had to bump Lastly with the polyfill. The actual error was coming from Looking forward to start working with a v3 extension. |
@jcblw thank you for sharing how you overcome the current limitation of |
A majority of the changes are pretty small. I think the only large one would be the change to how hot reloading works in terms of injecting the script into the bundle instead of appending to the background script. Ill make a few PRs this weekend to start the process. 😁 |
Description
I would like to get this project set up for success with v3 extensions. I have run into quite a few issues trying to convert it to a v3 extension.
Devtools exclusive issues
webextension-toolbox
webextension-toolbox currently does not support v3 of Chrome extensions. This is due to manifest validation failing due to background.service_worker key. Also, the Webpack plugin tries to append another background script that allows for reloading.
Validation is a pretty easy fix. The other fix would mean this plugin would need to change how they inject their scripts into the background page. Could be possible to polyfill it.
Solution
Quite a few issues to patch with this one... potentially we need to start looking at new candidates for building the dev tools extension. Maybe, web-ext or a homegrown solution.
issue already submitted
Chrome issues
Right now Chrome requires the background script to be on the same level as the manifest. Chrome 93 fixes the issue. I also wrapped the background script as recommended here, and everything started up fine.
Solution
We might want to wait out till Chrome 93 comes out which looks like it will come out August 31st.
Window in polyfill.
The devtools uses a pretty common polyfill webextension-polyfill. This polyfill when put through Webpack seems to be adding some additional calls to
window
which will not work in service workers. Here is the line and I locally modified it to usethis
instead of window.Everything works after that, glad to see the core of
finch-graphql
still works in v3.The text was updated successfully, but these errors were encountered: