Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Typescript 2, Webpack 2, Angular 2 upgrade? #318

Closed
asadsahi opened this issue Sep 17, 2016 · 9 comments
Closed

Typescript 2, Webpack 2, Angular 2 upgrade? #318

asadsahi opened this issue Sep 17, 2016 · 9 comments

Comments

@asadsahi
Copy link

I just wanted to understand if this upgrade will have any issues because of any aspnetcore-spa package require changes?

I have just managed to upgrade one of my project (based on angular 2 template of aspnetcore-spa generator) to typescript 2, webpack 2 and Angular 2 successfully. This project is still using "aspnet-webpack": "1.0.11".

Is there an official upgrade plan?

@MarkPieszak
Copy link
Contributor

I just posted the PR (#319) to upgrade to Angular 2.0.0, Universal 2.0.7, Preboot 4., and TypeScript 2.0 (which I needed to be able to include universal 2..

This includes the NgModules, separate ones for both Client & Server, and is connected with the latest Universal updates.

:)

@asadsahi
Copy link
Author

Good to hear that @MarkPieszak . What about webpack 2? Are we waiting for it to be final?

@MarkPieszak
Copy link
Contributor

I thought about it! But I believe we might need some changes to the asp-webpack package potentially, didn't want to get into all of that today 😛

Maybe next week? I believe they'll be out of beta real soon too.

@asadsahi
Copy link
Author

asadsahi commented Sep 17, 2016

I upgraded the same project to webpack 2 with current asp-webpack package and dev and prod files are generated without error. Had to upgrade some peer packages of webpack though. Probably need to get some work for Angular 2 AOT to include in production as optional step.

What is production story like in your pull request for Angular 2?

@hheexx
Copy link

hheexx commented Sep 18, 2016

I merged pull request with my project and nothing is broken.
Works perfectly for me in dev environment.
It's not yet in production, it will be in a month. I hope things will further stabilize until then.

Thanks a ton Mark for fast response!

@MarkPieszak
Copy link
Contributor

What do you mean by the production story? @asadsahi
We do (newly) support AoT compilation with Universal, but I haven't tried connecting it with .NET Core just yet, I can try and do that next with upgrading to webpack2.

Not a problem @hheexx 😀

@asadsahi
Copy link
Author

asadsahi commented Sep 18, 2016

Hi @MarkPieszak from production story I meant does your pull request cater for webpack production buids which compiles Angular 2 with AOT Cli and then rollup to reduce the bundle size. Also, haven't seen an example of same concept when it comes to Angular 2 lazy loaded routes where each bundle should have same production build story. Currently production builds produce bundle sizes in MBs just by uglifying javascript.

With AOT + Rollup + Gzip (hopefully by the server) bundle size should dramatically be reduced. For me that is the next big thing to see :)

@SteveSandersonMS
Copy link
Member

Lots of good info here - thanks for the info @MarkPieszak and @asadsahi. Closing as it's not a bug/issue, but the discussion can continue if desired.

@colltoaction
Copy link

Would love to see Webpack 2 working with aspnet-webpack, especially because of the tree shaking feature.

@asadsahi did you run into any issues when upgrading? Did you notice the expected size shrink with Webpack 2?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants