ithaka / pharos

JSTOR's design system
https://pharos.jstor.org
MIT License
112 stars 15 forks source link

Add individual component exports #739

Closed brentswisher closed 2 months ago

brentswisher commented 2 months ago

This change: (check at least one)

Is this a breaking change? (check one)

Is the: (complete all)

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.

changeset-bot[bot] commented 2 months ago

🦋 Changeset detected

Latest commit: 42fe9363340e2d8809a1ca4ff8bca225fe8cc71b

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

github-actions[bot] commented 2 months ago

size-limit report 📦

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