Title: ng build -aot error 'entry.split is not a function' on lazy loaded modules · Issue #3204 · angular/angular-cli · GitHub
Open Graph Title: ng build -aot error 'entry.split is not a function' on lazy loaded modules · Issue #3204 · angular/angular-cli
X Title: ng build -aot error 'entry.split is not a function' on lazy loaded modules · Issue #3204 · angular/angular-cli
Description: OS? Windows 10 Versions. 1.0.0-beta.20-4 The log given by the failure. C:\Projects\Cli>ng build -prod -aot 10% building modules 2/2 modules 0 active entry.split is not a function TypeError: entry.split is not a function at Function.Modul...
Open Graph Description: OS? Windows 10 Versions. 1.0.0-beta.20-4 The log given by the failure. C:\Projects\Cli>ng build -prod -aot 10% building modules 2/2 modules 0 active entry.split is not a function TypeError: entry.s...
X Description: OS? Windows 10 Versions. 1.0.0-beta.20-4 The log given by the failure. C:\Projects\Cli>ng build -prod -aot 10% building modules 2/2 modules 0 active entry.split is not a function TypeError: entr...
Opengraph URL: https://github.com/angular/angular-cli/issues/3204
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ng build -aot error 'entry.split is not a function' on lazy loaded modules","articleBody":"### OS?\r\n> Windows 10\r\n\r\n### Versions.\r\n1.0.0-beta.20-4\r\n\r\n### The log given by the failure.\r\nC:\\Projects\\Cli>ng build -prod -aot\r\n 10% building modules 2/2 modules 0 active entry.split is not a function\r\nTypeError: entry.split is not a function\r\n at Function.ModuleRoute.fromString (C:\\Projects\\Cli\\node_modules\\@ngtools\\webpack\\src\\plugin.js:24:27)\r\n at C:\\Projects\\Cli\\node_modules\\@ngtools\\webpack\\src\\plugin.js:244:34\r\n at Array.map (native)\r\n at AotPlugin._processNgModule (C:\\Projects\\Cli\\node_modules\\@ngtools\\webpack\\src\\plugin.js:243:14)\r\n at C:\\Projects\\Cli\\node_modules\\@ngtools\\webpack\\src\\plugin.js:217:39\r\n at process._tickCallback (internal/process/next_tick.js:103:7)\r\n\r\n### Mention any other details that might be useful.\r\nI understand that this feature is still under development but FYI...\r\nLine 24 of node_modules/@ngtools/webpack\\src\\plugin.js\r\n`var split = entry.split('#');`\r\nLooks like it expects SystemJs module path like `my.module#MyModule`\r\nBut this format doesn't work with webpack. In order to lazy load modules I use es6-promise-loader and it looks like this:\r\n```\r\nexport function loadMyModule() {\r\n return require('es6-promise!./my.module')('MyModule');\r\n}\r\nexport const appRoutes: Routes = [\r\n {path: 'my', loadChildren: loadMyModule},\r\n]\r\n\r\n```\r\nSo, the `entry` parameter of `ModuleRoute.fromString` (line 23) is not a string but rather something like this:\r\n```\r\nactiveStaticSymbol {\r\n filePath: 'C:/Projects/Cli/src/app/app.routing.ts',\r\n name: 'loadMyModule',\r\n members: undefined }\r\n```","author":{"url":"https://github.com/ctrl-brk","@type":"Person","name":"ctrl-brk"},"datePublished":"2016-11-19T07:09:44Z","url":"https://github.com/angular/angular-cli/issues/3204"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f6a5aa0b-48a0-a808-1677-6d94721489ef |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B8CE:ADA9D:17F76B3:1ECD70E:6B013049 |
| html-safe-nonce | f01801f00a10f05c3006011f423e3db4daf01a5f557a08f22a408ddedb196b71 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOENFOkFEQTlEOjE3Rjc2QjM6MUVDRDcwRTo2QjAxMzA0OSIsInZpc2l0b3JfaWQiOiIyOTMzMjIwNzI1MTYwNDg5MDMzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f4373382dd99b42d4c813d3ced8b128e01f8bf5c70f715ec582133ddb39ec3bb |
| hovercard-subject-tag | issue:190481632 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/3204/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e45eb293d14c3ce94e4978ea65c037015e76f81e1fb8fbbe0a555c9e945d2a06/angular/angular-cli/issues/3204 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e45eb293d14c3ce94e4978ea65c037015e76f81e1fb8fbbe0a555c9e945d2a06/angular/angular-cli/issues/3204 |
| og:image:alt | OS? Windows 10 Versions. 1.0.0-beta.20-4 The log given by the failure. C:\Projects\Cli>ng build -prod -aot 10% building modules 2/2 modules 0 active entry.split is not a function TypeError: entry.s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ctrl-brk |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width