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:
11
webpack.prod.js
Normal file
11
webpack.prod.js
Normal file
@ -0,0 +1,11 @@
|
||||
const path = require("path");
|
||||
const common = require("./webpack.common");
|
||||
const merge = require("webpack-merge");
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: "production",
|
||||
output: {
|
||||
filename: "main.[contentHash].js",
|
||||
path: path.resolve(__dirname, "dist")
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user