Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ptsteadman
Copy link

@ptsteadman ptsteadman commented Jul 9, 2021

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:

  • removed the variants specified in the tailwind config. I think these are included by default

  • changed the purge rule so that it's more focused. I think it was targeting node_modules and .next.

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.

Signed-off-by: Patrick Steadman <ptsteadman@gmail.com>
Signed-off-by: Patrick Steadman <ptsteadman@gmail.com>
Signed-off-by: Patrick Steadman <ptsteadman@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant