spatie/laravel-mix-purgecss

WhitelistPattern or safelist ?

Daniel4Digital opened this issue · 3 comments

I've been testing and whitelistPattern doesn't seem to work. I read the purgeCss docs and I can't find a whitelistPattern. I could find a safelist. Does laravel-mix-purgecss accepts the same object with safelist ?

I changed this:
whitelistPatterns: ["flatpickr*", "swal2*", "animated*", "ps*"],
to this:
whitelistPatterns: [/flatpickr*/, /swal2*/, /animated*/, /ps*/],
and worked for me!

The current version of package still uses PurgeCSS 2, which uses whitelistPatterns.

PurgeCSS 3 renamed it to safelist. This package will use PurgeCSS 3 once Laravel Mix 6 is released.

Thanks for the information. Appreciated!