Skip to content

Commit

Permalink
bug #639 bug #638 sass-loader should not do css minification (wimhend…
Browse files Browse the repository at this point in the history
…rikx)

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
  • Loading branch information
weaverryan committed Oct 7, 2019
2 parents 8360f1c + f55fb90 commit 0a294c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/loaders/sass.js
Expand Up @@ -41,7 +41,9 @@ module.exports = {

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

sassLoaders.push({
Expand Down
1 change: 1 addition & 0 deletions test/loaders/sass.js
Expand Up @@ -120,6 +120,7 @@ describe('loaders/sass', () => {

expect(actualLoaders[1].options).to.deep.equals({
sourceMap: true,
outputStyle: 'expanded',
custom_optiona: 'baz',
other_option: true
});
Expand Down

0 comments on commit 0a294c8

Please sign in to comment.