mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
docs: wasm-pack
instructions missing --debug
for Tailwind examples
This commit is contained in:
parent
55613c9a31
commit
708e1a5aab
2 changed files with 5 additions and 5 deletions
|
@ -80,7 +80,7 @@ This crate can be run without `cargo-leptos`, using `wasm-pack` and `cargo`. To
|
||||||
To run it as a server side app with hydration, first you should run
|
To run it as a server side app with hydration, first you should run
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
wasm-pack build --target=web --no-default-features --features=hydrate
|
wasm-pack build --target=web --debug --no-default-features --features=hydrate
|
||||||
```
|
```
|
||||||
|
|
||||||
to generate the WebAssembly to hydrate the HTML delivered from the server.
|
to generate the WebAssembly to hydrate the HTML delivered from the server.
|
||||||
|
@ -99,4 +99,4 @@ cargo run --no-default-features --features=ssr
|
||||||
You'll need to install trunk to client side render this bundle.
|
You'll need to install trunk to client side render this bundle.
|
||||||
|
|
||||||
1. `cargo install trunk`
|
1. `cargo install trunk`
|
||||||
Then the site can be served with `trunk serve --open`
|
Then the site can be served with `trunk serve --open`
|
||||||
|
|
|
@ -90,8 +90,8 @@ By default, `cargo-leptos` uses `nightly` Rust, `cargo-generate`, and `sass`. If
|
||||||
|
|
||||||
## Alternatives to cargo-leptos
|
## Alternatives to cargo-leptos
|
||||||
|
|
||||||
This crate can be run without `cargo-leptos`, using `wasm-pack` and `cargo`. To do so, you'll need to install some other tools.
|
This crate can be run without `cargo-leptos`, using `wasm-pack` and `cargo`. To do so, you'll need to install some other tools. 0. `cargo install wasm-pack`
|
||||||
0. `cargo install wasm-pack`
|
|
||||||
1. Edit the `[package.metadata.leptos]` section and set `site-root` to `"."`. You'll also want to change the path of the `<StyleSheet / >` component in the root component to point towards the CSS file in the root. This tells leptos that the WASM/JS files generated by wasm-pack are available at `./pkg` and that the CSS files are no longer processed by cargo-leptos. Building to alternative folders is not supported at this time. You'll also want to edit the call to `get_configuration()` to pass in `Some(Cargo.toml)`, so that Leptos will read the settings instead of cargo-leptos. If you do so, your file/folder names cannot include dashes.
|
1. Edit the `[package.metadata.leptos]` section and set `site-root` to `"."`. You'll also want to change the path of the `<StyleSheet / >` component in the root component to point towards the CSS file in the root. This tells leptos that the WASM/JS files generated by wasm-pack are available at `./pkg` and that the CSS files are no longer processed by cargo-leptos. Building to alternative folders is not supported at this time. You'll also want to edit the call to `get_configuration()` to pass in `Some(Cargo.toml)`, so that Leptos will read the settings instead of cargo-leptos. If you do so, your file/folder names cannot include dashes.
|
||||||
|
|
||||||
### Server Side Rendering With Hydration
|
### Server Side Rendering With Hydration
|
||||||
|
@ -99,7 +99,7 @@ This crate can be run without `cargo-leptos`, using `wasm-pack` and `cargo`. To
|
||||||
To run it as a server side app with hydration, first you should run
|
To run it as a server side app with hydration, first you should run
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
wasm-pack build --target=web --no-default-features --features=hydrate
|
wasm-pack build --target=web --debug --no-default-features --features=hydrate
|
||||||
```
|
```
|
||||||
|
|
||||||
to generate the WebAssembly to hydrate the HTML delivered from the server.
|
to generate the WebAssembly to hydrate the HTML delivered from the server.
|
||||||
|
|
Loading…
Reference in a new issue