Skip to content

Commit 8440148

Browse files
committed
fix: enhance Vue SFC recompilation on compiler changes
1 parent 1af01e8 commit 8440148

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/store.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,11 @@ export function useStore(
107107
{ immediate: true },
108108
)
109109

110-
// recompile vue sfc files when compiler changes
110+
// Recompile all Vue SFC files when the compiler changes.
111+
// This ensures that when switching Vue versions (e.g., from <3.6 to >=3.6),
112+
// all vue sfc files are recompiled with the new compiler to correctly handle
113+
// vapor components.
111114
watch(compiler, (_, oldCompiler) => {
112-
// skip initial (oldCompiler is undefined on first run)
113115
if (!oldCompiler) return
114116
for (const file of Object.values(files.value)) {
115117
if (file.filename.endsWith('.vue')) {

0 commit comments

Comments
 (0)