forked from nightwolfdu/testReactGauge
-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
39 lines (38 loc) · 1004 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
const path = require('path');
const webpack = require('webpack');
const precss = require('precss');
const autoprefixer = require('autoprefixer');
module.exports = {
devtool: 'eval-source-map',
entry: [
'webpack-dev-server/client?http://localhost:8080',
'webpack/hot/only-dev-server',
'./demo/index.js'
],
output: {
filename: './bundle/bundle.js'
},
module: {
loaders: [
{
test: /\.js?$/,
loaders: ['react-hot', 'babel'],
include: [path.join(__dirname, 'src'), path.join(__dirname, 'demo')]
},
{
test: /\.css$/,
loader: 'style-loader!css-loader!postcss-loader'
}
]
},
postcss: [precss, autoprefixer],
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
devServer: {
hot: true,
inline: true,
port: 8080
}
};