File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ export class ReplStore implements Store {
318318 const files = this . getFiles ( )
319319 const importMap = files [ importMapFile ]
320320 if ( importMap ) {
321- const { imports } = JSON . parse ( importMap )
321+ const { imports, ... restImportMap } = JSON . parse ( importMap )
322322 if ( imports [ 'vue' ] === this . defaultVueRuntimeURL ) {
323323 delete imports [ 'vue' ]
324324 }
@@ -328,7 +328,11 @@ export class ReplStore implements Store {
328328 if ( ! Object . keys ( imports ) . length ) {
329329 delete files [ importMapFile ]
330330 } else {
331- files [ importMapFile ] = JSON . stringify ( { imports } , null , 2 )
331+ files [ importMapFile ] = JSON . stringify (
332+ { imports, ...restImportMap } ,
333+ null ,
334+ 2
335+ )
332336 }
333337 }
334338 return '#' + utoa ( JSON . stringify ( files ) )
@@ -400,7 +404,7 @@ export class ReplStore implements Store {
400404 )
401405 }
402406 map . code = JSON . stringify ( json , null , 2 )
403- } catch ( e ) { }
407+ } catch { }
404408 }
405409 }
406410
You can’t perform that action at this time.
0 commit comments