patch-package icon indicating copy to clipboard operation
patch-package copied to clipboard

Not sure if I'm clear on how to re-apply updated patch...

Open EdmundsEcho opened this issue 1 year ago • 0 comments

This is a great tool. I really like it. Thank you!

My issue is that I'm not seeing the updated patch without deleting node_modules.

I'm likely a bit confused about what to expect when I apply the patches. I'm in a React dev environment, so using node to serve the app. I have updated patches and can confirm visually that the changes are in the patches directory as expected. However, despite a forced reload of my browser, the updated patch does not show up.

Here is my workflow:

  1. update the source file in node_modules
  2. rebuild the patch with yarn patches/package-name
  3. visually confirm the updates by cat patches/package-name.patch
  4. apply the patch to my project ./node_modules/.bin/patch-package
  5. yarn start

I can also just run yarn install in step 4 because I have the "postinstall": "patch-package" entry in my package.json file.

Either way, I don't see the updated patch in the code loaded into the browser (despite a hard reload).

What works is deleting node_modules and running a fresh install. That workflow is troublesome, but hopefully, I can avoid it while debugging the patch.

Thank you in advance for any pointers!

EdmundsEcho avatar Apr 11 '24 17:04 EdmundsEcho