Remove csr feature

This commit is contained in:
Ethan Girouard 2024-05-16 18:42:03 -04:00
parent 60ad643669
commit 78d8e1243d
Signed by: eta357
GPG Key ID: 7BCDC36DFD11C146
2 changed files with 1 additions and 17 deletions

View File

@ -43,7 +43,6 @@ flexi_logger = { version = "0.28.0", optional = true, default-features = false }
gloo-net = { git = "https://github.com/rustwasm/gloo.git", rev = "a823fab7ecc4068e9a28bd669da5eaf3f0a56380" } gloo-net = { git = "https://github.com/rustwasm/gloo.git", rev = "a823fab7ecc4068e9a28bd669da5eaf3f0a56380" }
[features] [features]
csr = ["leptos/csr", "leptos_meta/csr", "leptos_router/csr"]
hydrate = ["leptos/hydrate", "leptos_meta/hydrate", "leptos_router/hydrate"] hydrate = ["leptos/hydrate", "leptos_meta/hydrate", "leptos_router/hydrate"]
ssr = [ ssr = [
"dep:leptos_axum", "dep:leptos_axum",

View File

@ -72,24 +72,9 @@ async fn main() {
axum::serve(listener, app.into_make_service()).await.expect("Server failed"); axum::serve(listener, app.into_make_service()).await.expect("Server failed");
} }
#[cfg(not(any(feature = "ssr", feature = "csr")))] #[cfg(not(feature = "ssr"))]
pub fn main() { pub fn main() {
// no client-side main function // no client-side main function
// unless we want this to work with e.g., Trunk for pure client-side testing // unless we want this to work with e.g., Trunk for pure client-side testing
// see lib.rs for hydration function instead // see lib.rs for hydration function instead
// see optional feature `csr` instead
}
#[cfg(all(not(feature = "ssr"), feature = "csr"))]
pub fn main() {
// a client-side main function is required for using `trunk serve`
// prefer using `cargo leptos serve` instead
// to run: `trunk serve --open --features csr`
use leptos::*;
use libretunes::app::*;
use wasm_bindgen::prelude::wasm_bindgen;
console_error_panic_hook::set_once();
leptos::mount_to_body(App);
} }