-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.dist.config.js
38 lines (36 loc) · 960 Bytes
/
webpack.dist.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
var webpack = require('webpack');
var autoprefixer = require('autoprefixer');
module.exports = {
entry: __dirname + '/client/src/index.jsx',
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel'
},{
test: /\.scss?$/,
exclude: /node_modules/,
loader: 'style!css!postcss!sass'
}]
},
resolve: {
extensions: ['', '.js', '.jsx']
},
output: {
path: './client/public/js',
filename: 'app-bundle.js'
},
devtool: 'source-map',
postcss: function() {
return [autoprefixer({ browsers: ['last 3 versions'] })];
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production')
}
}),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin()
]
};