Skip to content

Document webpack change: Refactoring to move runtime into RuntimeModules #2679

Open
@webpack-bot

Description

@webpack-bot

A pull request by @sokra was merged and maintainers requested a documentation change.

See pull request: webpack/webpack#8438


Also:

  • Only include runtime pieces that are needed for the application
  • Allow to lazy-load and hot-load runtime modules
  • Refactor HMR to allow other modules types
  • fix a few bugs
  • removed ExtendedAPIPlugin and merge logic into APIPlugin
    • As runtime is injected on usage, there is no need to manually opt-in via plugin
  • removed a few unused hooks in MainTemplate
  • Module has now a getRuntimeRequirements method to the runtime requirements
  • DependencyTemplates receive a runtimeRequirements argument on apply on which requirements can be added

What kind of change does this PR introduce?
refactoring

Did you add tests for your changes?
yes

Does this PR introduce a breaking change?
yes

What needs to be documented once your changes are merged?

  • some hooks of MainTemplate were removed
  • new hooks for runtimeRequirements in Compilation were added

Metadata

Metadata

Assignees

No one assigned

    Labels

    webpack5Docs for webpack 5

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions