creativetimofficial / notus-nextjs

Notus NextJS: Free Tailwind CSS UI Kit and Admin
https://www.creative-tim.com/product/notus-nextjs
MIT License
1.37k stars 1.69k forks source link

Fixes to allow for loading full tailwind build for better dev experience #12

Open ptsteadman opened 3 years ago

ptsteadman commented 3 years ago

I made the changes in this PR in an attempt to be able to use any tailwind class in development without needing to re-run build:tailwind, as this takes 10-15 seconds on my machine. With these changes, you only need to wait a few seconds for tailwind to build the first time, and you should then be able to freely use tailwind classes. Unused classes are still being properly purged for production builds.

I made the following changes to support this, which I think previously may have made webpack choke or run out of memory when trying to make the build for the dev server:

I did a quick check and it doesn't seem to have broken any styles. I am also able to generate a working production build. If you're interested in making this change, I am happy to do a careful comparison to look for regressions and set up a staging site. If not, please let me know what I'm missing, or perhaps this will be useful to someone else.