From d924d900456e8a5c612da9a092a78c67391f4aff Mon Sep 17 00:00:00 2001 From: Nick Van Doorn Date: Mon, 3 Jul 2017 22:21:12 -0700 Subject: Minify css in production --- config/webpack.config.js | 10 ++++++++-- 1 file 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]' -- cgit v1.2.3