Skip to content

Commit

Permalink
feat: set NODE_ENV if not present (vitejs#732)
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Aug 30, 2020
1 parent 8102415 commit 0455b91
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/node/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ console.log(chalk.cyan(`vite v${require('../../package.json').version}`))

const envMode = mode || m || defaultMode
const options = await resolveOptions(envMode)
process.env.NODE_ENV = process.env.NODE_ENV || envMode
if (!options.command || options.command === 'serve') {
runServe(options)
} else if (options.command === 'build') {
Expand Down

0 comments on commit 0455b91

Please sign in to comment.