@yarnpkg/plugin-patch
This plugin adds support for the patch: protocol.
Install
This plugin is included by default in Yarn.
Usage
-
Run
and edit the resulting folder.yarn patch <package name> -
Once you're ready, run
to store the result inside ayarn patch-commit -s <patch folder>.patchfile. -
Add the
patch:protocol to your dependencies as such:
{
"dependencies": {
"lodash": "patch:lodash@1.0.0#./my-patch-file.patch"
}
}
Caveat
You cannot add dependencies through the patch: protocol. Check this FAQ entry for more details.