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:
Patrik Oldsberg
2024-07-15 17:25:11 +02:00
parent 5e7f0491fa
commit 8e2aba9bd0
+9 -3
View File
@@ -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({