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 330a152 commit dbd7490Copy full SHA for dbd7490
package.json
@@ -5,7 +5,7 @@
5
"main": "index.js",
6
"scripts": {
7
"clean": "rimraf dist",
8
- "build": "npm run clean && webpack",
+ "build": "NODE_ENV=production npm run clean && webpack -p",
9
"serve": "webpack-dev-server"
10
},
11
"repository": "https://github.com/StephenGrider/WebpackProject",
webpack.config.js
@@ -35,6 +35,9 @@ module.exports = {
35
}),
36
new HtmlWebpackPlugin({
37
template: 'src/index.html'
38
+ }),
39
+ new webpack.DefinePlugin({
40
+ 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
41
})
42
]
43
};
0 commit comments