-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
41 lines (37 loc) · 928 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
var webpack = require('webpack');
var path = require("path");
module.exports = {
context: __dirname,
entry: [
'webpack-dev-server/client?http://0.0.0.0:3000', // WebpackDevServer host and port
'webpack/hot/only-dev-server',
'./js/main.js',
],
output: {
path: path.resolve('./js/'),
filename: "bundle.js",
publicPath: 'http://localhost:3000/js/',
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loaders: [
"react-hot",
"babel?presets[]=react&presets[]=es2015&plugins[]=transform-class-properties&plugins[]=transform-object-rest-spread"
]
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
],
resolve: {
fallback: path.join(__dirname, 'node_modules'),
extensions: ['', '.js', '.jsx']
},
resolveLoader: {
fallback: [path.join(__dirname, 'node_modules')],
}
};