-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.production.babel.js
48 lines (45 loc) · 1.06 KB
/
webpack.config.production.babel.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
47
48
/* eslint strict: 0 */
"use strict";
import webpack from 'webpack';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
import baseConfig from './webpack.config.base.babel.js';
import autoprefixer from 'autoprefixer';
let config = {
...baseConfig,
devtool: 'source-map',
entry: [
'./src/main'
],
plugins: [
...baseConfig.plugins,
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({
compressor: {
screw_ie8: true,
warnings: false
}
}),
new ExtractTextPlugin('style.css', {allChunks: true})
],
module: {
...baseConfig.module,
loaders: [
...baseConfig.module.loaders,
{
test: /\.css?$/,
exclude: /\/src\/styles\/~bootstrap-sass\//,
loaders: ExtractTextPlugin.extract('style-loader', 'raw'),
include: __dirname
},
{
test: /\.scss$/,
exclude: /~bootstrap-sass/,
loader: ExtractTextPlugin.extract('style-loader', ['css-loader', 'sass-loader', 'postcss-loader?parser=postcss-scss'])
}
]
},
postcss: function () {
return [autoprefixer];
}
};
export default config;