Skip to content

Commit 3b898dc

Browse files
committed
fix: add vue import maps for default import map
1 parent c8887d6 commit 3b898dc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/store.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import type {
1818
} from 'vue/compiler-sfc'
1919
import type { OutputModes } from './types'
2020
import type { editor } from 'monaco-editor-core'
21-
import { type ImportMap, mergeImportMap } from './import-map'
21+
import { type ImportMap, mergeImportMap, useVueImportMap } from './import-map'
2222

2323
import welcomeSFCCode from './template/welcome.vue?raw'
2424
import newSFCCode from './template/new-sfc.vue?raw'
@@ -35,7 +35,7 @@ export function useStore(
3535
welcomeSFC: welcomeSFCCode,
3636
newSFC: newSFCCode,
3737
}),
38-
builtinImportMap = ref({}),
38+
builtinImportMap = undefined!, // set later
3939

4040
errors = ref([]),
4141
showOutput = ref(false),
@@ -51,6 +51,7 @@ export function useStore(
5151
}: Partial<StoreState> = {},
5252
serializedState?: string,
5353
): ReplStore {
54+
builtinImportMap ||= useVueImportMap().importMap
5455
const loading = ref(false)
5556

5657
function applyBuiltinImportMap() {

0 commit comments

Comments
 (0)