purgecss
purgecss copied to clipboard
Angular CLI support for modern builders
Is your feature request related to a problem? Please describe.
- Angular is a major framework—widely used, robust, and stable.
- They are slowly but steadily exploring new builders, even though Webpack remains fully supported (see links below):
- https://dev.to/kristiyan_velkov/angular-16-with-vite-564b
- https://angular.dev/tools/cli/build-system-migration
- Current implementations of PurgeCSS with Angular require some sort of custom builder (as I understand it), which, in my opinion, is not ideal for large projects with many contributors.
- https://dev.to/dylanvdmerwe/reduce-angular-style-size-using-purgecss-to-remove-unused-styles-3b2k
- https://stackoverflow.com/questions/58112925/how-to-integrate-purgecss-with-angular-cli-project
- https://stackoverflow.com/questions/77037449/remove-unused-css-in-angular-using-purgecss
Describe the solution you'd like
It would be fantastic to have a plugin for Angular, similar to those available for other frameworks (e.g., Next.js, Vue). If a plugin isn't possible, it would be great to have a standard configuration that could be added to angular.json
(or project.json
in Nx monorepos) to ensure our PostCSS hook is correctly executed after every production build.
Describe alternatives you've considered
Honestly, for my organization, using default builders is a dealbreaker, so we don't even attempt to go down that rabbit hole.
There was a similar request that was closed years ago, but it seems the issue remains unresolved. Any comments or updates on this would be appreciated to help set our expectations.
Thanks for the great work!