-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
createContentScriptIFrame API #205
Comments
@molvqingtai Great feature idea, thanks for the suggestion. Would an API similar to |
I know createContentScriptUi, shadow can only be reload, and iframe can HMR. |
Yes, it will use an iframe and include HMR. I'm gonna make the API similar to |
Released in I'll add more in-depth examples in the future, but for now, you can see it's usage here: https://wxt.dev/entrypoints/content-scripts.html#iframe |
Awesome work! |
@aklinker1, I got |
@onlyfortesting Yes, it's exported https://wxt.dev/api/wxt/client/functions/createContentScriptIframe.html It's exported from the pnpm install wxt@0.8.7 # or 0.9.0
pnpm wxt clean
pnpm wxt prepare
pnpm wxt dev |
@aklinker1 For some reason, I thought I was running the latest version. It turns out it was 0.8.6. Sorry for the nuisance. |
No worries! Glad you got it sorted 👍 |
Feature Request
Currently, all WebExtension frameworks do not implement contentScript HMR. Perhaps this is the only solution that can achieve true HMR:
Inject an
iframe
into the page and loadcontent.html
.You can refer to the following links for more information:
Consider adding a
createContentScriptIFrame
API to implement contentScript HMR.Is your feature request related to a bug?
N
What are the alternatives?
N
Additional context
N
The text was updated successfully, but these errors were encountered: