@@ -18,15 +18,31 @@ const getClassNameForNamespacedStyleName = (styleName: string, styleModuleImport
18
18
const moduleName = styleNameParts [ 1 ] ;
19
19
20
20
if ( ! moduleName ) {
21
+ // eslint-disable-next-line no-console
22
+ console . log ( {
23
+ moduleName
24
+ } ) ;
25
+
21
26
throw new Error ( 'Invalid style name.' ) ;
22
27
}
23
28
24
29
if ( ! styleModuleImportMap [ importName ] ) {
25
- throw new Error ( 'CSS module import,' + importName + ', does not exist.' ) ;
30
+ // eslint-disable-next-line no-console
31
+ console . log ( {
32
+ importName
33
+ } ) ;
34
+
35
+ throw new Error ( 'CSS module import does not exist.' ) ;
26
36
}
27
37
28
38
if ( ! styleModuleImportMap [ importName ] [ moduleName ] ) {
29
- throw new Error ( 'CSS module,' + moduleName + ', does not exist in import, ' + importName + '.' ) ;
39
+ // eslint-disable-next-line no-console
40
+ console . log ( {
41
+ importName,
42
+ moduleName
43
+ } ) ;
44
+
45
+ throw new Error ( 'CSS module does not exist.' ) ;
30
46
}
31
47
32
48
return styleModuleImportMap [ importName ] [ moduleName ] ;
@@ -56,7 +72,12 @@ export default (styleNameValue: string, styleModuleImportMap: StyleModuleImportM
56
72
const styleModuleMap : StyleModuleMapType = styleModuleImportMap [ styleModuleImportMapKeys [ 0 ] ] ;
57
73
58
74
if ( ! styleModuleMap [ styleName ] ) {
59
- throw new Error ( 'Could not resolve the styleName \'' + styleName + '\'.' ) ;
75
+ // eslint-disable-next-line no-console
76
+ console . log ( {
77
+ styleName
78
+ } ) ;
79
+
80
+ throw new Error ( 'Could not resolve a styleName.' ) ;
60
81
}
61
82
62
83
return styleModuleMap [ styleName ] ;
0 commit comments