How to link a local npm dependency with pnpm

I have learned how to correctly link a local npm dependency when using pnpm. Here is the process:

  1. Execute pnpm install ./your-library.tgz.
  2. Include the following code in your package.json file:
{
  "pnpm": {
    "overrides": {
      "your-library": "file:./your-library.version.tgz"
    }
  }
}

Your dependency should now be properly linked!