There doesn't seem to be a way to tie into whatever tooling that Angular CLI is using under the hood in order to build / serve a website.
I'm wanting to run my own image optimization script and can't find a way to run a script and a given point in time or add my code to the default build script.
Is there a way recommended / canonical way to do this?
As of today, Angular CLI does not support "pre" and "post" build events natively. However you could use one of other two options:
{
"prebuild": "additional calls",
"build": "ng build"
}
Example: https://nx.dev/core-features/run-tasks#defining-the-task-pipeline
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With