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

fix(octicons-styled): update how package is output to reduce bundle size #1027

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

joshblack
Copy link
Member

Closes #981

Update how @primer/octicons-styled is built so that it doesn't re-include icons in each entrypoint 😅

This seems to occur because rollup (at least in the previous version used) does not eliminate unused exports for each of the entry points that were being generated for icons. This PR updates our dependencies on rollup to the latest version and changes how these icons are emitted so that there is only ever one instance of the icons from octicons-react in the bundle.

This also points out that this package could also be importing directly from @primer/octicons-react but I'll save that for another change if we want to go down that route.

Copy link

changeset-bot bot commented Jun 25, 2024

🦋 Changeset detected

Latest commit: a7c3d36

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

This PR includes changesets to release 1 package
Name Type
@primer/octicons Minor

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

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.

[Bug]: Using styled-octicons in development mode significantly bloats bundle
1 participant