leptos icon indicating copy to clipboard operation
leptos copied to clipboard

leptos - tailwind - axum - cargo-leptos compatibility issue

Open ebadta81 opened this issue 1 year ago • 4 comments

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.

ebadta81 avatar Dec 10 '22 10:12 ebadta81