(with yarn)
working with a local version of a package
- change and build the consumed package locally
- link the consumed package in the consuming project
yarn link <local-path-to-consumed-package>
For more advanced use cases have a look at yalc.
use changes from local version
(… until changes are part of official package release :) )
- Create the Patch
yarn patch <package-name>
you will get the terminal output: “You can now edit the following folder: /tmp/…/user”
replace dist
and lib
folder with the equivalents from your local package copy
- Add the Patch
yarn patch-commit -s /tmp/.../user
(as shown in the terminal output)
You will get a new file in your .yarn/patches
folder and a resolutions entry in your package.json
.
(similar to: https://github.com/dermeck/feeds-sidebar/pull/151/commits/3ae028c7d2b70ecd2c5068ff81ed6a328eb48ce1)
- Apply the Patch
Perform an install with yarn