-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.dev.js
33 lines (32 loc) · 998 Bytes
/
webpack.config.dev.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
var webpack = require('webpack');
var path = require('path');
var precss = require('precss');
var autoprefixer = require('autoprefixer');
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: [
'webpack-hot-middleware/client?path=/__webpack_hmr&reload=true', //note that it reloads the page if hot module reloading fails.
'./app/index'
],
output: {
path: __dirname + '/dist', // Note: Physical files are only output by the production build task `npm run build`.
publicPath: '/',
filename: 'bundle.js'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
module: {
loaders: [
{test: /\.js$|\.jsx$/, include: path.join(__dirname, 'app'), loader: ['babel'], query:{ presets: ['es2015', 'react', 'stage-0']} },
{test: /(\.css)$/, loader: 'style!css!postcss'},
]
},
resolve: {
extensions: ['', '.js', '.jsx'],
},
postcss: function () {
return [precss, autoprefixer];
}
};