No description
References https://github.com/tailwindlabs/tailwindcss/pull/19391. References https://github.com/tailwindlabs/tailwindcss/pull/16274. Right now, when using the standalone build of the TailwindCSS CLI, you cannot use a custom `NODE_PATH`, but you can when using it via Node.js directly. A custom NODE_PATH allows you to resolve imports from multiple locations. For example, in [Phoenix LiveView](https://github.com/phoenixframework/phoenix_live_view/), we have a feature where you can write scripts in templates that we extract at compile time to a custom folder and users can import those in their application bundle by saying ```javascript import { hooks as colocatedHooks } from "phoenix-colocated/my_app" ``` where the "phoenix-colocated" folder lives in a different location than the usual `node_modules` folder. This works fine with the default esbuild setup, as it respects `NODE_PATH`, so we can pass it a custom location. We want to also support colocating CSS in templates soon, but the same approach doesn't work with the standalone Tailwind CLI we ship with default Phoenix projects. It works when running Tailwind through Node.js, but we don't want to tell users they need to install it, just to use the feature. This patch changes the lookup logic for the standalone CLI to also account for `NODE_PATH`. Note that you can pass multiple paths, that are split according the the OS PATH separator. --------- Co-authored-by: Robin Malfait <malfait.robin@gmail.com> |
||
|---|---|---|
| .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.