# Yarn Plug'n'Play

**Canonical:** https://apis.io/apis/yarn-pkg/yarn-plug-n-play/  
**Provider:** Yarn — https://apis.io/providers/yarn-pkg/  
**Documentation:** https://yarnpkg.com/features/pnp

Yarn Plug'n'Play is one of 10 APIs that [Yarn](https://apis.io/providers/yarn-pkg/) publishes on the [APIs.io](https://apis.io/) network. Tagged areas include Plug'n'Play, PnP, Module Resolution, and JavaScript. The published artifact set on APIs.io includes API documentation.

Plug'n'Play (PnP) is Yarn's alternative to the traditional node_modules folder. Yarn generates a single `.pnp.cjs` file containing the exact dependency tree which Node.js consults at runtime via a require hook. PnP enables faster installs, deterministic module resolution, and strict boundaries between declared and undeclared dependencies. A Rust implementation (pnp-rs) is available for non-Node runtimes.

## Machine-readable artifacts (3)

- **Documentation** — https://yarnpkg.com/features/pnp
- **SourceCode** — https://github.com/yarnpkg/berry/tree/master/packages/yarnpkg-pnp
- **SourceCode** — https://github.com/yarnpkg/pnp-rs

## Other Yarn APIs (9)

- [Yarn CLI](https://apis.io/apis/yarn-pkg/yarn-cli/)
- [Yarn Workspaces](https://apis.io/apis/yarn-pkg/yarn-workspaces/)
- [Yarn Zero-Installs](https://apis.io/apis/yarn-pkg/yarn-zero-installs/)
- [Yarn Constraints](https://apis.io/apis/yarn-pkg/yarn-constraints/)
- [Yarn Protocols](https://apis.io/apis/yarn-pkg/yarn-protocols/)
- [Yarn Plugin API](https://apis.io/apis/yarn-pkg/yarn-plugin-api/)
- [Yarn Version (Release Workflow)](https://apis.io/apis/yarn-pkg/yarn-version/)
- [Yarn Patch](https://apis.io/apis/yarn-pkg/yarn-patch/)
- [Yarn DLX](https://apis.io/apis/yarn-pkg/yarn-dlx/)

## Tags

Plug'n'Play, PnP, Module Resolution, JavaScript

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/yarn-pkg/yarn-plug-n-play/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/yarn-pkg/.
