Aakash N Aakash N - 1 year ago 187
TypeScript Question

ng serve or ng build --prod doesn't generate dist folder in angular 4 application

I build an angular 4 app, and build it trough angular-cli 1.0.4 with the command "ng build --prod". So here I could not get a dist folder out of this to deploy in Microsoft azure. What should I do to get the dist folder after ng build --prod is done? Can someone help me with a better solution to publish my app to a server?

Answer Source

Use ng build --env=prod instead of ng build --prod and see if that helps. When I made a brand new project and ran ng build --prod, I got Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' error. But when I ran ng build --env=prod dist was generated fine.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download