Conversation
🦋 Changeset detectedLatest commit: 61deb46 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
joshblack
left a comment
There was a problem hiding this comment.
Just left a comment! The only other thing that came to mind is that since "exports" is net new it might interfere with projects that are still including that dist path (since "exports" makes it strict what the package exports). Would it be worth adding support in for dist in the interim or are you doing this behind a major / making the changes downstream? Or is this not a problem, potentially?
I came to the same conclusion and added dist and src to the exports |
There was a problem hiding this comment.
Pull Request Overview
This PR adds simplified export mappings to the package.json to enable shorter import paths for CSS files, eliminating the need to specify the full dist/css/functional/ path structure.
- Adds
exportsfield to package.json with path mappings for CSS files - Updates documentation to demonstrate the new shorter import syntax
- Includes changeset for patch version bump
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| package.json | Adds exports configuration with simplified path mappings for CSS imports |
| README.md | Updates documentation to show new shorter import paths instead of full dist paths |
| .changeset/orange-hounds-unite.md | Adds changeset entry for the simplified exports feature |
joshblack
left a comment
There was a problem hiding this comment.
LGTM! Let me know if I can help try it out at all in PRC 👀
Yes, please @joshblack → primer/react#6469 |
Summary
Add simplified exports (→ imports) for css.
E.g.
Testing:
Primer CSS
Primer React
Github/github