-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
43 lines (42 loc) · 1.11 KB
/
webpack.config.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
let webpack = require('webpack');
let path = require('path');
module.exports = {
entry : path.join(__dirname,"/components/app.jsx"),
output : {
filename : "bundle.js",
path : path.join(__dirname,"/public/bundle")
},
devServer: {
hot : true,
contentBase: path.join(__dirname, '/public'),
watchContentBase: true,
publicPath : "/bundle/",
compress: true,
port: 9000
},
mode : "development",
module : {
rules : [
{
test : /\.(scss|css)$/,
exclude : /node_modules/,
use : [
{loader : 'style-loader'},
{loader : 'css-loader'},
{loader : 'sass-loader'}
]
},
{
test : /\.(js|jsx)$/,
exclude: /node_modules/,
use : 'babel-loader'
}
]
},
plugins : [
new webpack.ProgressPlugin(),
new webpack.NamedModulesPlugin(),
new webpack.HotModuleReplacementPlugin()
],
target : "web"
}