SASS loader: Do not print warnings from dependencies

This commit is contained in:
Jean-Baptiste Bellet
2023-04-14 11:09:39 +02:00
parent 29b9777a96
commit 6bf21d2abd

View File

@@ -17,7 +17,19 @@ function hotfixPostcssLoaderConfig (subloader) {
}
}
function addQuietDepsToSassLoader (subloader) {
if (subloader.loader === 'sass-loader') {
subloader.options.sassOptions = {
...subloader.options.sassOptions,
quietDeps: true
}
}
}
environment.loaders.keys().forEach(loaderName => {
const loader = environment.loaders.get(loaderName);
if (loaderName === 'sass') {
loader.use.forEach(addQuietDepsToSassLoader);
}
loader.use.forEach(hotfixPostcssLoaderConfig);
});