leptos-rs / cargo-leptos

Build tool for Leptos (Rust)
MIT License
314 stars 87 forks source link

Autogenerated 'tailwind.config.js' isn't compatible with workspace paths #276

Open tonky opened 2 weeks ago

tonky commented 2 weeks ago

Hi, and thanks for the Leptos - learning it and enjoying the rust full-stack idea!

So i went with start-axum-workspace template, added tailwind-input-file = "style/tailwind.css" to workspace Cargo.toml and then spent some debugging and wondering why no styles from app/src/lib.rs are in the output css, when main.scss and tailwind.css are clearly being processed.

I don't have much experience with Tailwind and its configuration file, which certainly added to my confusion.

Took me a while to realize that a ./src/**/*.rs path in module.exports.content.files in 'tailwind.config.js' won't actually process any Rust files, since we're in a workspace without ./src dir. After changing it to ./app/src/**/*.rs - everything works as intended now.

So the question is - should this be fixed, and if so - what would the fix be:

I can try and add PR, but this needs feedback with decision, and maybe some guidance.