Skip to content

ngtools/webpack: Using externals prevents splitting off lazy modules #11490

@manfredsteyer

Description

@manfredsteyer

Bug Report or Feature Request (mark with an x)

- [ x ] bug report -> please search issues before submitting
- [ ] feature request

Area

- [ x ] devkit
- [ ] schematics

Versions

Node: v8.11.3
npm: 5.8.0

Repro steps

Once you define externals in an webpack config, ngtools/webpack does not split off lazy modules anymore.

  1. Clone https://github.com/manfredsteyer/simple-webpack-config
  2. npm i
  3. npm run build
  4. We get two bundles; a main bundle and a lazy chunk
  5. Open webpack.config and remove comments around externals block
  6. npm run build
  7. Now, we get only one bundle

Desired functionality

We should also get two bundles in step 8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions