File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -72,17 +72,28 @@ export const getAppConfig = (
7272 return mergeResult ;
7373} ;
7474
75+ function getGlobalInsulationVariable ( ) {
76+ return window [ '__GARFISH_INSULATION_VARIABLE__' ] || [ ] ;
77+ }
78+
7579export const generateAppOptions = (
7680 appName : string ,
7781 garfish : interfaces . Garfish ,
7882 options ?: Partial < Omit < AppInfo , 'name' > > ,
7983) : AppInfo => {
8084 let appInfo : AppInfo = garfish . appInfos [ appName ] || { name : appName } ;
85+ const insulationVariable = Array . from (
86+ new Set ( [
87+ ...getGlobalInsulationVariable ( ) ,
88+ ...( appInfo ?. insulationVariable || [ ] ) ,
89+ ] ) ,
90+ ) ;
8191
8292 // Merge register appInfo config and loadApp config
8393 appInfo = getAppConfig ( garfish . options , {
8494 ...appInfo ,
8595 ...options ,
96+ insulationVariable,
8697 props : {
8798 ...( appInfo . props || { } ) ,
8899 ...( options ?. props || { } ) ,
You can’t perform that action at this time.
0 commit comments