Course lesson
Create a Shared Library in a pnpm Workspace
You can create private libraries in your monorepo that you can share between your other packages and applications.
- Duration
- 4 min
- Access
- Included
- Transcript
- Retained from source evidence
You can create private libraries in your monorepo that you can share between your other packages and applications.
To do this all you need to do is create a new folder containing a package.json in your packages directory. You can then use pnpm filter commands to add external libraries to your package without ever having to cd into it!
Then just make sure to create an entry point and set the main field in your package.json to where your code will compile when built.