How to remove unused CSS rules during Meteor build?

I’ve failed to find a package that would let me remove unused CSS rules from my app during build, so I’m asking you guys, how do you deal with them?

Do you use some particular Meteor solution to remove them, do you do that outside of Meteor build system, with help of something like PurifyCSS?

Havent tried it myself but heard an front end designer recommend uncss

1 Like

Thanks @kaiyes. Googling for UnCSS solutions, I’ve found this Meteor forums thread (which makes me feel dumb that I failed to find it while searching for similar forum threads before writing mine):

where the following hackpad is linked:

https://meteor.hackpad.com/Proposal-New-phases-for-the-build-process-KQ8jqchouGs

Unfortunately there was no conclusion if it’s possible at all.

Are there any news on that?

1 Like

check this out…talk that has uncss mentioned and the screenshot of what he talked about

I can link you up with him. Go to this link and invite yourself to our local slack channel and he can guide you about it. I will ask whether he can manage some time to come up here and help you

2 Likes

Thanks a lot! So it seems he did succeed with that? Wish there was a video from this talk. :slight_smile:

I’ll first try to implement it myself. If I have problems that I can’t overbear, I’ll ask your friend for the guidelines.

1 Like

Hi brajt, any progress on your implementation?

This would be an amazing package for the meteor community.

To be honest, after initial failures, I decided to deal with it when my
app is ready to move to production, so it will take at least 4 more
weeks before I try.

Bump? Did anything come of this? I found PurifyCSS and UnCSS as possible libraries to do this.

bump, could be interesting

1 Like

Bump, 10 months later

1 Like

i used autoptimize but can’t Defer unused CSS