New long variables making my build size larger #13199
Closed
Steffan153
started this conversation in
General
Replies: 2 comments
-
Hey! Still finalizing some details but we do support this currently with this - @import "tailwindcss";
+ @layer theme, base, components, utilities;
+ @import 'tailwindcss/theme' reference;
+ @import 'tailwindcss/preflight' layer(base);
+ @import 'tailwindcss/utilities' layer(utilities); This tells Tailwind to process your You can do the same thing directly on a @theme reference {
...
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Awesome! My build size is now 27KB with v4, compared to 31KB with v3. Thanks! |
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
-
In v4, my build CSS no longer has all the
/var(--tw-bg-opacity)
stuff on every color I use, which is nice. I was hoping my build size would now be much smaller. But in the end, it ends up a lot larger because of all the new theme variables. Could there be a setting or something to not put everything in--color-violet-50
etc in:root
, but just use them inline in the CSS rules? Or maybe minify the variable names?(I like to have the smallest build sizes possible)
Beta Was this translation helpful? Give feedback.
All reactions