File tree 3 files changed +10
-3
lines changed
3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,9 @@ let disposeVue: undefined | (() => void)
76
76
export async function reloadLanguageTools ( store : Store ) {
77
77
disposeVue ?.( )
78
78
79
- let dependencies = { }
79
+ let dependencies : Record < string , string > = {
80
+ ...store . state . dependencyVersion ,
81
+ }
80
82
81
83
if ( store . vueVersion ) {
82
84
dependencies = {
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export interface CreateData {
19
19
compilerOptions ?: import ( 'typescript' ) . CompilerOptions
20
20
vueCompilerOptions ?: Partial < VueCompilerOptions >
21
21
}
22
- dependencies : { }
22
+ dependencies : Record < string , string >
23
23
}
24
24
25
25
let locale : string
Original file line number Diff line number Diff line change @@ -90,6 +90,8 @@ export interface StoreState {
90
90
locale ?: string | undefined
91
91
// used to force reset the sandbox
92
92
resetFlip : boolean
93
+ /** { dep: version } */
94
+ dependencyVersion ?: Record < string , string >
93
95
}
94
96
95
97
export interface SFCOptions {
@@ -194,8 +196,10 @@ export class ReplStore implements Store {
194
196
this . state . typescriptVersion ,
195
197
this . state . typescriptLocale ,
196
198
this . state . locale ,
199
+ this . state . dependencyVersion ,
197
200
] ,
198
- ( ) => this . reloadLanguageTools ?.( )
201
+ ( ) => this . reloadLanguageTools ?.( ) ,
202
+ { deep : true }
199
203
)
200
204
201
205
this . state . errors = [ ]
@@ -417,6 +421,7 @@ export class ReplStore implements Store {
417
421
imports [ 'vue/server-renderer' ] = ssrUrl
418
422
this . setImportMap ( importMap )
419
423
this . forceSandboxReset ( )
424
+ this . reloadLanguageTools ?.( )
420
425
console . info ( `[@vue/repl] Now using Vue version: ${ version } ` )
421
426
}
422
427
You can’t perform that action at this time.
0 commit comments