mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2026-10-29 02:07:06 +08:00
## Summary `tailwindcss canonicalize` writes its results to stdout, but the design system is loaded in the same process, so anything a plugin logs with `console.log` while it loads (e.g. the daisyUI banner) ends up in front of the results. That breaks `--format json` and shifts every line in `--stream` mode. This points `console.log`, `console.info` and `console.debug` at `console.error` for the `canonicalize` command, so stdout only carries the results and plugin output goes to stderr. Fixes #20560 ## Test plan Added an integration test with a plugin that calls `console.log`, it fails on `main` and passes with this change. Also checked by hand with the reproduction from the issue: ``` $ tailwindcss canonicalize --css app.css "p-4 px-2 py-2" 2>/dev/null p-2 $ printf 'p-4 px-2 py-2\nw-4 h-4\n' | tailwindcss canonicalize --css app.css --stream 2>/dev/null p-2 size-4 ``` --------- Co-authored-by: Robin Malfait <robin.malfait@shopify.com>
A utility-first CSS framework for rapidly building custom user interfaces.
Documentation
For full documentation, visit tailwindcss.com.
Community
For help, discussion about best practices, or feature ideas:
Discuss Tailwind CSS on GitHub
Contributing
If you're interested in contributing to Tailwind CSS, please read our contributing docs before submitting a pull request.