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): hmr style tag no support in html #7052
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
s.overwrite( | ||
node.loc.start.offset, | ||
node.loc.end.offset, | ||
`<script type="module" src="${modulePath}"></script>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if the type is css, this shouldn't be a script type="module"
, I think that's causing #7124.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but no module css, it generate code can't run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import {createHotContext as __vite__createHotContext} from "/@vite/client";
import.meta.hot = __vite__createHotContext("/dep.css");
import {updateStyle as __vite__updateStyle, removeStyle as __vite__removeStyle} from "/@vite/client"
…tejs#7136)" This reverts commit 5c116ec.
Description
fix: #7042
Additional context
This PR make style tag to script proxy make it had hmr. Because
@import
will add module deps inindex.html
so make it proxy to css plugins to process the serve module graph deps.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).