diff options
author | Nick Van Doorn <vandoorn.nick@gmail.com> | 2017-07-03 22:21:12 -0700 |
---|---|---|
committer | Nick Van Doorn <vandoorn.nick@gmail.com> | 2017-07-03 22:21:12 -0700 |
commit | d924d900456e8a5c612da9a092a78c67391f4aff (patch) | |
tree | 92735b7850a9f1ac70c6d53c554341ea6c5bac96 /config | |
parent | 7c1ea97559fb367ad9e7008cd7525c4dec334bf5 (diff) |
Minify css in production
Diffstat (limited to 'config')
-rw-r--r-- | config/webpack.config.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js index 5d37265..7573c1d 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -54,7 +54,12 @@ module.exports = { test: /\.css$/, // load css libs without css modules or postcss include: [NODE_PATH, FONT_PATH], use: ExtractTextPlugin.extract({ - use: ['css-loader'] + use: [{ + loader: 'css-loader', + options: { + minimize: isProduction + } + }] }) }, { @@ -63,7 +68,8 @@ module.exports = { use: ExtractTextPlugin.extract({ use: [{ loader: 'css-loader', - query: { + options: { + minimize: isProduction, modules: true, importLoaders: 1, localIdentName: '[name]__[local]___[hash:base64:5]' |