fix(hmr): entry mod's importers contains css mod invalidate hmr #3929
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 #3913 #3716
HMR is not working as change entry javascript file or index.html
Additional context
entry file
main.js
:index.css
:@tailwind base;
hmr is not working as change the
main.js
, the client receive the error update message -hmr update index.css
PostCSS plugin Tailwind JIT register any file as a dependency to a CSS file. Although
main.js
is an entry file,main.js
module's importers includesindex.css
module. Through thepropagateUpdate
function, get the wrong result thatindex.css
needs to be updated.vite/packages/vite/src/node/server/hmr.ts
Line 212 in f623ba3
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).