Skip to content

Commit

Permalink
update webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
yangquan committed Nov 2, 2017
1 parent 1514060 commit ca98068
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
var CopyWebpackPlugin = require('copy-webpack-plugin');

var isProd = process.env.NODE_ENV === 'production';
var cssLoader = isProd ? ExtractTextPlugin.extract('css-loader') : ['style-loader', 'css-loader', 'sass-loader'];
var cssLoader = isProd ? ExtractTextPlugin.extract('css-loader!sass-loader') : ['style-loader', 'css-loader', 'sass-loader'];


var path = require('path');
Expand Down Expand Up @@ -60,13 +60,9 @@ var config = {
};

if (isProd) {
config.devtool = '#source-map';
config.plugins.push(
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new webpack.optimize.DedupePlugin(),

new ExtractTextPlugin('app.[hash:8].css', {allChunks: true})
);
}
Expand Down

0 comments on commit ca98068

Please sign in to comment.