Long Nextjs Compile Time Fix With Tailwind Config #80564
Unanswered
SanditZZ
asked this question in
Show and tell
Replies: 1 comment
-
Why does this happen?
Possible Solutions1. Reduce Pattern Complexity and Scope
2. Use Explicit Safelisting Where Possible
3. Use a Build Script to Pre-generate Safelist
4. Move Safelist Out of Dev
5. Leverage JIT Mode + Content Paths
6. Consider a Custom Extraction Plugin
Summary Table
Quick Fix: Reduce PatternsIf you can't do any of the above right now, at least narrow your regex, or reduce the number of color/shade combinations. Community Links |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In case anyone's experiencing similar slow compile time while on dev.
I noticed that I've added safelist in my
tailwind.config.ts
and this caused the compile time to increase significantly ~20 - 50 seconds.I still didn't remove the three lines of the bg, text, border though because I need them when using dynamic colors I need when setting classNames fetched from db.
For anyone who's experiencing similar issues, do you guys have a solution for this? Would love to hear anything that's related. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions