-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack-dev-server.config.js
More file actions
41 lines (40 loc) · 962 Bytes
/
webpack-dev-server.config.js
File metadata and controls
41 lines (40 loc) · 962 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
38
39
40
41
var HtmlWebpackPlugin = require('html-webpack-plugin');
var webpack = require('webpack');
module.exports = {
entry: './src/index.js',
output: {
path: './dist',
filename: 'bundle.js'
},
resolve: {
extensions: ['', '.js']
},
devServer: {
contentBase: './build',
outputPath: './build',
devtool: 'eval',
hot: true,
inline: true,
port: 15566,
host: '0.0.0.0'
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules)/,
loaders: ['babel'] // 'babel-loader' is also a legal name to reference
},
{
test: /\.css$/,
loaders: ['style', 'css']
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new HtmlWebpackPlugin({
template: 'index.html'
})
]
};