1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Make sure NODE_ENV is production for react-dom to optimize

This commit is contained in:
Tim Neutkens 2017-10-29 00:19:48 +02:00
parent 015d06a331
commit 01780fe789
5 changed files with 3 additions and 8 deletions

View file

@ -55,6 +55,9 @@ if (commands.has(cmd)) {
args = process.argv.slice(2)
}
const defaultEnv = cmd === 'dev' ? 'development' : 'production'
process.env.NODE_ENV = process.env.NODE_ENV || defaultEnv
const bin = join(__dirname, 'next-' + cmd)
const startProcess = () => {

View file

@ -5,8 +5,6 @@ import parseArgs from 'minimist'
import build from '../server/build'
import { printAndExit } from '../lib/utils'
process.env.NODE_ENV = process.env.NODE_ENV || 'production'
const argv = parseArgs(process.argv.slice(2), {
alias: {
h: 'help'

View file

@ -7,8 +7,6 @@ import Server from '../server'
import { printAndExit } from '../lib/utils'
import pkgUp from 'pkg-up'
process.env.NODE_ENV = process.env.NODE_ENV || 'development'
const argv = parseArgs(process.argv.slice(2), {
alias: {
h: 'help',

View file

@ -5,8 +5,6 @@ import parseArgs from 'minimist'
import exportApp from '../server/export'
import { printAndExit } from '../lib/utils'
process.env.NODE_ENV = process.env.NODE_ENV || 'production'
const argv = parseArgs(process.argv.slice(2), {
alias: {
h: 'help',

View file

@ -4,8 +4,6 @@ import { resolve } from 'path'
import parseArgs from 'minimist'
import Server from '../server'
process.env.NODE_ENV = process.env.NODE_ENV || 'production'
const argv = parseArgs(process.argv.slice(2), {
alias: {
h: 'help',