Skip to content

fix(exports): Add ./package.json to publishConfig exports#3819

Open
EricWardner wants to merge 1 commit intoradix-ui:mainfrom
EricWardner:patch-1
Open

fix(exports): Add ./package.json to publishConfig exports#3819
EricWardner wants to merge 1 commit intoradix-ui:mainfrom
EricWardner:patch-1

Conversation

@EricWardner
Copy link

Description

Add "./package.json": "./package.json" to the publishConfig.exports map in packages/react/radix-ui/package.json.

The existing "./*" wildcard pattern intercepts require.resolve('radix-ui/package.json'), causing Node.js to look for ./dist/package.json.mjs instead of the actual file. This breaks tools like Storybook that resolve package.json to read package metadata.

The Node.js docs explicitly recommend exporting ./package.json when using an exports map to avoid breaking changes.

Fixes #3818

The [Node.js docs](https://nodejs.org/api/packages.html) explicitly recommend exporting `./package.json` when using an exports map to avoid breaking changes.

Fixes radix-ui#3818
@changeset-bot
Copy link

changeset-bot bot commented Feb 24, 2026

⚠️ No Changeset found

Latest commit: f39c279

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@EricWardner EricWardner changed the title Add ./package.json to publishConfig exports radix-ui: Add ./package.json to publishConfig exports Feb 24, 2026
@EricWardner EricWardner changed the title radix-ui: Add ./package.json to publishConfig exports fix(exports): Add ./package.json to publishConfig exports Feb 24, 2026
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.

radix-ui package exports map prevents resolving package.json

1 participant