Skip to content

Commit e7b8f41

Browse files
ygj6ygj6
and
ygj6
authored
fix: do not cache module while the file contains import.meta.glob (#3005)
Co-authored-by: ygj6 <ygj@54321>
1 parent 2671546 commit e7b8f41

File tree

1 file changed

+2
-0
lines changed
  • packages/vite/src/node/server

1 file changed

+2
-0
lines changed

packages/vite/src/node/server/hmr.ts

+2
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ function invalidate(mod: ModuleNode, timestamp: number, seen: Set<ModuleNode>) {
250250
seen.add(mod)
251251
mod.lastHMRTimestamp = timestamp
252252
mod.transformResult = null
253+
mod.ssrModule = null
254+
mod.ssrTransformResult = null
253255
mod.importers.forEach((importer) => {
254256
if (!importer.acceptedHmrDeps.has(mod)) {
255257
invalidate(importer, timestamp, seen)

0 commit comments

Comments
 (0)