diff --git a/identity_core/Cargo.toml b/identity_core/Cargo.toml index f8aa615b28..239383c2f6 100644 --- a/identity_core/Cargo.toml +++ b/identity_core/Cargo.toml @@ -21,8 +21,8 @@ time = { version = "0.3.23", default-features = false, features = ["std", "serde url = { version = "2.4", default-features = false, features = ["serde"] } zeroize = { version = "1.6", default-features = false } -[target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi"), not(feature = "custom_time")))'.dependencies] -js-sys = { version = "0.3.55", default-features = false } +[target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dependencies] +js-sys = { version = "0.3.55", default-features = false, optional = true } [dev-dependencies] proptest = { version = "1.0.0" } @@ -39,6 +39,7 @@ rustdoc-args = ["--cfg", "docsrs"] workspace = true [features] +default = ["dep:js-sys"] # Enables a macro to provide a custom time (Timestamp::now_utc) implementation, see src/custom_time.rs custom_time = []