Skip to content

Commit

Permalink
fix(hmr): avoid css propagation infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jun 19, 2021
1 parent 41b193c commit 7362e6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/server/hmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ function propagateUpdate(
// additionally check for CSS importers, since a PostCSS plugin like
// Tailwind JIT may register any file as a dependency to a CSS file.
for (const importer of node.importers) {
if (isCSSRequest(importer.url)) {
if (isCSSRequest(importer.url) && !currentChain.includes(importer)) {
propagateUpdate(
importer,
timestamp,
Expand Down

0 comments on commit 7362e6e

Please sign in to comment.