-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.dev.config.js
41 lines (40 loc) · 1.15 KB
/
webpack.dev.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');
var commonConfig = require('./webpack.common.config');
module.exports = Object.assign(commonConfig, {
debug: false,
devtool: 'source-map',
entry: [
'webpack-dev-server/client?http://0.0.0.0:3000', // WebpackDevServer host and port
'webpack/hot/only-dev-server', // "only" prevents reload on syntax errors
'./src/main.js'
],
module: {
preLoaders: [
{
test: /\.jsx?$/,
loader: "eslint-loader",
exclude: /node_modules/,
},
],
loaders: [
{
test: /.jsx?$/,
loader: 'react-hot',
exclude: /node_modules/
},
{
test: /.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
plugins: ["transform-class-properties"],
presets: ['es2015', 'react', 'react-hmre']
}
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin()
]
});