Add support for Tailwind CSS CLI v4#50
Merged
Merged
Conversation
bennothommo
added a commit
that referenced
this pull request
Jun 15, 2026
Member
|
@bennothommo is this ready to go? |
Member
Author
|
@LukeTowers good to go |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR includes support for Tailwind CSS v4. To reduce friction, it uses the same
TailwindCssFilterclass and has some simple version checks to ensure the correct arguments are used. It will also detect the version in use, so users will not have to manually specify their version.There is a couple of small gotchas, but these should only manifest in projects where someone has upgraded their Tailwind CSS CLI binary to v4 without following Tailwind CSS's Upgrade Guide.
setConfigPath()method in the filter to work - if the config is specified, the following will be prepended to the source asset content:This might cause problems if the user has specified a
@configpath in their CSS.contentarray in their configuration JS file, to specify glob paths of source HTML or frontend code. This does not work in v4, even with the above fix. The source should be specified in the CSS file with the@sourcetag.