Skip to content

Commit 88edce3

Browse files
committed
Merge pull request kriasoft#488 from frenzzy/css-discard-comments
2 parents 6cc0f77 + abf7895 commit 88edce3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tools/webpack.config.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,16 @@ const config = {
7676
test: /\.scss$/,
7777
loaders: [
7878
'isomorphic-style-loader',
79-
`css-loader?${DEBUG ? 'sourceMap&' : 'minimize&'}modules&localIdentName=` +
80-
`${DEBUG ? '[name]_[local]_[hash:base64:3]' : '[hash:base64:4]'}`,
79+
`css-loader?${JSON.stringify({
80+
sourceMap: DEBUG,
81+
82+
// CSS Modules https://github.com/css-modules/css-modules
83+
modules: true,
84+
localIdentName: DEBUG ? '[name]_[local]_[hash:base64:3]' : '[hash:base64:4]',
85+
86+
// CSS Nano http://cssnano.co/options/
87+
minimize: !DEBUG,
88+
})}`,
8189
'postcss-loader?parser=postcss-scss',
8290
],
8391
}, {

0 commit comments

Comments
 (0)