Skip to content

Commit 0a294c8

Browse files
committed
bug #639 bug #638 sass-loader should not do css minification (wimhendrikx)
This PR was squashed before being merged into the master branch (closes #639). Discussion ---------- bug #638 sass-loader should not do css minification Fixes a BC break from the sass-loader minifying the CSS which is already done with mini-css-extract-plugin. I chose to use outputStyle 'expanded' so it's also compatible with Dart Sass. Commits ------- f55fb90 Adapt test for new sass-loader config ae5fea1 bug #638 sass-loader should not do css minification
2 parents 8360f1c + f55fb90 commit 0a294c8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/loaders/sass.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ module.exports = {
4141

4242
const config = Object.assign({}, {
4343
// needed by the resolve-url-loader
44-
sourceMap: (true === webpackConfig.sassOptions.resolveUrlLoader) || webpackConfig.useSourceMaps
44+
sourceMap: (true === webpackConfig.sassOptions.resolveUrlLoader) || webpackConfig.useSourceMaps,
45+
// CSS minification is handled with mini-css-extract-plugin
46+
outputStyle: 'expanded'
4547
});
4648

4749
sassLoaders.push({

test/loaders/sass.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ describe('loaders/sass', () => {
120120

121121
expect(actualLoaders[1].options).to.deep.equals({
122122
sourceMap: true,
123+
outputStyle: 'expanded',
123124
custom_optiona: 'baz',
124125
other_option: true
125126
});

0 commit comments

Comments
 (0)