breaking: gate 'styly!(const scope...' behind the const-scoping feature.\nFor some reason it did only become a problem recently, but it appears that having lightningcss/grass unconditionally will break WASM builds by having getrandom dependency

This commit is contained in:
yiffyrusdev 2025-05-08 19:42:06 +05:00 • committed by spushk
commit f3db6c1038
Signed by: spushk
GPG key ID: 7797B761E105E8AA

View file

@ -1,15 +1,14 @@
use base64::Engine;
use crate::config::SabryHashConfig;
use super::{apply_basic_rusty_member_gen_rules, ArbitraryScope};
/// Convenience wrapper for String-being-a-hash
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct ScopeHash(String);
impl ScopeHash {
pub fn new(scope: &ArbitraryScope, config: &SabryHashConfig) -> Self {
#[cfg(feature = "scope")]
pub fn new(scope: &super::ArbitraryScope, config: &crate::config::SabryHashConfig) -> Self {
use base64::Engine;
use crate::scoper::apply_basic_rusty_member_gen_rules;
let mut hasher = blake3::Hasher::new();
if config.use_scope_name {