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 {
13
13
import srcdoc from ' ./srcdoc.html?raw'
14
14
import { PreviewProxy } from ' ./PreviewProxy'
15
15
import { compileModulesForPreview } from ' ./moduleCompiler'
16
- import { Store , importMapFile } from ' ../store'
16
+ import { Store } from ' ../store'
17
17
import { Props } from ' ../Repl.vue'
18
18
19
19
const props = defineProps <{ show: boolean ; ssr: boolean }>()
@@ -36,14 +36,9 @@ onMounted(createSandbox)
36
36
37
37
// reset sandbox when import map changes
38
38
watch (
39
- () => store .state . files [ importMapFile ]. code ,
40
- (raw ) => {
39
+ () => store .getImportMap () ,
40
+ () => {
41
41
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
- }
47
42
createSandbox ()
48
43
} catch (e : any ) {
49
44
store .state .errors = [e as Error ]
Original file line number Diff line number Diff line change 16
16
"removeComments" : false ,
17
17
"lib" : [" esnext" , " dom" ],
18
18
"jsx" : " preserve" ,
19
- "rootDir" : " ."
19
+ "rootDir" : " ." ,
20
+ "skipLibCheck" : true
20
21
},
21
22
"include" : [" src" , " test" , " vite.config.ts" ]
22
23
}
You can’t perform that action at this time.
0 commit comments