-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
36 lines (35 loc) · 906 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
var webpack = require('webpack'),
port = 8080,
config = {
entry: [
'webpack-dev-server/client?http://localhost:' + port,
'webpack/hot/only-dev-server',
'./index.js'
],
output: {
path: __dirname + '/dist',
filename: 'app.js'
},
module: {
loaders: [
{test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'}
]
},
resolve: {
extensions: ['', '.js']
},
devtool: 'source-map',
plugins: [
new webpack.HotModuleReplacementPlugin()
],
devServer: {
port: port,
info: false,
historyApiFallback: true,
hot: true,
contentBase: '.',
host: '0.0.0.0'
},
bail: true
};
module.exports = config;