File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import {
1313import srcdoc from ' ./srcdoc.html?raw'
1414import { PreviewProxy } from ' ./PreviewProxy'
1515import { compileModulesForPreview } from ' ./moduleCompiler'
16- import { Store , importMapFile } from ' ../store'
16+ import { Store } from ' ../store'
1717import { Props } from ' ../Repl.vue'
1818
1919const props = defineProps <{ show: boolean ; ssr: boolean }>()
@@ -36,14 +36,9 @@ onMounted(createSandbox)
3636
3737// reset sandbox when import map changes
3838watch (
39- () => store .state . files [ importMapFile ]. code ,
40- (raw ) => {
39+ () => store .getImportMap () ,
40+ () => {
4141 try {
42- const map = JSON .parse (raw )
43- if (! map .imports ) {
44- store .state .errors = [` import-map.json is missing "imports" field. ` ]
45- return
46- }
4742 createSandbox ()
4843 } catch (e : any ) {
4944 store .state .errors = [e as Error ]
Original file line number Diff line number Diff line change 1616 "removeComments" : false ,
1717 "lib" : [" esnext" , " dom" ],
1818 "jsx" : " preserve" ,
19- "rootDir" : " ."
19+ "rootDir" : " ." ,
20+ "skipLibCheck" : true
2021 },
2122 "include" : [" src" , " test" , " vite.config.ts" ]
2223}
You can’t perform that action at this time.
0 commit comments