Since WebExtension's Manifest v3, HMR in content script is broken and disabled in this repo. (see manifest.ts).
Suggested solution
Although I don't have a solution to prevent having to manually reload the extension when updating the contentScript, there is a solution to inject an app in the current tab with functional HMR: the solution is to inject an iframe with a source pointing to another Vue app in the repo, similar to the options or popup app.
Clear and concise description of the problem
Since WebExtension's Manifest v3, HMR in content script is broken and disabled in this repo. (see
manifest.ts
).Suggested solution
Although I don't have a solution to prevent having to manually reload the extension when updating the contentScript, there is a solution to inject an app in the current tab with functional HMR: the solution is to inject an iframe with a source pointing to another Vue app in the repo, similar to the
options
orpopup
app.I have a working POC over on my fork: https://github.com/louisremi/vite-react-webext-with-sidebar (where I also switched from Vue to React for my personnal needs).
Let me know if you think this could be an interesting fix/addition to this repo
Alternative
No response
Additional context
No response
Validations