There are no exceptions or warnings in the console?

What version of Angular CLI are you using?

Have you tried 'ng serve -prod'?
Have you tried something like 'cd dist; http-server -o' or 'cd dist; 
lite-server'?

If you want to shrink your bundle sizes, you will want to run 'ng build 
-prod -aot' in order to enable tree shaking and other optimizations.

Michael Prentice
DevIntent <http://devintent.com/>
GDG Space Coast <http://gdgspacecoast.org/>

On Thursday, January 26, 2017 at 8:19:41 PM UTC-5, Patrick Caillouet wrote:
>
> Hi So I'm new to Angular and Angular CLI.
>
> I managed to get a new project setup with "ng new my-app".
>
> If i do the "ng serve" and then visit in the browser "localhost:4200", I 
> can see the default "app works" message... so i believe I have everything 
> up to this point correct.
>
> My question is about building for production... it just doesn't seem to 
> work (or maybe I'm just not looking at this the right way somehow). I run 
> the "ng build --prod" ... And I can see it create a "dist" folder with 
> stuff like "inline.#######.bundle.js", "main.########.bundle.js", 
> "index.html", and etc.
>
> But when I click on the index.html and launch it running localing in a 
> browser, it doesn't work. all I see is "Loading..." not the "app works" 
> message. It also doesn't work if I upload this online... nothing but 
> "Loading..."
>
> ALSO... and a BIG ALSO.. why is the default "app works" project bundled 
> like this (assuming I even get it working) with uglify and stuff... 
> 1.05MBs? most of it being the "vendor.######.bundle.js"... does it really 
> take 1 MB just to say 2 words?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to