0

I have observed that whenever we build angular apps it creates a fresh output directory every time and deletes previous existing folders.

Why does not it deletes directory content and re use that folder?

My thought process is like even if it finds some caching issue as said in one of issues raised in angular-cli, deleting all content is still a fine solution.

RateM
  • 241
  • 1
  • 4
  • 15
  • if you have cache issue please check this thread : https://stackoverflow.com/questions/55402751/angular-app-has-to-clear-cache-after-new-deployment/55403095#55403095 – Joel Joseph Sep 17 '19 at 12:33
  • I just gave an example about cache – RateM Sep 17 '19 at 12:35
  • The problem is When a static file gets cached it can be stored for very long periods of time before it ends up expiring. This can be an annoyance in the event that you make an update to a site however, since the cached version of the file is stored in your visitors’ browsers, they may be unable to see the changes made. so angular use cache busting (latest versions of angular has this feature enabled by default) . Please check the thread above – Joel Joseph Sep 17 '19 at 12:39

1 Answers1

0

Angular 12 provides option --delete-output-path you can set it to false to achieve this.