-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Open
Labels
angular/build:applicationarea: @angular/buildfeatureIssue that requests a new featureIssue that requests a new featurefeature: under considerationFeature 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
Description
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
tomastrajan, SaulMoro, AlaaEl-DinAhmed, qwe12e, vijhhh2 and 27 moreAlaaEl-DinAhmed, HyperLife1119, ahnpnl, cristiandeschamps, NotTsunami and 3 more
Metadata
Metadata
Assignees
Labels
angular/build:applicationarea: @angular/buildfeatureIssue that requests a new featureIssue that requests a new featurefeature: under considerationFeature 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