tailwindcss
tailwindcss copied to clipboard
`--watch` command does not clean output up when classes are removed from watched files
What version of Tailwind CSS are you using?
- 3.4.14
- 4.0.0-alpha28
Both using macOS-arm64
What build tool (or framework if it abstracts the build tool) are you using?
Standalone CLI
What version of Node.js are you using?
Not relevant
What browser are you using?
Not relevant
What operating system are you using?
macOS Sonoma 14.6.1
Reproduction
https://github.com/pinzonjulian/tailwind_css_cli_watch_bug
There are folders for Tailwind 3 and 4 here. Follow the steps to download the executables from:
- https://tailwindcss.com/blog/standalone-cli
- https://github.com/tailwindlabs/tailwindcss/releases
Describe your issue
The watch command successfully adds classes when they are identified in the watched files (in the case of the reproduction repo, the application.html file). However when the classes are removed from the file, the watcher does not remove them from the output file.
Possible dupe (at least for v3): #14180, #14290, #4098
Thanks for pointing it out. Closed because it seems it's deliberate.