Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
config.module.rules.filter(cssLoaderFinder).forEach((rule) => {
const isCssModuleRule = !rule.test.test('module.css');
const scssExclude = [paths.appBuild];
let scssTest = /\.s[ac]ss$/;
if (isCssModuleRule) {
scssTest = /\.module\.s[ac]ss$/;
} else {
scssExclude.push(/\.module\.s[ac]ss$/);
}
// Use default configs
config.module.rules.push({
test: scssTest,
exclude: scssExclude,
use: [
...rule.use,
scssLoader,
]
});
browsers: ['>1%', 'last 4 versions', 'Firefox ESR', 'not ie < 9'],
flexbox: 'no-2009',
}),
],
},
sass: {
dev: {
sourceMap: true,
includePaths: [paths.appNodeModules],
},
prod: {
// XXX Source maps are required for the resolve-url-loader to properly
// function. Disable them in later stages if you do not want source maps.
sourceMap: true,
sourceMapContents: false,
includePaths: [paths.appNodeModules],
},
},
css: {
dev: {
sourceMap: true,
importLoaders: 1,
modules: false,
},
prod: {
sourceMap: false,
importLoaders: 1,
modules: false,
minimize: true,
},
},
style: {},