leptos-rs / cargo-leptos

Build tool for Leptos (Rust)
MIT License
315 stars 88 forks source link

Make tailwind with hot-reloading examples more clear #205

Open lukexor opened 7 months ago

lukexor commented 7 months ago

Description

The README says that tailwind-input-file activates the tailwind build, which is true. But when used as the only input file (leaving style-file undefined) it results in hot-reload errors.

The work around is to define an empty style-file css with nothing in it.

Steps to reproduce

Set up a new leptos project with the following metadata

[package.metadata.leptos]
assets-dir = "assets"
bin-features = ["ssr"]
lib-features = ["hydrate"]
lib-profile-release = "wasm-release"
tailwind-input-file = "style/tailwind.css"

Run cargo leptos watch

Modify tailwind.css

Expected

CSS to hot-reload with no errors.

Actual

Tailwind finished tailwind --input style/tailwind.css --config tailwind.config.js
   Watch updated style
  Reload internal error: sending css reload but no css file is set.
gbj commented 7 months ago

Would you be interested in making a PR to clarify this?

lukexor commented 7 months ago

Sure I can give it a go!