Command
config
Description
Currently the CLI supports custom PostCSS configurations in the format of JSON files. The problem is that the JSON format has its limitation. In our case for example we try to configure CSS purging with the fullhuman/postcss-purgecss plugin.
{
"plugins": {
"@fullhuman/postcss-purgecss": {
"content": ["**/*.html", "**/*.ts", "**/*.js"],
"skippedContentGlobs": ["node_modules/**"],
}
}
}
Unfortunately this config is not enough and therefore we would need to configure some extractors:
import purgeJs from "purgecss-from-js";
import purgeHtml from "purgecss-from-html";
const options = {
content: [], // files to extract the selectors from
css: [], // css
extractors: [
{
extractor: purgeJs,
extensions: ["js"],
},
{
extractor: purgeHtml,
extensions: ["html"],
},
],
};
export default options;
Describe the solution you'd like
Support PostCSS configuration files writen in JavaScript.
Describe alternatives you've considered
No response
Command
config
Description
Currently the CLI supports custom PostCSS configurations in the format of JSON files. The problem is that the JSON format has its limitation. In our case for example we try to configure CSS purging with the
fullhuman/postcss-purgecssplugin.{ "plugins": { "@fullhuman/postcss-purgecss": { "content": ["**/*.html", "**/*.ts", "**/*.js"], "skippedContentGlobs": ["node_modules/**"], } } }Unfortunately this config is not enough and therefore we would need to configure some extractors:
Describe the solution you'd like
Support PostCSS configuration files writen in JavaScript.
Describe alternatives you've considered
No response