-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
46 lines (44 loc) · 1.12 KB
/
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
40
41
42
43
44
45
46
var webpack = require('webpack');
var autoprefixer = require('autoprefixer');
module.exports = {
entry: [
'webpack-dev-server/client?http://localhost:8080',
'webpack/hot/only-dev-server',
__dirname + '/client/src/index.jsx'
],
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'react-hot!babel'
},{
test: /\.scss?$/,
exclude: /node_modules/,
loader: 'style!css!postcss!sass'
}]
},
resolve: {
extensions: ['', '.js', '.jsx']
},
output: {
path: './client/public/js',
publicPath: '/js/',
filename: 'app-bundle.js'
},
devtool: 'cheap-eval-sourcemaps',
devServer: {
contentBase: './client/public',
port: 8000,
keepAlive: true,
historyApiFallback: true,
progress: true,
watch: true,
hot: true
},
postcss: function() {
return [autoprefixer({ browsers: ['last 3 versions'] })];
},
plugins: [
new webpack.HotModuleReplacementPlugin()
]
};