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:
parent
015d06a331
commit
01780fe789
3
bin/next
3
bin/next
|
@ -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 = () => {
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue