vuejs-templates / webpack

A full-featured Webpack + vue-loader setup with hot reload, linting, testing & css extraction.
MIT License
9.7k stars 4.38k forks source link

Allow Bundling Using Different NODE_ENV #1456

Closed yauri-io closed 4 years ago

yauri-io commented 6 years ago

When running

npm run build

by default, it runs production build, taking production config only because in the build.js the NODE_ENV is hardcoded. It should allowing different NODE_ENV.

Before

process.env.NODE_ENV =  'production'

After

process.env.NODE_ENV = process.env.NODE_ENV || 'production'