Closed
Description
What I’m doing
# 1 – I compile Tailwind myself
tailwindcss -i tailwind.css -o assets/tailwind.css --minify
# 2 – then bundle the app
NO_DOWNLOADS=1 dx bundle --platform web
- tailwind.css lives in the project root.
- The generated file goes to assets/tailwind.css.
- assets/tailwind.css is included in .gitignore since it's auto-generated file we generate it in CI pipeline and bake in the image
What happens
dx bundle starts Tailwind again, rewrites assets/tailwind.css, fingerprints the new bytes, and injects a link like
<link rel="stylesheet" href="/assets/tailwind-dxhABC123.css">
Because my image still contains the first file, the browser asks for tailwind-dxhABC123.css and gets a 404.
Why it happens (looking at cli/src/tailwind.rs)
- The CLI autodetects Tailwind by checking for assets/tailwind.css.
- If that file exists, it always spawns the Tailwind CLI, even when I already built the CSS.
What I expect
- Autodetect should key off the root tailwind.css (or tailwind.config.*), not the compiled asset.
- If the compiled file already exists and is newer than the input, skip the extra run or let me turn it off
- Being able to disable tailwind-cli
Environment:
- Dioxus version: 0.7.0-alpha.2
- Rust version: 1.88
- OS info: debian:trixie-slim on ci
- App platform: web