2 Comments
Oct 5, 2023Liked by Zach Silveira

I also agree that `patch-package` is an amazing tool. It helps you remove blockers so you can move forward with your project.

One of the paint points though is that some packages you want to patch go through a build process where the code gets transpiled, bundled, or worse, minified. So it's not always easy to find the code in `node_modules` that you want to patch.

If you're able to build the package locally (and that's not always easy), you could then update the source and generate the package files to create the patch.

Expand full comment
author

Yeah that’s true. Most of the time I have to go to the build folder and search it for some value that won’t be changed during minification.

Thankfully in this case and how the react native bundler works, it is as easy as changing the source file 😁

Expand full comment