Add prod and dev configs, dev-server

- Broke our webpack.config file into 3 files
- webpack.common.js, webpack.dev.js, and webpack.prod.js
- installed webpack-merge to share the common functionality
- updated our package.json to use the new config files
- installed webpack-dev-server and added it to start script in package.json
This commit is contained in:
Colt Steele
2019-03-05 17:24:01 -08:00
parent c932911657
commit eb66c0dc93
5 changed files with 1185 additions and 7 deletions

View File

@ -5,7 +5,8 @@
"description": "",
"main": "index.js",
"scripts": {
"start": "webpack --config webpack.config.js"
"start": "webpack-dev-server --config webpack.dev.js --open",
"build": "webpack --config webpack.prod.js"
},
"keywords": [],
"author": "",
@ -18,6 +19,8 @@
"sass-loader": "^7.1.0",
"style-loader": "^0.23.1",
"webpack": "^4.29.6",
"webpack-cli": "^3.2.3"
"webpack-cli": "^3.2.3",
"webpack-dev-server": "^3.2.1",
"webpack-merge": "^4.2.1"
}
}