Skip to content
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

Add individual component exports #739

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

brentswisher
Copy link
Contributor

This change: (check at least one)

  • Adds a new feature
  • Fixes a bug
  • Improves maintainability
  • Improves documentation
  • Is a release activity

Is this a breaking change? (check one)

  • Yes
  • No

Is the: (complete all)

  • Title of this pull request clear, concise, and indicative of the issue number it addresses, if any?
  • Test suite(s) passing?
  • Code coverage maximal?
  • Changeset added?
  • Component status page up to date?

What does this change address?
Fixes #738

How does this change work?
We recently added an exports key to the package.json, which made
it so that components could only be imported from the root of the
package. In some situations this is not desired as it makes it more
difficult to share components between projects using module sharing
and causes bloat in the bundle. This commit adds back the individual
component exports.

Additional context
I had considered removing the `exports1 key entirely as it looks like the initial use case (#212) is no longer valid, in that we explicitly don't want to , but adding the components was easy enough because it accepts a glob pattern so this seems like the best of both worlds, consumers can import them however they see fit for their application.

We recently added an exports key to the package.json, which made
it so that components could only be imported from the root of the
package. In some situations this is not desired as it makes it more
difficult to share components between projects using module sharing
and causes bloat in the bundle. This commit adds back the individual
component exports.
@brentswisher brentswisher self-assigned this Apr 10, 2024
@brentswisher brentswisher requested a review from a team as a code owner April 10, 2024 14:16
@brentswisher brentswisher requested review from sirrah-tam, mtorres3 and satya-achanta-venkata and removed request for a team April 10, 2024 14:16
Copy link

changeset-bot bot commented Apr 10, 2024

🦋 Changeset detected

Latest commit: 42fe936

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@ithaka/pharos Patch

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

Copy link
Contributor

size-limit report 📦

Path Size
packages/pharos/lib/index.js 64.42 KB (0%)

@brentswisher brentswisher merged commit f026ecb into develop Apr 10, 2024
11 checks passed
@brentswisher brentswisher deleted the bugfix/add-individual-component-exports branch April 10, 2024 19:27
@github-actions github-actions bot mentioned this pull request Apr 10, 2024
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.

Individual component imports regression
5 participants