We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96084d6 commit 851b258Copy full SHA for 851b258
packages/vite/src/node/server/moduleGraph.ts
@@ -229,8 +229,10 @@ export class ModuleGraph {
229
// to only update the import timestamps. If it's not statically imported, e.g. watched/glob file,
230
// we can only soft invalidate if the current module was also soft-invalidated. A soft-invalidation
231
// doesn't need to trigger a re-load and re-transform of the importer.
232
+ // But we exclude direct CSS files as those cannot be soft invalidated.
233
const shouldSoftInvalidateImporter =
- importer.staticImportedUrls?.has(mod.url) || softInvalidate
234
+ (importer.staticImportedUrls?.has(mod.url) || softInvalidate) &&
235
+ importer.type !== 'css'
236
this.invalidateModule(
237
importer,
238
seen,
0 commit comments