forked from Colt/webpack-demo-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.common.js
46 lines (38 loc) · 1.11 KB
/
webpack.common.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
module.exports = {
entry: {
main: "./src/index.js",
vendor: "./src/vendor.js"
},
module: {
rules: [
{
test: /\.html$/i,
loader: "html-loader",
options: {
esModule: false,
},
},
{
test: /\.(svg|png|jpe?g|gif)$/,
use: {
loader: "file-loader",
options: {
name: "[name].[hash].[ext]",
outputPath: "img"
}
}
}
]
}
}
/** webpack-demo-app
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
master
Colt Steele committed on 6 Mar 2019
1 parent c932911 commit eb66c0dc93141080f5b1abb335ec998a1e91d72e
*/