Generated files contains a lot of unused CSS

Hello :smiley:

After building a simple Plasmic / Gatsby project I realized that the major part of the generated index.html was just CSS, with a lot of it being unused (according to IntelliJ).

I created a dumb script to remove all unused CSS and it managed to reduce the page size by more than 50% while keeping the same appearance.

[Optimizer] CSS Blocks before: 221 after: 48
[Optimizer] Size before: 48944 after: 20948

So I think it would be great if all this unused CSS was removed. Maybe it is just some configuration to do on Gatsby side, I didn’t search further.

2 Likes

Thanks for reporting this and for sharing your research! We’ll dig into this.

1 Like

Sorry for reviving this question, but I was wondering if any improvement was done since then?
Plasmic is the best comprehensive web app builder imo, but the emerging visual editors generating tailwind code made me think if Plasmic is missing out on the performance there.

Hey @brendon_ignath,

We have done a lot of work in decreasing the size of the css we generate since then. Do you have any specific examples of issues/improvements?