Purge bootstrap and roots sage 10

is it possible to purge unwanted Bootstrap from roots sage 10, i have removed tailwind and successfully added bootstrap and bud sass but when i compile my app.css file is 180kb which is way too big would appreciate someone giving me the steps of purging this bootstrap file because bootstrap is required element of the project and if i can not streamline this css it kind of makes sage redundant for me moving forward

Absolutely possible with the PurgeCSS extension for Bud:

Thanks Ben this is the solution i have now just got to work out why its purging too much im using a similar setup to older versions of sage in my app scss
@import “common/variables”;
@import “common/global”;
@import “common/fonts”;
@import “components/nav”;
@import “components/header”;

and this code is being purged when it its actually in use

As well as wp_bootstrap5_navwalker from GitHub - GarrettWeinberg/sage-bootstrap5-navwalker

Thats all corrected now with some additional whitelisting thanks

3 Likes