
pnpm linkIf you’re tired of copy-pasting your local library into your app or publishing endless pre-release versions just to test a small change, there’s a better way.
pnpm link lets you connect your local package to your app, so you can debug and test changes without extra hassle.
Picture this:
Your my-app/package.json might look like this:
But you want to test changes in @cool/package without publishing it every time. Here’s how to use pnpm link.
@cool/package.my-app.To go back to the registry version:
my-app:
@cool/package:
pnpm link is a useful tool for local package development. It makes stepping into the code with breakpoints and debugging a breeze. See the PNPM docs on link for more details.