No description
This PR ensure that we lazy load the `@parcel/watcher` in the `@tailwindcss/cli`. This means that we don't have to load it at all when using a normal build or when using `--watch --poll` combination. The bigger reason is that on some platforms `@parcel/watcher` might not work, and therefore the build will fail even if you don't use `--watch` at all. This PR fixes that by lazy loading it. Then, if we can't load it when using `--watch`, a useful workaround is shown by using `--watch --poll` instead. This PR also improves showing errors such that the `error.cause` property can be rendered as well. Maybe in the future we can make use of deferred imports (https://github.com/tc39/proposal-defer-import-eval) Fixes: #20322 ## Test plan 1. All tests still pass [ci-all] 2. Fabricated a fake error locally to prove that we can still use a normal build and `--watch --poll` as a workaround <img width="1122" height="1376" alt="file-2f91d99cfb9eb0e24a196c2dd358c1f3" src="https://github.com/user-attachments/assets/e37658ee-0827-422e-bd50-8ea5a85e1b7c" /> |
||
|---|---|---|
| .github | ||
| crates | ||
| integrations | ||
| packages | ||
| patches | ||
| playgrounds | ||
| scripts | ||
| .gitignore | ||
| .prettierignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| LICENSE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| rust-toolchain.toml | ||
| turbo.json | ||
| vitest.config.ts | ||
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.