feat: enable yarn pnp by process.versions.pnp#3224
Conversation
Deploying rspress-v2 with
|
| Latest commit: |
6b05123
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fefd3f7a.rspress-v2.pages.dev |
| Branch Preview URL: | https://fix-enable-pnp-by-process-ve.rspress-v2.pages.dev |
There was a problem hiding this comment.
Pull request overview
This PR enables Yarn PnP (Plug'n'Play) support for the Resolver instances used to resolve React-related package aliases, by passing enablePnp: !!process.versions.pnp to the resolver options. This aligns Rspress's resolution behavior with Rspack's PnP support.
Changes:
- Added
enablePnp: !!process.versions.pnpto two of the threeResolverinstantiations inreactAlias.ts.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Rsdoctor Bundle Diff AnalysisFound 3 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
@rspress/core
create-rspress
@rspress/plugin-algolia
@rspress/plugin-api-docgen
@rspress/plugin-client-redirects
@rspress/plugin-llms
@rspress/plugin-playground
@rspress/plugin-preview
@rspress/plugin-rss
@rspress/plugin-sitemap
@rspress/plugin-twoslash
@rspress/plugin-typedoc
@rspress/shared
commit: |
|
https://github.com/SoonIter/rspress-yarn-pnp-v2
// .yarnrc.yaml
yarnPath: .yarn/releases/yarn-4.12.0.cjs
enableGlobalCache: false |
|
@SoonIter just to clarify - global cache just affects if downloaded packages are stored in homedir or directly in the project, but it definitely shouldn't play role in ability to resolve dependencies via PnP, because pnp loader (generated during |
|
Summary
Align with
pnpresolve feature with RspackRelated Issue
close #1246
Checklist