Skip to content

Commit 9a52f7a

Browse files
committed
Fix invalid CSS module export name
1 parent 80eb861 commit 9a52f7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/css_modules.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ pub(crate) fn hash(s: &str, at_start: bool) -> String {
540540
let hash = hasher.finish() as u32;
541541

542542
let hash = ENCODER.encode(&hash.to_le_bytes());
543-
if at_start && matches!(hash.as_bytes()[0], b'0'..=b'9') {
543+
if at_start && matches!(hash.as_bytes()[0], b'0'..=b'9' | b'-') {
544544
format!("_{}", hash)
545545
} else {
546546
hash

0 commit comments

Comments
 (0)