Skip to content

feat: enable yarn pnp by process.versions.pnp#3224

Merged
stormslowly merged 5 commits intomainfrom
fix/enable_pnp_by_process_version
Mar 13, 2026
Merged

feat: enable yarn pnp by process.versions.pnp#3224
stormslowly merged 5 commits intomainfrom
fix/enable_pnp_by_process_version

Conversation

@stormslowly
Copy link
Copy Markdown
Contributor

@stormslowly stormslowly commented Mar 13, 2026

Summary

Align with pnp resolve feature with Rspack

Related Issue

close #1246

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings March 13, 2026 06:07
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Mar 13, 2026

Deploying rspress-v2 with  Cloudflare Pages  Cloudflare Pages

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

View logs

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.pnp to two of the three Resolver instantiations in reactAlias.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.

Comment thread packages/core/src/node/utils/reactAlias.ts
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 13, 2026

Rsdoctor Bundle Diff Analysis

Found 3 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
node 12.4 MB 0
web 16.1 MB 0
node_md 1.6 MB 0

Generated by Rsdoctor GitHub Action

@stormslowly stormslowly requested a review from SoonIter March 13, 2026 07:05
@SoonIter
Copy link
Copy Markdown
Member

#1246

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Mar 13, 2026

Open in StackBlitz

@rspress/core

npm i https://pkg.pr.new/@rspress/core@3224

create-rspress

npm i https://pkg.pr.new/create-rspress@3224

@rspress/plugin-algolia

npm i https://pkg.pr.new/@rspress/plugin-algolia@3224

@rspress/plugin-api-docgen

npm i https://pkg.pr.new/@rspress/plugin-api-docgen@3224

@rspress/plugin-client-redirects

npm i https://pkg.pr.new/@rspress/plugin-client-redirects@3224

@rspress/plugin-llms

npm i https://pkg.pr.new/@rspress/plugin-llms@3224

@rspress/plugin-playground

npm i https://pkg.pr.new/@rspress/plugin-playground@3224

@rspress/plugin-preview

npm i https://pkg.pr.new/@rspress/plugin-preview@3224

@rspress/plugin-rss

npm i https://pkg.pr.new/@rspress/plugin-rss@3224

@rspress/plugin-sitemap

npm i https://pkg.pr.new/@rspress/plugin-sitemap@3224

@rspress/plugin-twoslash

npm i https://pkg.pr.new/@rspress/plugin-twoslash@3224

@rspress/plugin-typedoc

npm i https://pkg.pr.new/@rspress/plugin-typedoc@3224

@rspress/shared

npm i https://pkg.pr.new/@rspress/shared@3224

commit: 5cc6eae

@stormslowly stormslowly enabled auto-merge (squash) March 13, 2026 07:22
@SoonIter
Copy link
Copy Markdown
Member

https://github.com/SoonIter/rspress-yarn-pnp-v2

enableGlobalCache: false is required

// .yarnrc.yaml
yarnPath: .yarn/releases/yarn-4.12.0.cjs
enableGlobalCache: false

@stormslowly stormslowly merged commit 47392b9 into main Mar 13, 2026
6 checks passed
@stormslowly stormslowly deleted the fix/enable_pnp_by_process_version branch March 13, 2026 09:51
@malyzeli
Copy link
Copy Markdown

@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 yarn install) provides links to respective files automatically.

@SoonIter
Copy link
Copy Markdown
Member

@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 yarn install) provides links to respective files automatically.

web-infra-dev/rspack#13382

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support latest stable version of Yarn by default

4 participants