-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
51 lines (46 loc) · 1021 Bytes
/
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
44
45
46
47
48
49
50
51
module.exports = {
context: __dirname + "/src",
entry: {
javascript: "./index.jsx",
html: "./index.html",
},
devtool: 'eval-source-map',
devServer: {
historyApiFallback: true
},
output: {
filename: "index.js",
path: __dirname + "/bundle",
sourceMapFilename: "index.js.map"
},
resolve: {
extensions: ['', '.js', '.jsx']
},
module: {
loaders: [{
test: /\.jsx?$/,
include: [
__dirname + "/src"
],
exclude: /node_modules/,
loader: 'babel',
}, {
test: /\.html$/,
loader: "file?name=[name].[ext]",
}, {
test: /\.css$/,
loaders: [
'style?sourceMap',
'css?modules&importLoaders=1&localIdentName=[path]___[name]__[local]___[hash:base64:5]'
]
}, {
test: /\.scss$/,
loader: 'style!css!sass'
},
{
test: /\.(jpe?g|png|gif|svg|ico)$/i,
loader: "file-loader?name=/images/[name].[ext]"
}
]
}
}