Skip to content

Consolidate the optimization.runtimeChunk true and 'single' options #7066

@edmorley

Description

@edmorley

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
If optimization.runtimeChunk is set to true, multiple runtime chunks are created if there is more than one entrypoint. To avoid this, optimization.runtimeChunk has to be set to 'single' instead.

What is the expected behavior?
That optimization.runtimeChunk: true does the right thing even when there are multiple entrypoints, and the 'single' option be deprecated then eventually removed.

If this is a feature request, what is motivation or use case for changing the behavior?

  • as an end-user it's confusing to have two options (true and 'single') to switch on what is mostly the same feature, where one (true) is actually 'broken'/suboptimal for multi-entrypoints. (In the docs and blog posts, people often forget to emphasise the need to use 'single')
  • I can't see a disadvantage for using 'single' even when there is only one entry-point - so why not make that be the behaviour for true?

Many thanks :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions