PatrickJS-starter icon indicating copy to clipboard operation
PatrickJS-starter copied to clipboard

update to rc.5

Open PatrickJS opened this issue 10 years ago • 74 comments

merge changes from https://github.com/AngularClass/angular2-seed

Angular 2 Seed will be the simple version of this repo. Both will be updated to Webpack 2

PatrickJS avatar Aug 09 '16 18:08 PatrickJS

Great!

aminebizid avatar Aug 09 '16 19:08 aminebizid

I have a simple version of the starter here https://github.com/AngularClass/angular2-seed that's updated to rc.5 it's where I experiment for changes in this repo

PatrickJS avatar Aug 09 '16 20:08 PatrickJS

I tried to use RC5 and ran into an issue with uri.match is not a function, which is caused by _split being called on moduleId by angular, which in the case of webpack is a number.

https://github.com/angular/angular/pull/10595 is a PR created by @mhamel06 to fix the issue.

shahmirn avatar Aug 10 '16 02:08 shahmirn

don't use moduleId in webpack

PatrickJS avatar Aug 10 '16 02:08 PatrickJS

How about dependencies being used in the project that are using moduleId that we have no control over?

shahmirn avatar Aug 10 '16 02:08 shahmirn

@shahmirn are they public deps on github? if so can you give me a link to the repo. You would use a loader to rewrite it and remove the moduleId but I need to create it.

PatrickJS avatar Aug 10 '16 02:08 PatrickJS

sorry not at computer now but I think my issue may have been from the material repo, since I still had the issue after removing my moduleIDs. this is with the latest Ng module version. https://github.com/angular/material2/blob/master/src/components/sidenav/sidenav.ts

I think ensuring that the _split function is only called with the expected type should fix the core issue.

mhamel06 avatar Aug 10 '16 03:08 mhamel06

@mhamel06 @shahmirn ok fixed via https://github.com/AngularClass/angular2-seed/commit/84aacc18682bbe38631cd3c457d9e90944d6fd0e

PatrickJS avatar Aug 10 '16 04:08 PatrickJS

when rc5 will be updated in this project? @gdi2290 thank you

houko avatar Aug 10 '16 06:08 houko

@gdi2290 the seed repo uses webpack 2, is it planned to update this starter repo to webpak 2 as well?

snird avatar Aug 11 '16 09:08 snird

yup this repo will be updated to webpack2 and rc5

PatrickJS avatar Aug 11 '16 18:08 PatrickJS

eta?

DzmitryShylovich avatar Aug 11 '16 18:08 DzmitryShylovich

Looking forward to this, if you'd like me or the 100 other people here waiting for this to help, let us know how!

I noticed when trying to update my own project that the hot loading stuff might be a bit ?? with rc5. Because you have to declare all of the components in a single place. Are we going to make multiple modules for a project, maybe? Seems really a lot more complicated than before.

paralin avatar Aug 11 '16 22:08 paralin

Agree with @paralin , I also concern that if we're putting all the deps in one place, isn't it break the encapsulation of each component as they might depend on other libs that are not imported.

yyyyyyuanfei avatar Aug 12 '16 09:08 yyyyyyuanfei

I'm currently playing with this repo, and I see that using modules changed pretty much everything in the app organization. Hope to see the updated version soon, this is a really good starting point for new apps.

ghost avatar Aug 12 '16 20:08 ghost

Has anyone hacked together a workaround that will allow use with rc5 for existing rc4 applications?

abierbaum avatar Aug 12 '16 20:08 abierbaum

I can work on a webpack loader that will convert code from rc4 to rc5 NgModule

PatrickJS avatar Aug 12 '16 20:08 PatrickJS

I would prefer to see how we can integrate aot compilation into webpack build process.

DzmitryShylovich avatar Aug 12 '16 21:08 DzmitryShylovich

In the release notes they said something like "rc4 apps should still work" but they really don't, I don't see how they think it's a good idea to release another rc and just completely nuke the entire workflow everyone had been using, I mean it makes sense in unstable development software but these are release candidates, not alpha or beta versions. And the fact that we have to declare all of our modules at start means we can't shard with webpack anymore, as far as I can tell.

There's a pretty big discussion on this on an issue on the angular repo, I don't have the link right now, but it's possible they will change a lot of these things before rc6.

At the moment I'm a resigned to staying with rc4 until they fix this stuff.

paralin avatar Aug 12 '16 21:08 paralin

Actually rc5 is made to be compatible with rc4. Anyway my app worked fine after some adjustments, just have to change about everything from bootstrap to the router, enclose components in modules, change the way directives are loaded and it should work.

ghost avatar Aug 12 '16 21:08 ghost