File size can also be reduced by removing varients you don't need. Also, if you're comfortable with something like Purgecss, that'll remove every class you're not using. That'll really reduce file size.
Oh, I need to add 1 more thing: I think Purgecss only runs when the environment is "production". This is to prevent issues in development if you change CSS classes in your markup without regenerating your CSS.
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'm new to Tailwind, but a bit confused. Why is the CSS file 1.6MB?
Hey, so we are using the default config along with custom config, we can reduce the size by deleting the colours from tailwind.js file.
File size can also be reduced by removing varients you don't need. Also, if you're comfortable with something like Purgecss, that'll remove every class you're not using. That'll really reduce file size.
Wow thanks, will definitely check that out.
Purgecss is amazing. But do make sure you have it set up correctly to check source files. That's how it determines what classes you're using.
Depending on what tools you build with, you may also need to whitelist some selectors. That should be covered in the Purgecss docs.
Oh cool thanks for the heads up, will be ready for it.
Oh, I need to add 1 more thing: I think Purgecss only runs when the environment is "production". This is to prevent issues in development if you change CSS classes in your markup without regenerating your CSS.