Closed miyanokomiya closed 5 years ago
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
extensions: ['html', 'vue', 'js']
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'] } ]
Go ahead :+1:
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-L714This extractor cannot work.
We must write configs as below to make our extractors work.