-
Notifications
You must be signed in to change notification settings - Fork 53
Simplify exports #1243
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
base: main
Are you sure you want to change the base?
Simplify exports #1243
Conversation
🦋 Changeset detectedLatest commit: 1c7b569 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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 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
exports
field 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: