Topic: Mdb with purgecss

digitalmanagerguru free asked 3 years ago

Hi there, I am not able to make use of PurgeCSS with MDB. In another projects without mdb I did not had any trouble.

I am on a project with laravel + vue2 + mdbvue, using laravel-mix 6, laravel-mix-purgecss 6

And on my webpack I've added the purgecss:

enabled: true,
extend: {
  defaultExtractor(content) {
    const contentWithoutStyleBlocks = content.replace(/<style[^]+?<\/style>/gi, '')
    return contentWithoutStyleBlocks.match(/[A-Za-z0-9-_/:]*[A-Za-z0-9-_/]+/g) || []
  whitelistPatterns: [/-(leave|enter|appear)(|-(to|from|active))$/, /^(?!(|.*?:)cursor-move).+-move$/, /^router-link(|-exact)-active$/, /data-v-.*/, /show$/, /fa/, /inline-block$/, /text-/, /with-gap/, /ripple/, /scrollbar/, /options-container/, /select-inner-wrapper/, /select-colorful-option/],


I whitelist some patterns for vue, but still not enough.

Do any of you solve this in the past? I can't beleive no one did this before with mdb.

best regards

Mikołaj Smoleński staff commented 3 years ago

It's the first issue with purgeCSS. We can't help you since it's third-party tool and we haven't tested it before. Best regards

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 6.7.2
  • Device: Desktop
  • Browser: Chrome
  • OS: Win.10
  • Provided sample code: No
  • Provided link: No