Skip to content

Commit

Permalink
fix: add vue import maps for default import map
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Feb 14, 2024
1 parent c8887d6 commit 3b898dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import type {
} from 'vue/compiler-sfc'
import type { OutputModes } from './types'
import type { editor } from 'monaco-editor-core'
import { type ImportMap, mergeImportMap } from './import-map'
import { type ImportMap, mergeImportMap, useVueImportMap } from './import-map'

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

errors = ref([]),
showOutput = ref(false),
Expand All @@ -51,6 +51,7 @@ export function useStore(
}: Partial<StoreState> = {},
serializedState?: string,
): ReplStore {
builtinImportMap ||= useVueImportMap().importMap
const loading = ref(false)

function applyBuiltinImportMap() {
Expand Down

0 comments on commit 3b898dc

Please sign in to comment.