cli: add a warning when app is build with module federation enabled
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -36,13 +36,19 @@ export async function command(opts: OptionValues): Promise<void> {
|
||||
});
|
||||
|
||||
if (role === 'frontend') {
|
||||
const enableModuleFederation = process.env.EXPERIMENTAL_MODULE_FEDERATION;
|
||||
if (enableModuleFederation) {
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
`⚠️ WARNING: Module federation is experimental and will receive immediate breaking changes in the future.`,
|
||||
),
|
||||
);
|
||||
}
|
||||
return buildFrontend({
|
||||
targetDir: paths.targetDir,
|
||||
configPaths,
|
||||
writeStats: Boolean(opts.stats),
|
||||
moduleFederationMode: process.env.EXPERIMENTAL_MODULE_FEDERATION
|
||||
? 'host'
|
||||
: undefined,
|
||||
moduleFederationMode: enableModuleFederation ? 'host' : undefined,
|
||||
});
|
||||
}
|
||||
return buildBackend({
|
||||
|
||||
Reference in New Issue
Block a user