trunk-rs / trunk

Build, bundle & ship your Rust WASM application to the web.
https://trunkrs.dev/
Apache License 2.0
3.49k stars 252 forks source link

Tailwind asset building results in error #888

Open bicarlsen opened 5 days ago

bicarlsen commented 5 days ago

When including Tailwind assets, the CSS is not processed correctly. I believe this is because tailwind indicates you need to run the tailwind compiler via npx (see step 5 of link). However, Trunk runs the executable directly.

I tested this on Windows.

ctron commented 5 days ago

Hm, I know too little about that. However, I don't think that has ever changed in trunk.

bicarlsen commented 4 days ago

Is it worth digging into?

The workaround I currently use is to run a pre_build hook npx tailwindcss -i main.css -o out.css then include out.css as a style sheet with <link data-trunk rel="css" href="out.css" />.

ctron commented 1 day ago

I honestly don't know. If you have the time fixing this, it would be great I guess. I personally don't use it.