Skip to content

chore: Enable package.json exports support #8294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 23, 2025
Merged

Conversation

devongovett
Copy link
Member

@devongovett devongovett commented May 23, 2025

In collaboration with @snowystinger. Prerequisite for Storybook 8 and RSC support for new website.

This enables package.json exports support in Parcel, and TypeScript's "moduleResolution": "bundler" mode. This makes our packages behave more like they do outside our repo. I added "source" fields to each export so that we can resolve without building the dist folders. And fallback "types" fields for source as well.

This means we can no longer access sub-paths from packages that are not exported. To do that, you can use relative paths (but be careful to only do that in tests/stories/docs, and not in published code).

@devongovett devongovett marked this pull request as ready for review May 23, 2025 01:00
@rspbot
Copy link

rspbot commented May 23, 2025

@devongovett devongovett added this pull request to the merge queue May 23, 2025
Merged via the queue into main with commit 8c33cba May 23, 2025
30 checks passed
@devongovett devongovett deleted the package-exports branch May 23, 2025 16:52
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.

4 participants