Title: JS support for PostCSS config · Issue #27819 · angular/angular-cli · GitHub
Open Graph Title: JS support for PostCSS config · Issue #27819 · angular/angular-cli
X Title: JS support for PostCSS config · Issue #27819 · angular/angular-cli
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 ful...
Open Graph 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 t...
X 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 t...
Opengraph URL: https://github.com/angular/angular-cli/issues/27819
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"JS support for PostCSS config","articleBody":"### Command\r\n\r\nconfig\r\n\r\n### Description\r\n\r\nCurrently 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.\r\n\r\n```json\r\n{\r\n \"plugins\": {\r\n \"@fullhuman/postcss-purgecss\": {\r\n \"content\": [\"**/*.html\", \"**/*.ts\", \"**/*.js\"],\r\n \"skippedContentGlobs\": [\"node_modules/**\"],\r\n }\r\n }\r\n}\r\n```\r\n\r\nUnfortunately this config is not enough and therefore we would need to configure some extractors:\r\n\r\n```javascript\r\nimport purgeJs from \"purgecss-from-js\";\r\nimport purgeHtml from \"purgecss-from-html\";\r\n\r\nconst options = {\r\n content: [], // files to extract the selectors from\r\n css: [], // css\r\n extractors: [\r\n {\r\n extractor: purgeJs,\r\n extensions: [\"js\"],\r\n },\r\n {\r\n extractor: purgeHtml,\r\n extensions: [\"html\"],\r\n },\r\n ],\r\n};\r\nexport default options;\r\n```\r\n\r\n### Describe the solution you'd like\r\nSupport PostCSS configuration files writen in JavaScript.\r\n\r\n### Describe alternatives you've considered\r\n_No response_","author":{"url":"https://github.com/nivekcode","@type":"Person","name":"nivekcode"},"datePublished":"2024-06-11T12:02:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/27819/angular-cli/issues/27819"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b0ba56fa-237f-801a-8b5c-02be8de18c3d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E03C:2D3E84:109A86F:1677A2A:6964A45E |
| html-safe-nonce | f9cff11a7036cbb5a4f81d54fb89093caa955db6e6c72cda0ba655519c923baa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDNDOjJEM0U4NDoxMDlBODZGOjE2NzdBMkE6Njk2NEE0NUUiLCJ2aXNpdG9yX2lkIjoiNTg2NzUxMDA4MzYwNjU4NjQ2MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 51318f7206e8e1d4169b3fae8b94ea2a4e8c4bb4044250c3fd3064e7384e1fd0 |
| hovercard-subject-tag | issue:2346243267 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/27819/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5865d172dbfded5e887800de17206136dde0446552a39f8145f30dd359f167e4/angular/angular-cli/issues/27819 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5865d172dbfded5e887800de17206136dde0446552a39f8145f30dd359f167e4/angular/angular-cli/issues/27819 |
| og:image:alt | 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 t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nivekcode |
| hostname | github.com |
| expected-hostname | github.com |
| None | baa7d9900fdf7b27d604f36887af878d569cfbdcf97126832a5f4f0caf0c6ba5 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 842eff1d11f899d02b6b3b98fa3ea4860e64b34e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width