diff --git a/src/store.ts b/src/store.ts index 195c2ccf..f7fe965d 100644 --- a/src/store.ts +++ b/src/store.ts @@ -219,6 +219,10 @@ export function useStore( mainFile.value = newFilename } + if (activeFilename.value === oldFilename) { + activeFilename.value = mainFile.value + } + compileFile(store, file).then((errs) => (errors.value = errs)) } const getImportMap: Store['getImportMap'] = () => {