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) => {
9
9
}
10
10
} ;
11
11
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
+
12
22
const iterations = process . env . CI ? 10 : 50 ;
13
23
14
24
describe ( 'benchmark Rslib in examples' , ( ) => {
@@ -48,7 +58,7 @@ describe('benchmark Rslib in examples', () => {
48
58
'examples/module-federation/mf-react-component' ,
49
59
async ( ) => {
50
60
const cwd = getCwdByExample ( 'module-federation/mf-react-component' ) ;
51
- await rslibBuild ( { cwd, modifyConfig : disableDts } ) ;
61
+ await rslibBuild ( { cwd, modifyConfig : onlyEnableMF } ) ;
52
62
} ,
53
63
{ iterations } ,
54
64
) ;
Original file line number Diff line number Diff line change @@ -52,8 +52,4 @@ import Step from '@components/Step';
52
52
title = " 查阅配置"
53
53
description = " 了解如何配置 Rslib"
54
54
/>
55
- <Step
56
- href = " /guide/advanced/module-federation"
57
- title = " 构建 Module Federation 产物"
58
- />
59
55
</NextSteps >
You can’t perform that action at this time.
0 commit comments