yarn patch — Yarn CLI reference

Extract a package so it can be patched

Docs/Reference/CLI/patch

yarn patch

Extract a package so it can be patched

yarn patch <IDENT>

This command extracts a package into a temporary directory where you can edit its files.

Once you’re done, run yarn patch-commit -s <path> with the printed temporary directory to generate a patch file and register it through the patch: protocol.

If the package is already patched, Yarn starts from the original package by default. Use -u,--update to apply the existing patch before editing.

#--update, -uboolean

Apply existing local patches before opening the editable copy

#--jsonboolean

Format the output as an NDJSON stream