diff --git a/packages/ssr/Cargo.toml b/packages/ssr/Cargo.toml index d1f460c8f6..1450bd46e7 100644 --- a/packages/ssr/Cargo.toml +++ b/packages/ssr/Cargo.toml @@ -17,7 +17,7 @@ rustc-hash = "1.1.0" lru = "0.10.0" log = "0.4.13" http = "0.2.9" -tokio = { version = "1.28", features = ["full"] } +tokio = { version = "1.28", features = ["full"], optional = true } [dev-dependencies] dioxus = { workspace = true } @@ -29,3 +29,7 @@ argh = "0.1.4" serde = "1.0.120" serde_json = "1.0.61" fs_extra = "1.2.0" + +[features] +default = ["incremental"] +incremental = ["dep:tokio"] diff --git a/packages/ssr/src/lib.rs b/packages/ssr/src/lib.rs index 0f91e02d97..45e3f59ea8 100644 --- a/packages/ssr/src/lib.rs +++ b/packages/ssr/src/lib.rs @@ -3,8 +3,11 @@ mod cache; pub mod config; mod fs_cache; +#[cfg(feature = "incremental")] pub mod incremental; +#[cfg(feature = "incremental")] mod incremental_cfg; + pub mod renderer; pub mod template;