AoT lazy loaded chunk includes both template source and compiled template, vendor.js has no compiled template #4136
Labels
P1
Impacts a large percentage of users; if a workaround exists it is partial or overly painful
type: bug/fix
OS
Mac OSX (El Capitan)
Versions.
Angular 2.4.4 / CLI Beta.24
Repro steps.
Refactored a module, 'FooModule', into another repository, and used ngc to make it into an AoT compatible library
In main application, I npm install'd my library, and imported it for use,
pages/foo/module.ts:
routes.ts:
The log given by the failure.
Examining foo.chunk.js, I can see my entire template source:
But I also see the AoT pre-compiled code:
This was not the case prior to the refactoring. Prior, the same chunk only had AoT compiled code.
Also, I refactored some components that are not lazy loaded at all. Prior, these eager components were in the main.bundle.js, only as aot-compiled code. After refactoring, these eager components are in vendor.bundle.js (as expected), but only as a template-source.
The text was updated successfully, but these errors were encountered: