Open matthew-dean opened 11 months ago
Oh.... patch-package
won't work with PNPM whatsoever? 😢
pnpm uses links on node_modules
, saving both space and time during installation and upgrades, but that also means you can't freely edit files there like you can for yarn and npm. That is why patch-package
won't work properly with pnpm, it would globally mess with all your projects and a patch in one project would conflict with patches on another project.
You can convert a patch-package
patch into a pnpm patch and vice-versa. You just need to change the prefix of the files. patch-package
is relative to the root of your project, so the path is /node_modules/<package_name>/<changed_file>
, pnpm is relative to the root of the package being patched, so the path is just /<changed_file>
While the documentation notes that
patch-package
is not needed for PNPM, a lot of people in this PNPM thread feel otherwise, for very good reasons. It's simply not as robust aspatch-package
. Is it possible to convert PNPM patches topatch-package
patches and then move forward with just usingpatch-package
?