Can't disable sass warning "filename should end with module.scss"
Hi,
i am using the web-build-tools in a SPFx project. Then i added a test.scss file, so that no hashes are added to the classes i am using. In the gulp task there is now a warning displayed:
Warning - [sass] src\webparts\utilities\circleProgress.scss: filename should end with module.scss
I've tried to disable this warning by setting the config for the build task. But the default sass config is warnOnNonCSSModules: false. My Build Task looks like the following:
const gulp = require('gulp');
const build = require('@microsoft/sp-build-web');
console.log(build.sass.taskConfig);
build.sass.setConfig({ warnOnNonCSSModules: false, useCssModules:true});
build.initialize(gulp);
In the console there is the following output:
{ preamble: '/* tslint:disable */',
postamble: '/* tslint:enable */',
sassMatch: [ 'src/**/*.scss' ],
useCSSModules: false,
warnOnCssInvalidPropertyName: true,
dropCssFiles: false,
warnOnNonCSSModules: false }
How can i achieve to hide the warning? Am i using the wrong property?
I am using the SP-Build-Web 1.1.0.
Thanks
hi @nickpape-msft, that worked great, the warning is gone! Thanks for theworkaround and your help!