@@ -42,7 +42,7 @@ Options:
4242 --no-external do not bundle external dependencies
4343 --no-clean do not clean dist folder before building, default: false
4444 --target <target> js features target: swc target es versions. default: es2022
45- --runtime <runtime> build runtime (nodejs , browser). default: browser
45+ --runtime <runtime> build runtime (node , browser). default: browser
4646 --env <env> inlined process env variables, separate by comma. default: NODE_ENV
4747 --cwd <cwd> specify current working directory
4848 --sourcemap enable sourcemap generation
@@ -110,8 +110,9 @@ async function parseCliArgs(argv: string[]) {
110110 } )
111111 . option ( 'runtime' , {
112112 type : 'string' ,
113+ choices : [ 'browser' , 'node' ] as const ,
113114 default : 'browser' ,
114- description : 'build runtime (nodejs , browser)' ,
115+ description : 'build runtime (node , browser)' ,
115116 } )
116117 . option ( 'target' , {
117118 type : 'string' ,
@@ -192,7 +193,7 @@ async function parseCliArgs(argv: string[]) {
192193 dts : args [ 'dts' ] === false ? false : undefined ,
193194 dtsBundle : args [ 'dts-bundle' ] ,
194195 help : args [ 'help' ] ,
195- runtime : args [ 'runtime' ] ,
196+ runtime : args [ 'runtime' ] as CliArgs [ 'runtime' ] ,
196197 target : args [ 'target' ] as CliArgs [ 'target' ] ,
197198 // no-external is a boolean flag, turning external to `false`
198199 external :
0 commit comments