Skip to content
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

Fix HMR in contentScript App by using an iframe #139

Open
3 tasks done
louisremi opened this issue May 23, 2023 · 1 comment
Open
3 tasks done

Fix HMR in contentScript App by using an iframe #139

louisremi opened this issue May 23, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@louisremi
Copy link

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 or popup 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

@brauliobo
Copy link

HMR on content script is broken here too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants