Command
serve
Description
Currently, the recommended way to disable the Angular CLI cache is via ng cache enable and ng cache disable, which modifies the cli.cache.enabled setting in angular.json.
In some situations, I need to disable the cache while serving the app. However, I’d prefer not to change the project configuration every time, especially since doing so slows down the build process and requires cleanup before committing. Each time I need the cache disabled, I have to manually edit angular.json and later revert the change. It'd be great if I could avoid these steps.
Describe the solution you'd like
Having a --no-cache option for ng serve would make this workflow much smoother. It would disable caching only for that specific run, leaving the global configuration untouched.
Describe alternatives you've considered
I can automate this process using the trap command in a shell script, but since trap doesn’t work on Windows, I’d need to maintain a custom script, which complicates things unnecessarily for this simple problem.
Command
serve
Description
Currently, the recommended way to disable the Angular CLI cache is via
ng cache enableandng cache disable, which modifies thecli.cache.enabledsetting inangular.json.In some situations, I need to disable the cache while serving the app. However, I’d prefer not to change the project configuration every time, especially since doing so slows down the build process and requires cleanup before committing. Each time I need the cache disabled, I have to manually edit angular.json and later revert the change. It'd be great if I could avoid these steps.
Describe the solution you'd like
Having a
--no-cacheoption forng servewould make this workflow much smoother. It would disable caching only for that specific run, leaving the global configuration untouched.Describe alternatives you've considered
I can automate this process using the trap command in a shell script, but since trap doesn’t work on Windows, I’d need to maintain a custom script, which complicates things unnecessarily for this simple problem.