Skip to content

Commit 81c153a

Browse files
committed
fix(hmr): ignore non-js modules
1 parent fe03fa2 commit 81c153a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/plugin-vue/src/handleHotUpdate.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ export async function handleHotUpdate(
4343
const { descriptor } = createDescriptor(file, content, options, true)
4444

4545
let needRerender = false
46-
const affectedModules = new Set<ModuleNode | undefined>()
46+
const affectedModules = new Set<ModuleNode | undefined>(
47+
modules.filter((mod) => mod.type !== 'js'), // this plugin does not handle non-js modules
48+
)
4749
const mainModule = getMainModule(modules)
4850
const templateModule = modules.find((m) => /type=template/.test(m.url))
4951

0 commit comments

Comments
 (0)