Skip to content

fix(react): externalize react-aria subpaths to prevent vendored copy - #6653

Merged
wingkwong merged 1 commit into
v3.2.1from
fix/issue-6651
Jun 17, 2026
Merged

fix(react): externalize react-aria subpaths to prevent vendored copy#6653
wingkwong merged 1 commit into
v3.2.1from
fix/issue-6651

Conversation

@wingkwong

@wingkwong wingkwong commented Jun 17, 2026

Copy link
Copy Markdown
Member

Closes #6651

📝 Description

The rollup external list only externalized the exact react-aria string (from dependencies) and react-aria-components subpaths, but not react-aria/* subpaths. As a result, subpath imports like react-aria/useFocusable (Tooltip) and react-aria/useCalendar (CalendarYearPicker) were bundled, and preserveModules vendored a full second copy of react-aria into dist/node_modules/.

That duplicate copy created its own FocusableContext, so in pnpm hoisted monorepos (where react-aria isn't deduped) Tooltip.Trigger consumed a different context than the react-aria-components provider, leaving the trigger non-focusable and the tooltip never opening.

Add /^react-aria($|\/)/ so all react-aria subpaths resolve against the consumer's single deduped copy. Both subpaths are public via react-aria's ./* exports, so externalizing is safe and removes the vendored dist/node_modules entirely.

⛳️ Current behavior (updates)

tooltip.js

import { useFocusable as $d1116acdf220c2da$export$4c014de7c8940b4c } from '../../node_modules/.pnpm/react-aria@3.49.0_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/react-aria/dist/private/interactions/useFocusable.js';

calendar-year-picker.js

import { useCalendarYearPicker as $e4b70edea91ee6b0$export$89757cae093b4b95 } from '../../node_modules/.pnpm/react-aria@3.49.0_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/react-aria/dist/private/calendar/useCalendarYearPicker.js';
import { useCalendarHeading as $bfcd16e7c55c9482$export$72ad8e10aa105341 } from '../../node_modules/.pnpm/react-aria@3.49.0_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/react-aria/dist/private/calendar/useCalendarHeading.js';

🚀 New behavior

tooltip.js

import { useFocusable } from 'react-aria/useFocusable';

calendar-year-picker.js

import { useCalendarYearPicker, useCalendarHeading } from 'react-aria/useCalendar';

💣 Is this a breaking change (Yes/No):

No

📝 Additional Information

@wingkwong
wingkwong requested a review from jrgarciadev as a code owner June 17, 2026 03:01
@wingkwong wingkwong added this to the v3.2.1 milestone Jun 17, 2026
@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
heroui Ready Ready Preview, Comment Jun 17, 2026 3:02am
heroui-sb Ready Ready Preview, Comment Jun 17, 2026 3:02am

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Jun 17, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@heroui/react@6653
npm i https://pkg.pr.new/@heroui/styles@6653

commit: c077ae3

@wingkwong
wingkwong merged commit 2176864 into v3.2.1 Jun 17, 2026
8 checks passed
@wingkwong
wingkwong deleted the fix/issue-6651 branch June 17, 2026 07:00
@wingkwong wingkwong mentioned this pull request Jun 17, 2026
jrgarciadev added a commit that referenced this pull request Jun 17, 2026
* fix(react): externalize react-aria subpaths to prevent vendored copy (#6653)

* chore(docs): add v3.2.1 release note

* fix(switch-group): add missing switch-group-items (#6655)

* fix(switch-group): add missing switch-group-items

* chore(docs): update release note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] - Tooltip never opens in a pnpm hoisted monorepo (v3.2.0): useFocusable resolves to a vendored react-aria, breaking FocusableContext

1 participant