-
Notifications
You must be signed in to change notification settings - Fork 78
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
Manifest V3 Service worker registration failed #125
Comments
I am experiencing same issue. It's because it injects the "webpack-extension-reloader" code in compiled background.js. |
According to documentation |
@daividh That sounds about right. |
Ah bummer, so this package won't work with manifest V3? |
@zdenham I have fixed this issue and opened a pull request, but I think the maintainer will not merge it because the project support stoped. You can clone code from this brunch build it locally and use bundle file |
@khlevon Great! I found another bug which I had to fix in my webpack config. I'd create a PR soon on your repo. |
@khlevon does this version reload the page, or just skip it if it isn't possible? Either way well done. I saw someone else made something called mv3-hot-reload. I haven't yet tried it myself. I came across that tool in this issue on crx-hotreload, another tool I didn't know existed when I started using webpack-extension-reloader. |
Yes, it reloads the page. |
Hello Thank you so much for this.. I am really struggling to build it locally and include it in my project. I am getting errors regarding webpack-extension-reloader being missing so I am sure I am doing something fundamental wrong. Is there any way you would be able to publish some step-by-step commands? Thanks! |
@sambessey after building webpack-extension-reloader project you should change package.json of your main project and specify the path of local build for webpack-extension-reloader package "devDependencies": {
"webpack-extension-reloader": "file:/Users/xxx/Projects/webpack-extension-reloader"
} or if you want to save a custom build of "devDependencies": {
"webpack-extension-reloader": "file:./lib/webpack-extension-reloader"
}
|
Thank you- is it as simple as using Thanks again!! |
after building |
Thanks makes sense! |
Ok I believe it is all working now! Your post made perfect sense. Problem was A) too many hours at the screen, and B) I used to run using
which is what I had before I found your post. It's still using the old plugin weirdly, even after re-running Using your steps and Thanks again, very much appreciated! |
Thanks for sharing this fix which appears to work for me but now I get a new error in the form of:
Any ideas how to overcome that without compromising the security of the extension in production? |
solved after |
For future reference, webpack-ext-reloader is now MV2 and MV3 compatible and updated to webpack 5. For the most part, it's a drop-in replacement |
Type:
Environment:
I'm going to open a PR:
Description:
Getting error: "Service worker registration failed" ,
"background": { "service_worker": "background.js" },
is highlighted in the error. When I build for production, the error goes away. I think it has to do with all of the code that this library adds to the background.js file when it is output.This is from my config file:
The text was updated successfully, but these errors were encountered: