spatie / laravel-mix-purgecss

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

[question] globs and folders #34

Closed marcamos closed 6 years ago

marcamos commented 6 years ago

Hello! Quick question:

I'm using this package in a Mix project that's not utilizing Laravel itself and I've already defined my own specific globs successfully.

Today I noticed that there's a new version that now offers folders as an option, which currently defaults to resources.

In my particular scenario, do I need to also add that to my config and redefine its default? Seeing as it defaults to resources and I'm not using a folder with that name, do I need to correct it, or can it be left alone knowing that my preexisting globs option will continue to work on its own?

Thanks!

sebastiandedeyne commented 6 years ago

Could you share your configuration? I thought it wasn't possible to purge selectors that aren't in resources by overriding globs (until the folders option at least). Or did you provide a custom paths key?

It's been a while, could be wrong 😅 Gonna need some code to draw a conclusion :)

marcamos commented 6 years ago

Sure, and thank you! It's here: https://github.com/fromtheoutfit/starter/blob/master/webpack.mix.js#L40

disclaimer: maybe I'm using it wrong even now?

sebastiandedeyne commented 6 years ago

I was wrong, that looks perfect!

It's up to you if you prefer the folders + extensions way of configuring things, or the globs option.

Don't worry about using globs, it's here to stay. folders & extensions are simpler aspects to configure when you're not doing complex stuff, under the hood they're converted and merged with globs.

marcamos commented 6 years ago

OK, thanks for the confirmation!