Skip to content
This repository was archived by the owner on Sep 25, 2024. It is now read-only.

Commit e94eb61

Browse files
committed
fix(css-module): correct condition for aliasKey existence
The condition for the existence of aliasKey was incorrect. It was checking for null when it should have been checking for not null. This commit corrects that condition, ensuring the correct behavior when aliasKey exists.
1 parent c4d1355 commit e94eb61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/css-module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export async function getCssModuleImports(
3737
}
3838

3939
const aliasKey = Object.keys(aliases).find(a => specifier.startsWith(a));
40-
if (aliasKey == null) {
40+
if (aliasKey != null) {
4141
const s = new MagicString(specifier);
4242
s.overwrite(0, specifier.length, specifier);
4343
return { path: s.toString(), defaultImport, imp };

0 commit comments

Comments
 (0)