We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e1f80a commit 82bd63fCopy full SHA for 82bd63f
webpack/package.json
@@ -20,6 +20,6 @@
20
},
21
"scripts": {
22
"start": "webpack-dev-server",
23
- "build": "rimraf dist && webpack --mode=production",
+ "build": "rimraf dist && webpack --env production",
24
}
25
webpack/webpack.config.js
@@ -1,7 +1,7 @@
1
const HtmlWebpackPlugin = require('html-webpack-plugin');
2
3
-module.exports = function(env, { mode }) {
4
- const production = mode === 'production';
+module.exports = function(env) {
+ const production = env === 'production' || process.env.NODE_ENV === 'production';
5
return {
6
mode: production ? 'production' : 'development',
7
devtool: production ? 'source-maps' : 'inline-source-map',
0 commit comments