cli: skip opening browser when serving bundle for packages with frontend-dynamic-container role
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
@@ -24,6 +24,7 @@ interface StartAppOptions {
|
||||
|
||||
checksEnabled: boolean;
|
||||
configPaths: string[];
|
||||
skipOpenBrowser?: boolean;
|
||||
isModuleFederationRemote?: boolean;
|
||||
}
|
||||
|
||||
@@ -35,6 +36,7 @@ export async function startFrontend(options: StartAppOptions) {
|
||||
checksEnabled: options.checksEnabled,
|
||||
configPaths: options.configPaths,
|
||||
verifyVersions: options.verifyVersions,
|
||||
skipOpenBrowser: options.skipOpenBrowser,
|
||||
moduleFederation: getModuleFederationOptions(
|
||||
name,
|
||||
options.isModuleFederationRemote,
|
||||
|
||||
@@ -162,6 +162,7 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
|
||||
const config = await createConfig(paths, {
|
||||
...commonConfigOptions,
|
||||
additionalEntryPoints: detectedModulesEntryPoint,
|
||||
moduleFederation: options.moduleFederation,
|
||||
});
|
||||
|
||||
if (process.env.EXPERIMENTAL_VITE) {
|
||||
@@ -278,7 +279,9 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
|
||||
}
|
||||
});
|
||||
|
||||
openBrowser(url.href);
|
||||
if (!options.skipOpenBrowser) {
|
||||
openBrowser(url.href);
|
||||
}
|
||||
|
||||
const waitForExit = async () => {
|
||||
for (const signal of ['SIGINT', 'SIGTERM'] as const) {
|
||||
|
||||
@@ -43,6 +43,7 @@ export type ServeOptions = BundlingPathsOptions & {
|
||||
checksEnabled: boolean;
|
||||
configPaths: string[];
|
||||
verifyVersions?: boolean;
|
||||
skipOpenBrowser?: boolean;
|
||||
moduleFederation?: ModuleFederationOptions;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user