pub export server is either from leptos_macro or leptos_spin_macro depending on if spin feature is enabled. (#2280)

* leptos spin server macro

* leptos spin

* git chng

* based on the fermyon official git for when that works
This commit is contained in:
Sam Judelson 2024-02-15 17:37:19 -05:00 committed by GitHub
parent 0658a550b0
commit e33ee7ec99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 2 deletions

View File

@ -15,6 +15,7 @@ leptos_macro = { workspace = true }
leptos_reactive = { workspace = true }
leptos_server = { workspace = true }
leptos_config = { workspace = true }
leptos-spin-macro = { git = "https://github.com/fermyon/leptos-spin", optional = true}
tracing = "0.1"
typed-builder = "0.18"
typed-builder-macro = "0.18"
@ -66,7 +67,10 @@ miniserde = ["leptos_reactive/miniserde"]
rkyv = ["leptos_reactive/rkyv"]
tracing = ["leptos_macro/tracing"]
nonce = ["leptos_dom/nonce"]
spin = ["leptos_reactive/spin"]
spin = [
"leptos_reactive/spin",
"leptos-spin-macro"
]
experimental-islands = [
"leptos_dom/experimental-islands",
"leptos_macro/experimental-islands",

View File

@ -179,7 +179,14 @@ pub mod error {
pub use leptos_macro::template;
#[cfg(not(all(target_arch = "wasm32", feature = "template_macro")))]
pub use leptos_macro::view as template;
pub use leptos_macro::{component, island, server, slice, slot, view, Params};
pub use leptos_macro::{component, island, slice, slot, view, Params};
cfg_if::cfg_if!(
if #[cfg(feature="spin")] {
pub use leptos_spin_macro::server;
} else {
pub use leptos_macro::server;
}
);
pub use leptos_reactive::*;
pub use leptos_server::{
self, create_action, create_multi_action, create_server_action,