Skip to content
This repository has been archived by the owner on Feb 1, 2020. It is now read-only.

Ability to load configuration from purgecss.config.js #77

Open
akrawchyk opened this issue Aug 20, 2019 · 0 comments
Open

Ability to load configuration from purgecss.config.js #77

akrawchyk opened this issue Aug 20, 2019 · 0 comments

Comments

@akrawchyk
Copy link

akrawchyk commented Aug 20, 2019

I'd like to provide defaults for purgecss-webpack-plugin and allow the users of my plugin to provide their own whitelist configuration. The docs indicate we could add these options in the purgecss.config.js file: https://www.purgecss.com/configuration#configuration-file

But, purgecss doesn't load configuration from this file if its passed an object: https://github.com/FullHuman/purgecss/blob/master/src/index.js#L41-L42

And purgecss-webpack-plugin passes an object to purgecss: https://github.com/FullHuman/purgecss-webpack-plugin/blob/master/src/index.js#L118

So that ignores the ability to load configuration from a file.

Maybe this is an issue of wanting my cake and eating it too, but it would be nice to be able to configure these options separate from the webpack configuration.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants