File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
website/docs/zh/guide/start Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,16 @@ const disableDts = (rslibConfig: RslibConfig) => {
99 }
1010} ;
1111
12+ const onlyEnableMF = ( rslibConfig : RslibConfig ) => {
13+ const length = rslibConfig . lib . length ;
14+ for ( let i = length - 1 ; i >= 0 ; i -- ) {
15+ if ( rslibConfig . lib [ i ] && rslibConfig . lib [ i ] ! . format !== 'mf' ) {
16+ rslibConfig . lib . splice ( i , 1 ) ;
17+ }
18+ }
19+ disableDts ( rslibConfig ) ;
20+ } ;
21+
1222const iterations = process . env . CI ? 10 : 50 ;
1323
1424describe ( 'benchmark Rslib in examples' , ( ) => {
@@ -48,7 +58,7 @@ describe('benchmark Rslib in examples', () => {
4858 'examples/module-federation/mf-react-component' ,
4959 async ( ) => {
5060 const cwd = getCwdByExample ( 'module-federation/mf-react-component' ) ;
51- await rslibBuild ( { cwd, modifyConfig : disableDts } ) ;
61+ await rslibBuild ( { cwd, modifyConfig : onlyEnableMF } ) ;
5262 } ,
5363 { iterations } ,
5464 ) ;
Original file line number Diff line number Diff line change @@ -52,8 +52,4 @@ import Step from '@components/Step';
5252 title = " 查阅配置"
5353 description = " 了解如何配置 Rslib"
5454 />
55- <Step
56- href = " /guide/advanced/module-federation"
57- title = " 构建 Module Federation 产物"
58- />
5955</NextSteps >
You can’t perform that action at this time.
0 commit comments