diff --git a/leptos_dom/Cargo.toml b/leptos_dom/Cargo.toml index 51a2dce056..1c2a7fd1fa 100644 --- a/leptos_dom/Cargo.toml +++ b/leptos_dom/Cargo.toml @@ -172,7 +172,8 @@ ssr = ["leptos_reactive/ssr"] nightly = ["leptos_reactive/nightly"] nonce = ["dep:base64", "dep:getrandom", "dep:rand"] experimental-islands = ["leptos_reactive/experimental-islands"] +trace-component-props = [] [package.metadata.cargo-all-features] -denylist = ["nightly"] +denylist = ["nightly", "trace-component-props"] skip_feature_sets = [["web", "ssr"]] diff --git a/leptos_dom/src/macro_helpers/mod.rs b/leptos_dom/src/macro_helpers/mod.rs index a032f95bad..1508af9e3c 100644 --- a/leptos_dom/src/macro_helpers/mod.rs +++ b/leptos_dom/src/macro_helpers/mod.rs @@ -2,6 +2,7 @@ mod into_attribute; mod into_class; mod into_property; mod into_style; +#[cfg(feature = "trace-component-props")] #[doc(hidden)] pub mod tracing_property; pub use into_attribute::*; diff --git a/leptos_macro/Cargo.toml b/leptos_macro/Cargo.toml index 0618fc215e..b6987ba718 100644 --- a/leptos_macro/Cargo.toml +++ b/leptos_macro/Cargo.toml @@ -43,7 +43,8 @@ ssr = ["server_fn_macro/ssr"] nightly = ["server_fn_macro/nightly"] tracing = [] experimental-islands = [] +trace-component-props = [] [package.metadata.cargo-all-features] -denylist = ["nightly", "tracing"] +denylist = ["nightly", "tracing", "trace-component-props"] skip_feature_sets = [["csr", "hydrate"], ["hydrate", "csr"], ["hydrate", "ssr"]] diff --git a/leptos_macro/src/component.rs b/leptos_macro/src/component.rs index a713a6da72..496a66104e 100644 --- a/leptos_macro/src/component.rs +++ b/leptos_macro/src/component.rs @@ -203,7 +203,7 @@ impl ToTokens for Model { #[cfg(debug_assertions)] let _guard = span.entered(); }, - if no_props { + if no_props || !cfg!(feature = "trace-component-props") { quote! {} } else { quote! {