Open
Description
openedon Jun 11, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Issue that requests a new featureIssue that requests a new featureFeature request for which voting has completed and the request is now under considerationFeature request for which voting has completed and the request is now under consideration