Merge pull request #2078 from knowler/enable-sass-comments

Enable Sass comments and run prefixing before minification
This commit is contained in:
Ben Word
2018-06-11 11:05:12 -06:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@@ -8,8 +8,8 @@ module.exports = ({ file, options }) => {
return {
parser: options.enabled.optimize ? 'postcss-safe-parser' : undefined,
plugins: {
cssnano: options.enabled.optimize ? cssnanoConfig : false,
autoprefixer: true,
cssnano: options.enabled.optimize ? cssnanoConfig : false,
},
};
};

View File

@@ -89,7 +89,12 @@ let webpackConfig = {
},
},
{ loader: 'resolve-url', options: { sourceMap: config.enabled.sourceMaps } },
{ loader: 'sass', options: { sourceMap: config.enabled.sourceMaps } },
{
loader: 'sass', options: {
sourceMap: config.enabled.sourceMaps,
sourceComments: true,
},
},
],
}),
},