{"action":"created","issue":{"url":"https://api.github.com/repos/ngrx/core/issues/9","repository_url":"https://api.github.com/repos/ngrx/core","labels_url":"https://api.github.com/repos/ngrx/core/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/ngrx/core/issues/9/comments","events_url":"https://api.github.com/repos/ngrx/core/issues/9/events","html_url":"https://github.com/ngrx/core/issues/9","id":177580214,"number":9,"title":"UMD bundle unsuitable because other libs deep-import","user":{"login":"kylecordes","id":8799,"avatar_url":"https://avatars.githubusercontent.com/u/8799?v=3","gravatar_id":"","url":"https://api.github.com/users/kylecordes","html_url":"https://github.com/kylecordes","followers_url":"https://api.github.com/users/kylecordes/followers","following_url":"https://api.github.com/users/kylecordes/following{/other_user}","gists_url":"https://api.github.com/users/kylecordes/gists{/gist_id}","starred_url":"https://api.github.com/users/kylecordes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylecordes/subscriptions","organizations_url":"https://api.github.com/users/kylecordes/orgs","repos_url":"https://api.github.com/users/kylecordes/repos","events_url":"https://api.github.com/users/kylecordes/events{/privacy}","received_events_url":"https://api.github.com/users/kylecordes/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-17T14:27:56Z","updated_at":"2016-09-17T14:57:28Z","closed_at":"2016-09-17T14:57:28Z","body":"Last night's new version of store and core include UMD bundles in the box. That's great, but there is a problem.\r\n\r\nStore, as I write this, in the very first line of https://github.com/ngrx/store/blob/master/src/store.ts  performs a deep import from core.\r\n\r\nThis runs into the exact same problem, when you try to actually use the UMD bundles, as we have seen with RxJS + UMD + SystemJS: the combination of UMD and the system loader is unable to \"see\" deep imports in a UMD. This problem was also present in Angular itself for quite a while, until numerous Angular source files were changed such that the various sub libraries import from each other at the top level only. Since the published RxJS API makes extensive use of deep imports, the solution there has been to just not attempt to use RxJS with system and UMD..\r\n\r\nPossible solutions for NgRx:\r\n\r\n* Make core expose select at the top level façade, further follow the same rules as Angular itself, where each of the family of related libraries only imports from each other at the top level.\r\n* Make a custom store UMD bundle that includes the one tiny bit of core needs.\r\n\r\nI have been doing the latter, but it is an ugly hack I think...  And that means I'm still making my own bundle of store instead of using the shiny new one in the box.\r\n\r\n(Of course this only affects those neural cases where people care about loading all these libraries via UMDs. Demo apps. Plunkers. Training material, that one is my use case.)\r\n"},"comment":{"url":"https://api.github.com/repos/ngrx/core/issues/comments/247778671","html_url":"https://github.com/ngrx/core/issues/9#issuecomment-247778671","issue_url":"https://api.github.com/repos/ngrx/core/issues/9","id":247778671,"user":{"login":"kylecordes","id":8799,"avatar_url":"https://avatars.githubusercontent.com/u/8799?v=3","gravatar_id":"","url":"https://api.github.com/users/kylecordes","html_url":"https://github.com/kylecordes","followers_url":"https://api.github.com/users/kylecordes/followers","following_url":"https://api.github.com/users/kylecordes/following{/other_user}","gists_url":"https://api.github.com/users/kylecordes/gists{/gist_id}","starred_url":"https://api.github.com/users/kylecordes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylecordes/subscriptions","organizations_url":"https://api.github.com/users/kylecordes/orgs","repos_url":"https://api.github.com/users/kylecordes/repos","events_url":"https://api.github.com/users/kylecordes/events{/privacy}","received_events_url":"https://api.github.com/users/kylecordes/received_events","type":"User","site_admin":false},"created_at":"2016-09-17T14:57:28Z","updated_at":"2016-09-17T14:57:28Z","body":"Update from @MikeRyan52 : Core already exports the select stuff at the top - Store can be made to use that.\r\n\r\nI think that means there is no problem to solve any further from the \"core\" side. Things can be fixed by making store use the new top-level export.\r\n\r\n"}}
{"actor":{"display_login":"kylecordes"}}