Skip to content

How to use "merge: false" in api.extendPackage #4779

Closed
@deraw

Description

@deraw

Version

4.0.5

Environment info

  System:
    OS: Linux 4.15 Ubuntu 18.04.3 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  Binaries:
    Node: 12.1.0 - /usr/local/bin/node
    Yarn: 1.19.1 - /usr/bin/yarn
    npm: 6.12.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 78.0.3904.70
    Firefox: 70.0
  npmGlobalPackages:
    @vue/cli: 4.0.3

Steps to reproduce

Create a plugin and try to override a field in package.json in a generator.

What is expected?

In the documentation of api.extendPackage(), it is stated that "Nested fields are deep-merged unless { merge: false } is passed."

What is actually happening?

I don't see any part that handles this case in the code, I don't known how to override a field 🙁

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