Skip to content

Commit 491b793

Browse files
committed
feat(bin): 未提供env参数时,优先使用NODE_ENV变量
1 parent 9d885ea commit 491b793

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ spinner.add({
3232

3333
if (typeof userConfig === 'function') {
3434
const args = minimist(process.argv.slice(2), { alias: { env: ['e'] } });
35-
const env = args['env'] || 'development';
35+
const env = args['env'] || process.env['NODE_ENV'] || 'development';
3636
task.title += ` [${colors.green(env)}]`;
3737
ctx.configs = toArray(await userConfig(env));
3838
} else {

0 commit comments

Comments
 (0)