Skip to content

Commit 369e362

Browse files
clessggajus
authored andcommitted
feat: improve error messages (#21)
1 parent c943de3 commit 369e362

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/getClassName.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ const getClassNameForNamespacedStyleName = (styleName: string, styleModuleImport
2222
}
2323

2424
if (!styleModuleImportMap[importName]) {
25-
throw new Error('Import does not exist.');
25+
throw new Error('CSS module import does not exist.');
2626
}
2727

2828
if (!styleModuleImportMap[importName][moduleName]) {
29-
throw new Error('Module does not exist.');
29+
throw new Error('CSS module does not exist.');
3030
}
3131

3232
return styleModuleImportMap[importName][moduleName];
@@ -53,7 +53,7 @@ export default (styleNameValue: string, styleModuleImportMap: StyleModuleImportM
5353
const styleModuleMap: StyleModuleMapType = styleModuleImportMap[styleModuleImportMapKeys[0]];
5454

5555
if (!styleModuleMap[styleName]) {
56-
throw new Error('Module cannot be resolved.');
56+
throw new Error('CSS module cannot be resolved.');
5757
}
5858

5959
return styleModuleMap[styleName];

0 commit comments

Comments
 (0)