@@ -18,7 +18,7 @@ import type {
1818} from 'vue/compiler-sfc'
1919import type { OutputModes } from './types'
2020import type { editor } from 'monaco-editor-core'
21- import { type ImportMap , mergeImportMap } from './import-map'
21+ import { type ImportMap , mergeImportMap , useVueImportMap } from './import-map'
2222
2323import welcomeSFCCode from './template/welcome.vue?raw'
2424import 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,11 @@ export function useStore(
5151 } : Partial < StoreState > = { } ,
5252 serializedState ?: string ,
5353) : ReplStore {
54+ if ( ! builtinImportMap ) {
55+ ; ( { importMap : builtinImportMap , vueVersion } = useVueImportMap ( {
56+ vueVersion : vueVersion . value ,
57+ } ) )
58+ }
5459 const loading = ref ( false )
5560
5661 function applyBuiltinImportMap ( ) {
0 commit comments