From 78d8e1243d2c65bf660868742bac323c858ecfbc Mon Sep 17 00:00:00 2001 From: Ethan Girouard Date: Thu, 16 May 2024 18:42:03 -0400 Subject: [PATCH] Remove csr feature --- Cargo.toml | 1 - src/main.rs | 17 +---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 52ad1ad..a21b408 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" } [features] -csr = ["leptos/csr", "leptos_meta/csr", "leptos_router/csr"] hydrate = ["leptos/hydrate", "leptos_meta/hydrate", "leptos_router/hydrate"] ssr = [ "dep:leptos_axum", diff --git a/src/main.rs b/src/main.rs index e647089..d0eed6f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -72,24 +72,9 @@ async fn main() { 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() { // no client-side main function // unless we want this to work with e.g., Trunk for pure client-side testing // 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); }