creativetimofficial / notus-svelte

Notus Svelte: Free Tailwind CSS UI Kit and Admin
https://www.creative-tim.com/product/notus-svelte
MIT License
824 stars 421 forks source link

Tailwind config performance improvements #11

Closed pavelloz closed 3 years ago

pavelloz commented 3 years ago

Hey,

I took a look at tailwind.config and it seems like the globs were more generous than they had to. Output CSS is smaller and should compile faster:

Before:

   ✅ Finished in 46 s
   📦 Size: 60.42KB
   💾 Saved to public/assets/styles/tailwind.css

After:

   ✅ Finished in 40 s
   📦 Size: 43.66KB
   💾 Saved to public/assets/styles/tailwind.css

If you are interested i also have on my local drive notus upgraded to newest tailwindcss running with JIT mode. Result is even more spectacular, because it is another couple KB smaller (overall its 21KB smaller than current master), and compiles below half a second (before 46seconds).

   ✅ Finished in 439 ms
   📦 Size: 38.97KB
   💾 Saved to public/assets/styles/tailwind.css
einazare commented 3 years ago

Hey @pavelloz ,

Thank you for this PR. Unfortunately, we cannot accept it, since the Purge CSS does not include the HTML files as well: https://github.com/creativetimofficial/notus-svelte/blob/main/public/index.html

As you can see inside our public/index.html we also have two classes here that would need to get compiled.

Best, Manu

pavelloz commented 3 years ago

Ok, im gonna use my optimized fork then on my own :) When you are ready you know where to look for XX performance improvements, until i make my repo private.

PS. I was hoping you would at least open the project before rejecting... you would see that both classes used in index.html are present in tailwind.css. Anyway, good luck.