/
webpack.config.js
34 lines (31 loc) · 864 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
var webpack = require('webpack');
var autoprefixer = require('autoprefixer-core');
var csswring = require('csswring');
module.exports = {
entry: [
'webpack/hot/only-dev-server',
"./src/js/app.js"
],
output: {
path: __dirname + '/build',
filename: "bundle.js"
},
module: {
loaders: [
{ test: /\.jsx$/, loaders: ['react-hot', 'babel?stage=0']},
{ test: /\.js?$/, loaders: ['react-hot', 'babel-loader?stage=0'], exclude: /node_modules/ },
{ test: /\.scss$/, loader: "style!css!postcss-loader!sass" },
{ test: /\.(jpe?g|png|gif|svg|ico|cur)$/i, loader: 'file-loader?name=images/[name].[ext]'}
]
},
plugins: [
new webpack.NoErrorsPlugin()
],
resolve: {
extensions: ['', '.js', '.jsx']
},
devtool: '#source-map',
postcss: function () {
return [autoprefixer, csswring]
}
};