{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular-cli/issues/12859","repository_url":"https://api.github.com/repos/angular/angular-cli","labels_url":"https://api.github.com/repos/angular/angular-cli/issues/12859/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular-cli/issues/12859/comments","events_url":"https://api.github.com/repos/angular/angular-cli/issues/12859/events","html_url":"https://github.com/angular/angular-cli/issues/12859","id":377046752,"node_id":"MDU6SXNzdWUzNzcwNDY3NTI=","number":12859,"title":"Let 'lazyModules' option support modules from outside root in AOT mode","user":{"login":"woppa684","id":10152542,"node_id":"MDQ6VXNlcjEwMTUyNTQy","avatar_url":"https://avatars2.githubusercontent.com/u/10152542?v=4","gravatar_id":"","url":"https://api.github.com/users/woppa684","html_url":"https://github.com/woppa684","followers_url":"https://api.github.com/users/woppa684/followers","following_url":"https://api.github.com/users/woppa684/following{/other_user}","gists_url":"https://api.github.com/users/woppa684/gists{/gist_id}","starred_url":"https://api.github.com/users/woppa684/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woppa684/subscriptions","organizations_url":"https://api.github.com/users/woppa684/orgs","repos_url":"https://api.github.com/users/woppa684/repos","events_url":"https://api.github.com/users/woppa684/events{/privacy}","received_events_url":"https://api.github.com/users/woppa684/received_events","type":"User","site_admin":false},"labels":[{"id":815673615,"node_id":"MDU6TGFiZWw4MTU2NzM2MTU=","url":"https://api.github.com/repos/angular/angular-cli/labels/comp:%20ngtools/webpack","name":"comp: ngtools/webpack","color":"c7def8","default":false},{"id":531674979,"node_id":"MDU6TGFiZWw1MzE2NzQ5Nzk=","url":"https://api.github.com/repos/angular/angular-cli/labels/freq2:%20medium","name":"freq2: medium","color":"fbca04","default":false},{"id":531675405,"node_id":"MDU6TGFiZWw1MzE2NzU0MDU=","url":"https://api.github.com/repos/angular/angular-cli/labels/severity3:%20broken","name":"severity3: broken","color":"5319e7","default":false},{"id":220593710,"node_id":"MDU6TGFiZWwyMjA1OTM3MTA=","url":"https://api.github.com/repos/angular/angular-cli/labels/type:%20bug/fix","name":"type: bug/fix","color":"EEEEEE","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/angular/angular-cli/milestones/12","html_url":"https://github.com/angular/angular-cli/milestone/12","labels_url":"https://api.github.com/repos/angular/angular-cli/milestones/12/labels","id":3561109,"node_id":"MDk6TWlsZXN0b25lMzU2MTEwOQ==","number":12,"title":"Backlog","description":"Milestone for triaged issues that have not yet been scheduled for resolution.","creator":{"login":"alexeagle","id":47395,"node_id":"MDQ6VXNlcjQ3Mzk1","avatar_url":"https://avatars2.githubusercontent.com/u/47395?v=4","gravatar_id":"","url":"https://api.github.com/users/alexeagle","html_url":"https://github.com/alexeagle","followers_url":"https://api.github.com/users/alexeagle/followers","following_url":"https://api.github.com/users/alexeagle/following{/other_user}","gists_url":"https://api.github.com/users/alexeagle/gists{/gist_id}","starred_url":"https://api.github.com/users/alexeagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexeagle/subscriptions","organizations_url":"https://api.github.com/users/alexeagle/orgs","repos_url":"https://api.github.com/users/alexeagle/repos","events_url":"https://api.github.com/users/alexeagle/events{/privacy}","received_events_url":"https://api.github.com/users/alexeagle/received_events","type":"User","site_admin":false},"open_issues":129,"closed_issues":117,"state":"open","created_at":"2018-08-10T14:47:31Z","updated_at":"2018-11-30T22:10:19Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2018-11-03T11:36:08Z","updated_at":"2018-12-01T14:03:13Z","closed_at":null,"author_association":"NONE","body":"### Bug Report or Feature Request (mark with an `x`)\r\n```\r\n- [ ] bug report -> please search issues before submitting\r\n- [X] feature request\r\n```\r\n\r\n### Command (mark with an `x`)\r\n```\r\n- [ ] new\r\n- [X] build\r\n- [X] serve\r\n- [ ] test\r\n- [ ] e2e\r\n- [ ] generate\r\n- [ ] add\r\n- [ ] update\r\n- [ ] lint\r\n- [ ] xi18n\r\n- [ ] run\r\n- [ ] config\r\n- [ ] help\r\n- [ ] version\r\n- [ ] doc\r\n```\r\n\r\n### Versions\r\n```\r\nAngular CLI: 7.0.3\r\nNode: 8.11.3\r\nOS: win32 x64\r\nAngular: 7.0.1\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... http, language-service, platform-browser\r\n... platform-browser-dynamic, router\r\n\r\nPackage                            Version\r\n------------------------------------------------------------\r\n@angular-devkit/architect          0.10.3\r\n@angular-devkit/build-angular      0.10.3\r\n@angular-devkit/build-ng-packagr   0.10.3\r\n@angular-devkit/build-optimizer    0.10.3\r\n@angular-devkit/build-webpack      0.10.3\r\n@angular-devkit/core               7.0.3\r\n@angular-devkit/schematics         7.0.3\r\n@angular/cli                       7.0.3\r\n@ngtools/json-schema               1.1.0\r\n@ngtools/webpack                   7.0.3\r\n@schematics/angular                7.0.3\r\n@schematics/update                 0.10.3\r\nng-packagr                         4.4.0\r\nrxjs                               6.3.3\r\ntypescript                         3.1.4\r\nwebpack                            4.19.1\r\n```\r\n\r\n### Repro steps\r\nThe addition of the 'lazyModules' option was something that people have been asking for for quite some time (to not \"abuse\" to router to create chunks). Unfortunately the lazyModules option still requires the module to be in the src folder, and therefore it is not possible to lazy load a module from a component library or an external dependency in node_modules. At the moment te only way to achieve this is to create another module that is somewhere under the src folder and imports the external module.\r\n\r\nThis works:\r\n```\r\nlazyModules: [\"src/app/proxies/sample-lib.proxy\"]\r\n```\r\n\r\n```ts\r\nimport { NgModule } from '@angular/core';\r\nimport { SampleLibModule, SampleLibComponent } from 'sample-lib';\r\n\r\n@NgModule({\r\n    imports: [SampleLibModule],\r\n    entryComponents: [SampleLibComponent]\r\n})\r\nexport class SampleLibProxyModule {\r\n\r\n}\r\n```\r\nand this doesn't\r\n```\r\nlazyModules: [\"projects/sample-lib/sample-lib.module\"]\r\n```\r\n\r\n### The log given by the failure\r\nIt curently fails with something like\r\n```\r\nERROR in ./src/$$_lazy_route_resource lazy namespace object\r\nModule not found: Error: Can't resolve '<mypath>/projects/sample-lib/src/lib/sample-lib.module.ngfactory.js' in <mypath>\\src\\$$_lazy_route_resource'\r\n``` \r\n\r\n### Desired functionality\r\nlazyModules also supports including modules from node_modules and projects folders.\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular-cli/issues/comments/443428497","html_url":"https://github.com/angular/angular-cli/issues/12859#issuecomment-443428497","issue_url":"https://api.github.com/repos/angular/angular-cli/issues/12859","id":443428497,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzQyODQ5Nw==","user":{"login":"sengirab","id":15229540,"node_id":"MDQ6VXNlcjE1MjI5NTQw","avatar_url":"https://avatars0.githubusercontent.com/u/15229540?v=4","gravatar_id":"","url":"https://api.github.com/users/sengirab","html_url":"https://github.com/sengirab","followers_url":"https://api.github.com/users/sengirab/followers","following_url":"https://api.github.com/users/sengirab/following{/other_user}","gists_url":"https://api.github.com/users/sengirab/gists{/gist_id}","starred_url":"https://api.github.com/users/sengirab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sengirab/subscriptions","organizations_url":"https://api.github.com/users/sengirab/orgs","repos_url":"https://api.github.com/users/sengirab/repos","events_url":"https://api.github.com/users/sengirab/events{/privacy}","received_events_url":"https://api.github.com/users/sengirab/received_events","type":"User","site_admin":false},"created_at":"2018-12-01T14:03:13Z","updated_at":"2018-12-01T14:03:13Z","author_association":"NONE","body":"I'm using `\"@nrwl/nx\": \"7.1.1` for our folder structure and management.\r\n\r\nFolder structure is:\r\n![49329013-9980c080-f579-11e8-82bb-f9dadfe94f77](https://user-images.githubusercontent.com/15229540/49329035-d482f400-f579-11e8-92a2-be9fbeb0ce29.png)\r\n\r\nI'm thinking that this issue is related, since i'm getting the same error after updating `@angular-devkit/build-angular` which is using a newer version of webpack.\r\n\r\nIm getting the error: `ERROR in ./src/$$_lazy_route_resource lazy namespace object.`\r\n\r\nFor now i resolved my issue by migrating back to `\"@angular-devkit/build-angular\": \"0.9.0-rc.3\"`."}}
{"actor":{"display_login":"sengirab"}}