Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip creating a compiler for CSS files that should not be processed #15340

Merged

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.

None yet

2 participants