-
-
Notifications
You must be signed in to change notification settings - Fork 19
Use builtin Tailwind purging #38
Comments
I don’t know what I’m doing, but hopefully this helps or saves you some time. Following https://tailwindcss.com/docs/optimizing-for-production#removing-unused-css, I created a
And spent a few hours trying to figure out why it wasn’t working properly. Apparently Tailwind CSS (PurgeCSS?) doesn’t purge properly in Netlify continuous development. The only working solution I’ve found is using Netlify CLI to manually deploy your site with https://community.netlify.com/t/purgecss-differences-between-local-and-server/27973 |
I'm not sure if there is a guarantee as to when jekyll will run the postcss plugin vs the markdown plugins, so _site/**/*.html might not be generated yet. Also, I think you need to make sure that |
Everything works fine locally. I fiddled with |
@mhanberg https://tailwindcss.com/docs/optimizing-for-production purge seems to be deprecated, replaced by the --minify tag I guess |
I think it was actually replace by using the JIT compiler. --minify will minify the css file. |
Tailwind now can purge itself. The template should be updated to reflect this.
Since the template doesn't hard code the tailwind config, there should be a copy/paste-able purge config in the readme.
The text was updated successfully, but these errors were encountered: