Skip to content

Commit 1b50aa5

Browse files
committed
add force flag to cli
1 parent 29c7e77 commit 1b50aa5

File tree

1 file changed

+4
-1
lines changed
  • packages/serve-instrument/src

1 file changed

+4
-1
lines changed

packages/serve-instrument/src/cli.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ program.argument('<target>', 'the directory containing the instrument', (target:
2727
return target;
2828
});
2929

30+
program.option('-f --force', 'force dependency reoptimization');
31+
3032
program.option(
3133
'-p --port <number>',
3234
'the port to run the dev server on',
@@ -41,7 +43,7 @@ program.option(
4143
);
4244

4345
program.action(async (target: string) => {
44-
const { port } = program.opts<{ port: number }>();
46+
const { force, port } = program.opts<{ force?: boolean; port: number }>();
4547

4648
const getEncodedBundle = async () => {
4749
const inputs: BundlerInput[] = [];
@@ -60,6 +62,7 @@ program.action(async (target: string) => {
6062
};
6163

6264
const server = await createServer({
65+
forceOptimizeDeps: force,
6366
plugins: [
6467
{
6568
configureServer: (server): void => {

0 commit comments

Comments
 (0)