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)
|
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 bin = join(__dirname, 'next-' + cmd)
|
||||||
|
|
||||||
const startProcess = () => {
|
const startProcess = () => {
|
||||||
|
|
|
@ -5,8 +5,6 @@ import parseArgs from 'minimist'
|
||||||
import build from '../server/build'
|
import build from '../server/build'
|
||||||
import { printAndExit } from '../lib/utils'
|
import { printAndExit } from '../lib/utils'
|
||||||
|
|
||||||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'
|
|
||||||
|
|
||||||
const argv = parseArgs(process.argv.slice(2), {
|
const argv = parseArgs(process.argv.slice(2), {
|
||||||
alias: {
|
alias: {
|
||||||
h: 'help'
|
h: 'help'
|
||||||
|
|
|
@ -7,8 +7,6 @@ import Server from '../server'
|
||||||
import { printAndExit } from '../lib/utils'
|
import { printAndExit } from '../lib/utils'
|
||||||
import pkgUp from 'pkg-up'
|
import pkgUp from 'pkg-up'
|
||||||
|
|
||||||
process.env.NODE_ENV = process.env.NODE_ENV || 'development'
|
|
||||||
|
|
||||||
const argv = parseArgs(process.argv.slice(2), {
|
const argv = parseArgs(process.argv.slice(2), {
|
||||||
alias: {
|
alias: {
|
||||||
h: 'help',
|
h: 'help',
|
||||||
|
|
|
@ -5,8 +5,6 @@ import parseArgs from 'minimist'
|
||||||
import exportApp from '../server/export'
|
import exportApp from '../server/export'
|
||||||
import { printAndExit } from '../lib/utils'
|
import { printAndExit } from '../lib/utils'
|
||||||
|
|
||||||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'
|
|
||||||
|
|
||||||
const argv = parseArgs(process.argv.slice(2), {
|
const argv = parseArgs(process.argv.slice(2), {
|
||||||
alias: {
|
alias: {
|
||||||
h: 'help',
|
h: 'help',
|
||||||
|
|
|
@ -4,8 +4,6 @@ import { resolve } from 'path'
|
||||||
import parseArgs from 'minimist'
|
import parseArgs from 'minimist'
|
||||||
import Server from '../server'
|
import Server from '../server'
|
||||||
|
|
||||||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'
|
|
||||||
|
|
||||||
const argv = parseArgs(process.argv.slice(2), {
|
const argv = parseArgs(process.argv.slice(2), {
|
||||||
alias: {
|
alias: {
|
||||||
h: 'help',
|
h: 'help',
|
||||||
|
|
Loading…
Reference in a new issue