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

Fix: Apply purgecss and safe the darkmode from it #43

Closed
wants to merge 1 commit into from

Conversation

Marty
Copy link
Contributor

@Marty Marty commented Feb 2, 2022

I don't know how this ever worked.
The purgecss plugin was not applied. Maybe it was only to show how it could be done.
But maybe the bug was known, that it breaks the darkmode.

Nonetheless, it works now and brought my css from 7mb to 18kb :)

@apvarun
Copy link
Owner

apvarun commented Feb 3, 2022

@Marty This change is not required. Moreover, @fullhuman/postcss-purgecss can be removed completely since tailwindcss itself takes care of the purging when the HUGO_ENVIRONMENT is production

Executing the below command directly in the repo will provide you with purged css

NODE_ENV=production hugo -s exampleSite --themesDir=../.. --gc

@apvarun apvarun closed this Feb 3, 2022
@Marty
Copy link
Contributor Author

Marty commented Feb 3, 2022

Yes, thanks for pointing that out. I'm just getting started with hugo, tailwind etc. :)

@Marty Marty mentioned this pull request Feb 3, 2022
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

2 participants