Forráskód Böngészése

Make incremental a cfg feature. (#1409)

* Make incremental a cfg feature.

* Make the incremental feature default.
Jay Graves 1 éve
szülő
commit
392c744ad1
2 módosított fájl, 8 hozzáadás és 1 törlés
  1. 5 1
      packages/ssr/Cargo.toml
  2. 3 0
      packages/ssr/src/lib.rs

+ 5 - 1
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"]

+ 3 - 0
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;