-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Purge CSS Docusaurus Plugin #3655
Comments
Hi, That seems like a good idea. |
We could also just do a PostCSS plugin and then users could use the PurgeCSS plugin inside of it. |
make sense, would you be interested to contribute such plugin? |
I would be interested in contributing this plugin. Looking through the documentation and the core package I think I would need to use the |
thanks configureWebpack is a good way, let me know if this does not work out |
@lex111 can we consider this done with the cssnano preset etc? |
Another way to handle this would be to allow complete customization with a |
Should be solved with cssnano minimizer already |
CSS minifier only mitigates this issue (by reducing CSS bundle size), but not solves it in any way. We still have unused CSS a lot that can be removed via PurgeCSS. |
Should this be in the core? Would that be competing w/ cssnano? (I remember having problems with multiple minimizers a while ago) |
It's hard to say, PurgeCSS could have many non-obvious consequences, so it might be worth implementing it as plugin. However, there should not be conflicts with the current minifiers (we have two CSS minimizers), since it is different kinds of tools. |
Afaik PurgeCSS has a different mechanism from typical minimizers, so it may be useful to add. Let's reopen 👍 |
It would be nice if infima was mandatory. You could make the theming modular, install infima by default but detach infima with a flag e.g. |
@aersosi that doesn't really seem related to the current issue.
You probably mean optional? The classic theme IS based on Infima, so we don't plan to allow a non-classic Infima theme Now we plan to provide at least 2 themes (most likely Infima + Tailwind) with the same UX, but those would have a different name so there wouldn't be such an option anyway. |
@slorber Yes, I mean optional. Sorry, my mistake. I wasn't aware that a tailwind base theme was in the works when I wrote that, but found out shortly after. I'm looking forward to the tailwind theme, hoping to have more options to configure the styles without overriding them, and to have a smaller footprint. |
📚 Documentation
The Docusaurus classic preset ships the entire Infima CSS framework with the site which results in a lot of unused CSS. An official Docusaurus plugin to remove unused CSS would be great, and it would be nice if it was added to the classic preset.
Have you read the Contributing Guidelines on issues?
Yes
The text was updated successfully, but these errors were encountered: