Skip to content

Code splitting Angular 8 #14819

@aaronte

Description

@aaronte

🐞 bug report

Affected Package

The issue is caused by package @angular/cli

Is this a regression?

Yes, the previous version in which this bug was not present was 7.3.8.

Description

After the `import` statements have been adjusted by `angular` to use the standard `import()` for lazy loading, the output bundle now is bundling all of my lazy-loaded routes into the main bundle after updating to Angular 8.

🌍 Your Environment

Angular Version:




     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 8.0.3
Node: 12.1.0
OS: darwin x64
Angular: 8.1.0-next.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.13.8
@angular-devkit/build-angular      0.800.3
@angular-devkit/build-ng-packagr   0.800.3
@angular-devkit/build-optimizer    0.13.8
@angular-devkit/build-webpack      0.800.3
@angular-devkit/core               7.3.8
@angular-devkit/schematics         7.3.8
@angular/cdk                       7.3.7
@angular/cli                       8.0.3
@angular/flex-layout               7.0.0-beta.24
@angular/material                  7.3.7
@angular/pwa                       0.13.8
@ngtools/json-schema               1.1.0
@ngtools/webpack                   8.0.3
@schematics/angular                7.3.8
@schematics/update                 0.800.3
ng-packagr                         5.3.0
rxjs                               6.5.2
typescript                         3.4.5
webpack                            4.30.0

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions