We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf93616 commit f2d1d29Copy full SHA for f2d1d29
packages/plugin-vue/src/handleHotUpdate.ts
@@ -1,6 +1,8 @@
1
import _debug from 'debug'
2
import type { SFCBlock, SFCDescriptor } from 'vue/compiler-sfc'
3
import type { HmrContext, ModuleNode } from 'vite'
4
+import { isCSSRequest } from 'vite'
5
+
6
import {
7
createDescriptor,
8
getDescriptor,
@@ -153,7 +155,7 @@ export async function handleHotUpdate(
153
155
affectedModules.add(mainModule)
154
156
} else if (mainModule && !affectedModules.has(mainModule)) {
157
const styleImporters = [...mainModule.importers].filter((m) =>
- /\.css(?:$|\?)/.test(m.url)
158
+ isCSSRequest(m.url)
159
)
160
styleImporters.forEach((m) => affectedModules.add(m))
161
}
0 commit comments