Skip to content

Commit 5ce3013

Browse files
author
nyqykk
committed
chore: solve conversation issue
1 parent 0ff4265 commit 5ce3013

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/core/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ export function composeMinifyConfig(config: LibConfig): RsbuildConfig {
308308
defaults: false,
309309
unused: true,
310310
dead_code: true,
311-
// mf format if use toplevel, remoteEntry's global variable will be tree-shaking
311+
// remoteEntry's global variable will be tree-shaken if `toplevel` is enabled in "mf" format
312312
toplevel: format !== 'mf',
313313
},
314314
format: {

packages/core/src/utils/helper.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,13 @@ export function checkMFPlugin(config: LibConfig): boolean {
180180
return true;
181181
}
182182

183+
// https://github.com/module-federation/core/blob/4e5c4b96ee45899f3ba5904b8927768980d5ad0e/packages/rsbuild-plugin/src/cli/index.ts#L17
183184
const added = isPluginIncluded(config, 'rsbuild:module-federation-enhanced');
184185
if (!added) {
185186
logger.warn(
186-
`${color.green('mf format')} is enabled, but the ${color.blue(
187+
`${color.green('"mf format"')} should be used with ${color.blue(
187188
'@module-federation/rsbuild-plugin',
188-
)} plugin was not found in plugins.`,
189+
)}," consider installing and adding to plugins. Check the documentation (https://module-federation.io/guide/basic/rsbuild.html#rslib-module) to get start with "mf" output.`,
189190
);
190191
process.exit(1);
191192
}

0 commit comments

Comments
 (0)