File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
packages/runtime/core/src Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import { interfaces } from './interface';
22
22
import { fetchStaticResources } from './utils' ;
23
23
import { GarfishHMRPlugin } from './plugins/fixHMR' ;
24
24
import { GarfishOptionsLife } from './plugins/lifecycle' ;
25
- import { GarfishPreloadPlugin } from './plugins/preload' ;
25
+ import { loadAppResource , GarfishPreloadPlugin } from './plugins/preload' ;
26
26
import { defaultLoadComponentOptions , getDefaultOptions } from './config' ;
27
27
28
28
export class Garfish implements interfaces . Garfish {
@@ -180,6 +180,15 @@ export class Garfish implements interfaces.Garfish {
180
180
return this ;
181
181
}
182
182
183
+ preloadApp ( name : string ) {
184
+ const appInfo = this . appInfos [ name ] ;
185
+ assert (
186
+ appInfo && appInfo . entry ,
187
+ `Can't preloadApp unexpected module "${ name } ".` ,
188
+ ) ;
189
+ loadAppResource ( this . loader , appInfo ) ;
190
+ }
191
+
183
192
async loadApp (
184
193
appName : string ,
185
194
options : Partial < interfaces . LoadAppOptions > | string ,
You can’t perform that action at this time.
0 commit comments