File tree Expand file tree Collapse file tree 4 files changed +10
-1
lines changed
preset-built-in/src/plugins/features/mfsu Expand file tree Collapse file tree 4 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -827,6 +827,9 @@ Contains sub-attributes
827
827
828
828
- development: ` { output: String } ` 。可以通过 output 自定义 dev 模式下的输出路径。用于将预编译文件同步到 git。
829
829
- production: ` { output: String } ` 。在生产模式中使用 mfsu。如果额外设置了 output,将会将生产模式预编译依赖编译到 output 下。
830
+ - mfName: ` string ` 。指定预编译依赖的变量名,默认为 ` mf ` ,比如可在 qiankun 主应用里配置
831
+ - exportAllMembers
832
+ - chunks: ` string[] ` 。mfsu 阶段的 chunks 写死了 ` ['umi'] ` ,可通过此配置项强行修改
830
833
831
834
``` js
832
835
mfsu: {
Original file line number Diff line number Diff line change @@ -826,6 +826,9 @@ export default {
826
826
827
827
- development: ` { output: String } ` 。可以通过 output 自定义 dev 模式下的输出路径。用于将预编译文件同步到 git。
828
828
- production: ` { output: String } ` 。在生产模式中使用 mfsu。如果额外设置了 output,将会将生产模式预编译依赖编译到 output 下。
829
+ - mfName: ` string ` 。指定预编译依赖的变量名,默认为 ` mf ` ,比如可在 qiankun 主应用里配置
830
+ - exportAllMembers
831
+ - chunks: ` string[] ` 。mfsu 阶段的 chunks 写死了 ` ['umi'] ` ,可通过此配置项强行修改
829
832
830
833
``` js
831
834
mfsu: {
Original file line number Diff line number Diff line change @@ -115,7 +115,8 @@ export default function (api: IApi) {
115
115
dynamicImport : memo . dynamicImport || { } ,
116
116
117
117
// Lock chunks when mfsu is enabled
118
- chunks : [ 'umi' ] ,
118
+ // @ts -ignore
119
+ chunks : api . config . mfsu ?. chunks || [ 'umi' ] ,
119
120
} ;
120
121
} ,
121
122
stage : Infinity ,
@@ -146,6 +147,7 @@ export default function (api: IApi) {
146
147
} ) ,
147
148
mfName : joi . string ( ) ,
148
149
exportAllMembers : joi . object ( ) ,
150
+ chunks : joi . array ( ) . items ( joi . string ( ) ) ,
149
151
} )
150
152
. description ( 'open mfsu feature' ) ;
151
153
} ,
Original file line number Diff line number Diff line change @@ -376,6 +376,7 @@ export interface BaseIConfig extends IConfigCore {
376
376
production ?: { output ?: string } ;
377
377
exportAllMembers ?: Record < string , string [ ] > ;
378
378
mfName ?: string ;
379
+ chunks ?: string [ ] ;
379
380
} ;
380
381
metas ?: Partial < HTMLMetaElement > [ ] ;
381
382
mpa ?: object ;
You can’t perform that action at this time.
0 commit comments