Skip to content

Conversation

@RobinMalfait
Copy link
Member

This PR skips creating a compiler in the @tailwindcss/postcss implementation if we know that the CSS file we are handling is definitely not a Tailwind CSS file.

This is a performance improvement for initial builds where some CSS files would've been handling by Tailwind CSS but shouldn't. E.g.: When setting up custom fonts in Next.js applications, each font will have it's own CSS file that is passed to @tailwindcss/postcss.

Since they don't contain @import or any other Tailwind CSS directives, we can just skip them.

@RobinMalfait RobinMalfait requested a review from a team as a code owner December 9, 2024 10:47
@RobinMalfait RobinMalfait mentioned this pull request Dec 9, 2024
@RobinMalfait RobinMalfait merged commit d444362 into next Dec 9, 2024
1 check passed
@RobinMalfait RobinMalfait deleted the fix/skip-creating-compiler-on-non-tailwindcss-files branch December 9, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants