Aakash N
Aakash N

Reputation: 61

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?

Upvotes: 0

Views: 2092

Answers (1)

RKG
RKG

Reputation: 612

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.

Upvotes: 1

Related Questions