Make it clear that Yarn 2 does support ESM when you disable Plug 'n Play (#584)

This commit is contained in:
DawnOfMidnight 2021-06-30 09:57:32 -04:00 committed by GitHub
parent d1785d80c3
commit 66d62fca37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,7 +35,7 @@ shamefully-hoist = true
### Yarn
[Yarn](https://yarnpkg.com/) works as a package manager in Astro apps. However, __Yarn 2__ changes how module resolution works in Node apps and doesn't support modules written in ESM at the moment. Since Astro is written entirely in ESM, you can't use Yarn 2 in Astro apps. We'll continue to track Yarn 2 as they fix these core bugs.
[Yarn](https://yarnpkg.com/) works as a package manager in Astro apps. However, __Yarn 2__'s Plug'n'Play feature, aka 'pnp', changes how module resolution works in Node apps and doesn't support modules written in ESM at the moment. Since Astro is written entirely in ESM, you can't use the pnp feature. in Astro apps. We'll continue to track this feature as they fix these core bugs. However, you can disable pnp by adding `nodeLinker: 'node-modules'` to your `.yarnrc.yml`, which will make Yarn 2 compatible with Astro.
### 🚀 Build & Deployment