From 9a52f7a110e4f22396f52f3cad2d1270d6a690e9 Mon Sep 17 00:00:00 2001 From: mattcompiles Date: Wed, 19 Mar 2025 19:57:38 +1100 Subject: [PATCH] Fix invalid CSS module export name --- src/css_modules.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/css_modules.rs b/src/css_modules.rs index ce7008df..735698cf 100644 --- a/src/css_modules.rs +++ b/src/css_modules.rs @@ -540,7 +540,7 @@ pub(crate) fn hash(s: &str, at_start: bool) -> String { let hash = hasher.finish() as u32; let hash = ENCODER.encode(&hash.to_le_bytes()); - if at_start && matches!(hash.as_bytes()[0], b'0'..=b'9') { + if at_start && matches!(hash.as_bytes()[0], b'0'..=b'9' | b'-') { format!("_{}", hash) } else { hash