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