Skip to content

Document webpack change: improve merging of resolve and parsing options #3025

Open
@webpack-bot

Description

@webpack-bot

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

See pull request: webpack/webpack#9126


improve merging of resolve and parsing options
by rules and via loader API

Objects are deeply merged
Arrays overwrite by default, but can reference old value with "..."

fixes #8968

What kind of change does this PR introduce?
feature, maybe bugfix

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?
Rule.resolve/Rule.parser objects are now deeply merged.
In array the special "..." item can now be used to reference to old value, while otherwise array values overwrite each other.
This also affects the getResolve(options) API in the loader API

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