Course lesson
Add a Local Package as a Dependency to an App Within a pnpm Workspace
Adding your local packages as dependencies in a pnpm worksapce mostly works the same way as adding external packages.
- Duration
- 4 min
- Access
- Included
- Transcript
- Retained from source evidence
Adding your local packages as dependencies in a pnpm worksapce mostly works the same way as adding external packages.
You can add them using the pnpm add command with a filter and the --workspace flag set. For example, pnpm add shared-ui --filter my-remix-app --workspace
The workspace flag ensures that it'll search for the package locally. Just make sure that you've remembered to run the build script in your package!