Skip to content
Snippets Groups Projects
Commit 8cec11c8 authored by syuilo's avatar syuilo
Browse files

Define NODE_ENV for production build

parent 3bd2ba20
No related branches found
No related tags found
No related merge requests found
import * as webpack from 'webpack';
import consts from './consts';
import hoist from './hoist';
import minify from './minify';
......@@ -7,7 +9,12 @@ const isProduction = env === 'production';
export default (version, lang) => {
const plugins = [
consts(lang)
consts(lang),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV)
}
})
];
if (isProduction) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment