Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React: Patching package.json using patch-package

I am using the patch-package to patch a package.json file of one of my dependencies. I modified the package.json and ran npx patch-package [dependency_name] but it not capturing the changes made to the package.json. However, changes made to other files like index.js are captured. How do I patch the package.json? I am trying to modify the module and jsnext:main attributes.

like image 212
kunji mamu Avatar asked Jan 20 '26 21:01

kunji mamu


1 Answers

npx patch-package some-package --exclude 'nothing'

https://github.com/ds300/patch-package/issues/49#issuecomment-646581987

like image 113
lukeliasi Avatar answered Jan 22 '26 14:01

lukeliasi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!