0

I am using Angular-cli created an angular project in my server, for example "myNgProject" . And set the ngnix root location to myNgProject/dist. Everything is good. I manage the project version with git, so every time I pull the new update from github, I need to rebuild the output files in server, I do that with command

ng build --prod

But dist folder will be removed first During the rebuilding process. So in this moment my site will gone also. Any one has some idea for this issue? Thank you.

joker szeto
  • 84
  • 1
  • 2

1 Answers1

0

This is not issue with angular. It generates dist folder every times you run ng build --prod but if you want to just to avoid build every time in server side then just remove dist folder from .gitignore and generate build from your computer and push the code and just pull it on server side.