Category
Expected or Desired Behavior
When SASS partial files in SPFx will be used there should not get a warning issued that the filename should end with module.scss.
The message and warning are not appropriate.
Observed Behavior
When a partial SASS file in SPFx gets used and saved the following message on the console gets issued.

This is caused because one of the SASS files in the project uses an underscore as the first character in the file name a clear indication that this is a partial file that shouldn't get compiled by SASS.

On the other hand when the file is named _quicklink.module.scss this breaks the default SASS rules that files with an under should not get compiled. In addition, the file needs to be imported like this @import 'quicklinks.module' to have a single style object for the web part. White the compiled CSS file, Type Definitons and map file will never get used at all but will be packaged.
In general, the rule that causes this issue should be modified to get raised only on files that are named like quicklinks.scss but shouldn't get raised for files that start with _quicklinks.scss.
Steps to reproduce
Test 1
- Create new web part project
- add a file named
_testfile.scss
- add ```import 'testfile'````to the main web part CSS.
- Check web part folder in lib directory
- Styles should be included in the main web part CSS file
Checks
- Style Type definitions should include the imported CSS
- Style Object should include the imported classes defined in partial
- During compilation issue get raised all the time
Test 2
- Create new web part project
- add a file named
_testfile.module.scss
- add ```import 'testfile.module'````to the main web part CSS.
- Check web part folder in lib directory
- Styles should be included in the main web part CSS file + additional files
** testfile.modules.scss.d.ts
** testfile.modules.scss.js
** testfile.modules.scss.d.map
will be generated in the lib folder
- Style Type definitions should include the imported CSS
- Style Object should include the imported classes defined in partial
- No issues gets raise but the mentioned files above never need to be used because everything is already included
Category
Expected or Desired Behavior
When SASS partial files in SPFx will be used there should not get a warning issued that the filename should end with
module.scss.The message and warning are not appropriate.
Observed Behavior
When a partial SASS file in SPFx gets used and saved the following message on the console gets issued.
This is caused because one of the SASS files in the project uses an underscore as the first character in the file name a clear indication that this is a partial file that shouldn't get compiled by SASS.
On the other hand when the file is named
_quicklink.module.scssthis breaks the default SASS rules that files with an under should not get compiled. In addition, the file needs to be imported like this@import 'quicklinks.module'to have a single style object for the web part. White the compiled CSS file, Type Definitons and map file will never get used at all but will be packaged.In general, the rule that causes this issue should be modified to get raised only on files that are named like
quicklinks.scssbut shouldn't get raised for files that start with_quicklinks.scss.Steps to reproduce
Test 1
_testfile.scssChecks
Test 2
_testfile.module.scss** testfile.modules.scss.d.ts
** testfile.modules.scss.js
** testfile.modules.scss.d.map
will be generated in the lib folder