-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathwebpack.config.js
More file actions
37 lines (35 loc) · 817 Bytes
/
webpack.config.js
File metadata and controls
37 lines (35 loc) · 817 Bytes
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
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var HTMLWebpackPluginConfig = new HtmlWebpackPlugin({
template: __dirname + '/app/index.html',
hash: true,
filename: 'index.html',
inject: 'body'
});
var HotReloader = new webpack.HotModuleReplacementPlugin();
module.exports = {
devtool: 'source-map',
entry: [
'webpack-dev-server/client?http://localhost:8080',
'webpack/hot/dev-server',
'./app/App.js'
],
output: {
path: 'dist',
filename: 'index_bundle.js',
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'react-hot!babel',
include: __dirname + '/app'
},
]
},
plugins: [HTMLWebpackPluginConfig, HotReloader],
devServer: {
contentBase: __dirname + '/dist',
hot: true,
}
};