Skip to content

Commit

Permalink
Minimize css assets in production (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
gauravtiwari authored and dhh committed Apr 4, 2017
1 parent 36f1300 commit 9d4cb99
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/install/config/loaders/core/sass.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const { env } = require('../configuration.js')

module.exports = {
test: /\.(scss|sass|css)$/i,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader', 'postcss-loader', 'sass-loader']
use: [
{ loader: 'css-loader', options: { minimize: env.NODE_ENV === 'production' } },
'postcss-loader',
'sass-loader'
]
})
}

0 comments on commit 9d4cb99

Please sign in to comment.