File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,6 +55,9 @@ if (commands.has(cmd)) {
5555 args = process . argv . slice ( 2 )
5656}
5757
58+ const defaultEnv = cmd === 'dev' ? 'development' : 'production'
59+ process . env . NODE_ENV = process . env . NODE_ENV || defaultEnv
60+
5861const bin = join ( __dirname , 'next-' + cmd )
5962
6063const startProcess = ( ) => {
Original file line number Diff line number Diff line change @@ -5,8 +5,6 @@ import parseArgs from 'minimist'
55import build from '../server/build'
66import { printAndExit } from '../lib/utils'
77
8- process . env . NODE_ENV = process . env . NODE_ENV || 'production'
9-
108const argv = parseArgs ( process . argv . slice ( 2 ) , {
119 alias : {
1210 h : 'help'
Original file line number Diff line number Diff line change @@ -7,8 +7,6 @@ import Server from '../server'
77import { printAndExit } from '../lib/utils'
88import pkgUp from 'pkg-up'
99
10- process . env . NODE_ENV = process . env . NODE_ENV || 'development'
11-
1210const argv = parseArgs ( process . argv . slice ( 2 ) , {
1311 alias : {
1412 h : 'help' ,
Original file line number Diff line number Diff line change @@ -5,8 +5,6 @@ import parseArgs from 'minimist'
55import exportApp from '../server/export'
66import { printAndExit } from '../lib/utils'
77
8- process . env . NODE_ENV = process . env . NODE_ENV || 'production'
9-
108const argv = parseArgs ( process . argv . slice ( 2 ) , {
119 alias : {
1210 h : 'help' ,
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ import { resolve } from 'path'
44import parseArgs from 'minimist'
55import Server from '../server'
66
7- process . env . NODE_ENV = process . env . NODE_ENV || 'production'
8-
97const argv = parseArgs ( process . argv . slice ( 2 ) , {
108 alias : {
119 h : 'help' ,
You can’t perform that action at this time.
0 commit comments