Skip to content

Commit b1fd298

Browse files
committed
chore: support passing through --analyze rspack option
1 parent 6200f53 commit b1fd298

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

build_tools/cli.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,19 @@ function parseArgs() {
251251
mode: {
252252
default: "production",
253253
},
254+
analyze: {
255+
type: "boolean",
256+
default: false,
257+
description: "Print bundle size analysis.",
258+
},
254259
}),
255260
handler: async (argv) => {
256261
setConfig(await getWebpackConfig(argv, { watch: argv.watch }));
257-
await runWebpack("build", `--mode=${argv.mode}`);
262+
await runWebpack(
263+
"build",
264+
`--mode=${argv.mode}`,
265+
...(argv.analyze ? [`--analyze`] : []),
266+
);
258267
},
259268
})
260269
.strict()

0 commit comments

Comments
 (0)