[Vuejs]-Error remove plenty of css in: optimize bootstrap-vue in nuxtjs – using Purecss

0👍

Purge CSS looks for static strings in the components source code to check for CSS classes to keep.

However, many of the classes used on components like col-sm-5, etc, are generated at runtime (computed based on various prop values), which PurgeCSS cannot detect.

You can either set up whitelisting rules for PurgeCSS to match particular classnames (i.e. /^col/, /^row/’, /^card/, /^carousel/`, etc.),

Or forgo using PurgeCSS and just import the required SCSS from Bootstrap & BootstrapVue. Bootstrap SCSS is somewhat modular in nature. See https://getbootstrap.com/docs/4.4/getting-started/theming/#importing

Leave a comment