spatie / laravel-mix-purgecss

Zero-config Purgecss for Laravel Mix
https://spatie.be/en/opensource
MIT License
874 stars 38 forks source link

Add Vue whitelistPatterns to purgeCss by default. #29

Closed kylemilloy closed 6 years ago

kylemilloy commented 6 years ago

Firstly, great package...thanks a lot.

This isn't really an issue but more of a suggestion...I find myself regularly adding in the following whitelist patterns into each project that uses any Vue transition.

whitelistPatterns: [
  /-enter-active$/,
  /-leave-active$/,
  /-enter$/,
  /-leave-to$/
]

I know Laravel isn't married to Vue but they pretty much go hand in hand...I would suggest adding some basic whitelisting to support using vue transitions.

Thoughts?

sebastiandedeyne commented 6 years ago

Nice idea! I added a set of commonly used whitelistPatterns in v2.1.0 :)

kenberkeley commented 5 years ago
/* purgecss start ignore */
.fade-enter-active, .fade-leave-active {
  transition: opacity .5s;
}
.fade-enter, .fade-leave-to {
  opacity: 0;
}
/* purgecss end ignore */