fix(hmr): hmr style tag no support in html#7052
Merged
patak-cat merged 6 commits intovitejs:mainfrom Feb 24, 2022
Merged
Conversation
patak-cat
approved these changes
Feb 24, 2022
7 tasks
IanVS
reviewed
Feb 28, 2022
| s.overwrite( | ||
| node.loc.start.offset, | ||
| node.loc.end.offset, | ||
| `<script type="module" src="${modulePath}"></script>` |
Contributor
There was a problem hiding this comment.
I think if the type is css, this shouldn't be a script type="module", I think that's causing #7124.
Member
Author
There was a problem hiding this comment.
but no module css, it generate code can't run
Member
Author
There was a problem hiding this comment.
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"
patak-cat
added a commit
that referenced
this pull request
Mar 1, 2022
patak-cat
added a commit
that referenced
this pull request
Mar 1, 2022
sinoon
pushed a commit
to sinoon/vite
that referenced
this pull request
Mar 2, 2022
poyoho
added a commit
to poyoho/vite
that referenced
this pull request
Mar 11, 2022
…tejs#7136)" This reverts commit 5c116ec.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
fix: #7042
Additional context
This PR make style tag to script proxy make it had hmr. Because
@importwill add module deps inindex.htmlso 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).