Skip to content

Externalizing @angular/core prevents lazy modules for being output in build #25

@RobM-ADP

Description

@RobM-ADP

If you create a lazy route in the child app, it's bundle will not be output if you externalize @angular/core.

Output when externalizing @angular/core

Date: 2019-09-19T14:06:00.436Z
Hash: 1ba7b76feb140a6f03ca
Time: 10742ms
chunk {0} main.js (main) 86.1 kB [entry] [rendered]

Output when not:

Date: 2019-09-19T14:08:00.527Z
Hash: 3eea3c3c57d46b231890
Time: 10129ms
chunk {0} main.js (main) 199 kB [entry] [rendered]
chunk {1} 1.js () 867 bytes  [rendered]

1.js is the lazy route module. Obviously you can see that the main.js is more than twice the size when not externalizing core.

NOTE: I don't expect lazy routes to actually work out of the box at the momement since the location from which they load would be wrong but before solving that problem, I need to bundle to get generated at least.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions