Skip to content
This repository has been archived by the owner on Feb 1, 2020. It is now read-only.

Purging Bootstrap style sheets #74

Open
sjorsvanheuveln opened this issue Jul 16, 2019 · 1 comment
Open

Purging Bootstrap style sheets #74

sjorsvanheuveln opened this issue Jul 16, 2019 · 1 comment

Comments

@sjorsvanheuveln
Copy link

sjorsvanheuveln commented Jul 16, 2019

This is perhaps more a question than an issue, but one shouldn't really purge bootstrap stylesheets right? Because if you use it with some bootstrap.js, than some classes will be injected that will have been purged from the style sheets. E.g. I purged mine and found out the navbar dropdown wasn't working anymore.

So what should one do in this situation? Whitelist a bunch of classes or nut purge bootstrap at all?
I solved the my issue by whitelisting the show class:

whitelistPatterns: [/show/]

Maybe one day we should do a check on which classes are being injected with bootstrap.js, and add an option to whitelist them. Because for me, most of my reduction comes from purging the bootstrap style sheets and perhaps for other too.

@akrawchyk
Copy link

Because if you use it with some bootstrap.js

you should add this bootstrap.js file to the paths in the plugin config, see https://www.purgecss.com/with-webpack#options

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants