Skip to content

Commit f28da36

Browse files
author
nyqykk
committed
chore: just keep mf format in benchmark
1 parent ea26ce3 commit f28da36

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

tests/benchmark/index.bench.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff 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+
1222
const iterations = process.env.CI ? 10 : 50;
1323

1424
describe('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
);

website/docs/zh/guide/start/index.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff 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>

0 commit comments

Comments
 (0)