-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
🚀 Feature request
Command (mark with an x
)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- xi18n
- run
- config
- help
- version
- doc
Description
Hey
Currently I have been using Nginx with my Angular build and its directly pointed towards Angular output path i.e. /dist folder and serving it from there itself.
But what happens is when I run ng build --prod
on the server then it remove the old build first from the output folder and then compile the new build from the source code and till the time the process completed my Nginx throws internal server error
.
I know the option --deleteOutputPath=false
where you can specify ng build to not delete the output path files but it just keeps on adding files which I think is not a good option.
Describe the solution you'd like
There should be an option in ng build like --preserveOutputPath=true
where if given will not delete any content from the output path until the compilation is done and then replaces the new build files with the old build files.
Describe alternatives you've considered
As I am using Ansible to deploy and build angular app on server I have to specify different output path while building app and then replaces that one's files with the output path (/dist) files which is an additional task needed to perform.