Skip to content
This repository was archived by the owner on Apr 19, 2021. It is now read-only.

Why change from Tailwind's purge? #7

Closed
wildpow opened this issue May 5, 2020 · 5 comments
Closed

Why change from Tailwind's purge? #7

wildpow opened this issue May 5, 2020 · 5 comments

Comments

@wildpow
Copy link
Contributor

wildpow commented May 5, 2020

Why did you change from Tailwind's built-in purge to doing it in the postCSS config in this commit?

@wildpow
Copy link
Contributor Author

wildpow commented May 5, 2020

Did have a positive effect on export. 👍

Before

After

@babichjacob
Copy link
Owner

If Tailwind is removed, it is no longer necessary to re-create the purge in postcss.config.js, so the README section about this doesn't need to have that code block in it anymore, and it won't be possible to make a mistake moving purging from Tailwind to PostCSS because that isn't needed anymore.

The documentation doesn't make it clear if you are able to override the default extractor, so I actually never tried this.

The only reason I can think of that the export got smaller may be because unused (hopefully) base styles are being purged now. Tailwind's purge mode defaults to conservative which prevents base styles and user-created styles from being purged. On the other hand, I'm not sure that would account for a ~20 KB difference, but this is still good news!

@wildpow
Copy link
Contributor Author

wildpow commented May 5, 2020

I am planning on moving an existing project to this config tonight or tomorrow. I'll let you know if I come crossed anything weird.

@wildpow
Copy link
Contributor Author

wildpow commented May 7, 2020

I believe this question was answered, thank you.

@wildpow wildpow closed this as completed May 7, 2020
@babichjacob
Copy link
Owner

Forgot to point out we use Tailwind's purge again since 6b59619 because it's been improved since I decided to ditch it, and I realized that if you're not using Tailwind you probably don't need or want PurgeCSS anyway.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants