leptos
leptos copied to clipboard
leptos - tailwind - axum - cargo-leptos compatibility issue
Hi,
There are some incompatibilities between leptos_axum::render_app_to_stream
and cargo-leptos.
render_app_to_stream use the pkg_path variable to refer to the generated wasm, js files, while cargo-leptos use constants, like:
const DEST: &str = "target/site/pkg/app.css";
...
let wasm_path = "target/site/pkg/app.wasm";
...
fs::write("target/site/pkg/app.js", js).await.dot()?;
This way you always need to use "/pkg/app" for RenderOptions::builder().pkg_path
.
It would be nice, if you could improve axum, actix integration to use generated.rs, or integrate cargo-leptos to the leptos project.