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

All Palmetto Design Tokens icons are included in build instead of only the ones that are used #593

Open
mtblanton opened this issue Aug 25, 2021 · 5 comments

Comments

@mtblanton
Copy link
Contributor

image

If possible, it'd be good to only import the ones we use. That may require a different setup on the Icon component though.

@mtblanton mtblanton added the invalid This doesn't seem right label Aug 25, 2021
@juanfabrega
Copy link
Contributor

Hey @mtblanton, I'm curious about why you added an invalid tag to this issue.

@mtblanton
Copy link
Contributor Author

whoops, I don't think I meant to add that!

@mtblanton
Copy link
Contributor Author

Oh, I think I meant for it to be "invalid behavior on your end" and not "this is an invalid issue"

@mtblanton mtblanton removed the invalid This doesn't seem right label Sep 13, 2021
@juanfabrega
Copy link
Contributor

Hey @mtblanton I just wanted to confirm that this is something we have been aware of for some time, but unfortunately not come up with a viable solution that doesn't break backward compatibility with the Icon component API. The main issue is that the icon components are in a single js object that keys the icon name to its function component. This object structure is not treeshakeable as is, but I'll start working on alternatives in an upcoming sprint

@mtblanton
Copy link
Contributor Author

Mantine has a flag svg icons collection we may be able to take inspiration from: https://github.com/mantinedev/mantine-flagpack

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

No branches or pull requests

2 participants