DioxusLabs / DioxusLabs/dioxus

Hotpatching: Editing tailwind class names does not generate css

Open
#4,231 1 comment 3 reactions 0 assignees View on GitHub
bug subsecond
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

**Problem**

When editing an existing tailwind string with hot patching enables, sometimes required css for it is not generated.
Client then requests the css file that does not exist.

E.g. from the web console:
```
GET http://127.0.0.1:8080/assets/tailwind-028ab187999b7510.css
[HTTP/1.1 404 Not Found 4ms]
```
This issue occurs with built in tailwind integration and standalone CLI

**Steps To Reproduce**

Steps to reproduce the behavior:

- clone `https://github.com/s3bba/dioxus-tailwind-hotpatch-repro.git`
- run the dx cli `dx serve --hot-patch`
- Open main.rs file and edit the tailwind class string to end with a different opacity (This will require tailwind cli to generate css)
- Save the file, "Hello there!" will loose the background color as new css file with the new class was not created

**Expected behavior**

When updating the class name, a new css file needs to be generated

**Screenshots**

Reproduction recording
https://cdn.sebba.dev/shared/2025-05-31_21-06-20.mp4

**Environment:**

- Dioxus version: Main branch on commit `58669f892d91bb97fd462dcda209df46914e7d27
- Rust version: rustc 1.89.0-nightly (60dabef95 2025-05-19)
- OS info: Arch Linux
- App platform: Reproduced on web and desktop

**Questionnaire**

I'm interested in fixing this myself but don't know where to start.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.