fix(build): isolate hydrate feature to wasm32 target and prevent SSR spawn_local panic
This commit is contained in:
1 parent
b43b060c8a
commit
6a157a2eca
4 files changed
+74
-4
No files matched your search
+1
-1
@@ -6,7 +6,7 @@ version.workspace = true
|
||||
[lib]
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
|
||||
[dependencies]
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
app = { workspace = true, features = ["hydrate"] }
|
||||
leptos = { workspace = true, features = ["hydrate"] }
|
||||
console_error_panic_hook = { workspace = true }
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
#[wasm_bindgen::prelude::wasm_bindgen]
|
||||
pub fn hydrate() {
|
||||
console_error_panic_hook::set_once();
|
||||
|
||||
Reference in new issue
Block a user