0👍
✅
After many attempt to solve this problem, it turn out that Patch-Package do the best job to merge a dependency by simply patching over instead of forking.
Syntax is pretty simple and it integrate very well with NPM:
-
Installation:
npm i patch-package
-
Modify the code of your dependency directly in
node_modules
folder -
Run
npx patch-package some-package
where some-package is the name of your package to patch
https://github.com/ds300/patch-package
Documentation: https://github.com/ds300/patch-package
Source:stackexchange.com