I will try to give a few answer.
As Julia notes. You should not use the webpack dev server in your production environment, since it is not intended for this, so the question should not be how to configure the product proxy configuration with it. At the same time, if you really want you to be able to start the web server with a custom proxy configuration, for example:
ng serve --proxy-conf proxy.conf.json
What you need to do is use webpack via angular/cli to build the assembly assembly, and then move these files, which will be served by the static file server of your choice. Build the production package as follows:
ng build --prod
All of the above taken from your link https://jhipster.imtqy.com/using-angular/
Since you use JHipster, there are already guides and tools on how to get your code into production. Keep reading here: https://jhipster.imtqy.com/production/
I hope this points in the right direction
Hampus
source share