Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scopes/harmony/application/run.cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ when no app name is specified, automatically detects and runs the app if only on
];
alias = 'c';
group = 'run-serve';
_packageManagerArgs: string[] = []; // populated by yargs-adapter from anything after `--` (e.g. `bit run my-app -- --device --ios`)
options = [
['d', 'dev', 'start the application in dev mode.'],
['p', 'port [port-number]', 'port to run the app on'],
Expand Down Expand Up @@ -78,14 +79,17 @@ when no app name is specified, automatically detects and runs the app if only on
this.logger.console(`multiple apps found, please specify one using "${runStr}".\n\n${section}`);
process.exit(1);
}
// merge any args passed after `--` (e.g. `bit run my-app -- --device --ios`) into the args string forwarded to the app.
const extraArgs = this._packageManagerArgs.join(' ');
const mergedArgs = [args, extraArgs].filter(Boolean).join(' ');
Comment on lines +82 to +84
// remove wds logs until refactoring webpack to a worker through the Worker aspect.
this.logger.off();
const { port, errors, isOldApi } = await this.application.runApp(resolvedApp, {
dev,
watch,
ssr,
port: +exactPort,
args,
args: mergedArgs,
});

if (errors) {
Expand Down