Is the build version of Tailwind CSS supposed to be this big (2.46 MiB) #2401
-
I am working on a Laravel Project and I wonder why my final css file is so huge even in production. I will appreciate some insights and guidance to reducing the final tailwind.config.js
webpack.mix.js
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
I dont remember exactly but it's huge. You need to remove things that you dont use via the settings. For example for my purpose I removed all colors and some pseudo states etc. And even then, the css is about 1MB, gzip is about 110KB. I imagine purging would help alot but it's difficult to purge when you are on a legacy multiple pages app. |
Beta Was this translation helpful? Give feedback.
-
@seewhy17 The build file on production should be getting purged if the configuration is correctly done. It appears that yours is not - so that file size is correct if you include everything in Tailwind. Before anyone anyone can help, you've pasted your webpack.mix.js incorrectly - it's a copy of your tailwind.config.js file? Have you watched https://www.youtube.com/watch?v=ZNLeQDpE_8M? |
Beta Was this translation helpful? Give feedback.
-
That I see that you are running your script with
Does it mean you have now figured it out, or is this still an issue for you @seewhy17? |
Beta Was this translation helpful? Give feedback.
That
2.46 MiB
size sounds just about right for a non-purged CSS output with Tailwind.I see that you are running your script with
NODE_ENV=production
, which should trigger a purge, so the problem is likely either in yourcontent
array of paths, or something in your mix config.Does it mean you have now figured it out, or is this still an issue for you @seewhy17?