Skip to content

Commit 878f783

Browse files
committed
22-production-build
1 parent c3a7980 commit 878f783

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"dev": "webpack serve"
7+
"dev": "webpack serve",
8+
"build": "NODE_ENV='production' webpack",
9+
"build-for-window": "set NODE_ENV=production&&webpack"
810
},
911
"babel": {
1012
"presets": [

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = {
1717
resolve: {
1818
extensions: [".jsx", "..."],
1919
},
20-
mode: "development",
20+
mode: process.env.NODE_ENV === "production" ? "production" : "development",
2121
plugins: [
2222
new HtmlWebpackPlugin({
2323
template: "app/index.html",

0 commit comments

Comments
 (0)