Skip to content

Commit e3366cb

Browse files
justin808claude
andcommitted
Fix SCSS detection to match both .scss and .module.scss files
Updated the rule detection to test against both 'example.scss' and 'example.module.scss' so sass-resources-loader is applied to both global SCSS rules and CSS Module SCSS rules. This fixes test failures where CSS Modules weren't being processed correctly because the detection only matched regular .scss files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent dee2edf commit e3366cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/dummy/config/webpack/commonWebpackConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const sassLoaderConfig = {
2525
baseClientWebpackConfig.module.rules.forEach((rule) => {
2626
if (Array.isArray(rule.use)) {
2727
// Add sass-resources-loader to all SCSS rules (both .scss and .module.scss)
28-
if (rule.test && rule.test.test('example.scss')) {
28+
if (rule.test && (rule.test.test('example.scss') || rule.test.test('example.module.scss'))) {
2929
rule.use.push(sassLoaderConfig);
3030
}
3131

0 commit comments

Comments
 (0)