Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Want to add README.md how to customize extractors #52

Closed
miyanokomiya opened this issue Aug 9, 2019 · 1 comment
Closed

Want to add README.md how to customize extractors #52

miyanokomiya opened this issue Aug 9, 2019 · 1 comment

Comments

@miyanokomiya
Copy link
Contributor

The only way to override the extractors for each extensions: ['html', 'vue', 'js'] is a functional syntax.
Because those extensions have been set by default and purgecss uses only one extractor for each extentions.
https://github.com/FullHuman/purgecss/blob/bc9f3b5b9d670832f0d1cca7bc7facfb253fb60b/lib/purgecss.js#L704-L714

This extractor cannot work.

  extractors: [
    { extractor: MyExtracotor1, extensions: ['vue'] }
  ]

We must write configs as below to make our extractors work.

  extractors: () => [
    { extractor: MyExtracotor1, extensions: ['vue'] }
  ]
@manniL
Copy link
Member

manniL commented Aug 9, 2019

Go ahead 👍

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

No branches or pull requests

2 participants