feat: add base app
This commit is contained in:
18
crates/frontend/Cargo.toml
Normal file
18
crates/frontend/Cargo.toml
Normal file
@@ -0,0 +1,18 @@
|
||||
[package]
|
||||
name = "frontend"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
app = { path = "../app", default-features = false, features = ["hydrate"] }
|
||||
leptos = { workspace = true, features = [ "hydrate" ] }
|
||||
|
||||
console_error_panic_hook.workspace = true
|
||||
console_log.workspace = true
|
||||
log.workspace = true
|
||||
wasm-bindgen.workspace = true
|
10
crates/frontend/src/lib.rs
Normal file
10
crates/frontend/src/lib.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
#[wasm_bindgen::prelude::wasm_bindgen]
|
||||
pub fn hydrate() {
|
||||
use app::*;
|
||||
|
||||
// initializes logging using the `log` crate
|
||||
_ = console_log::init_with_level(log::Level::Debug);
|
||||
console_error_panic_hook::set_once();
|
||||
|
||||
leptos::mount::hydrate_body(App);
|
||||
}
|
Reference in New Issue
Block a user