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

Package optimizations #156

Open
theetrain opened this issue Jan 18, 2023 · 0 comments
Open

Package optimizations #156

theetrain opened this issue Jan 18, 2023 · 0 comments

Comments

@theetrain
Copy link
Collaborator

From: carbon-design-system/carbon-components-svelte#1613 (comment)

Looking at packaging options, I looked into unplugin-icons for Iconify. I see the full Carbon icon set is provided by Iconify and there's a Svelte implementation: https://icon-sets.iconify.design/carbon/4k/. Perhaps consumers of carbon-components-svelte can have the privilege of choice; they may:

  1. Consume the forthcoming carbon-icons-svelte featuring the full Carbon icon set in node_modules
  2. Use unplugin-icons, giving you options to use Iconify-hosted icons or have Vite process them and be bundled in shipped code via the ?raw suffix
  3. Use Iconify's Svelte implementation to use their CDN-hosted icons that includes the Carbon icon set

Folks with certain enterprise restrictions should be able to determine which would work best for them, and we can help document the pros and cons of each option.

And: carbon-design-system/carbon-components-svelte#1561 (comment)

It may be worth thinking about how carbon-icons-svelte is setup. I've been using svelte-awesome for icons and it is very fast as it only has ~5 .svelte files. That could possibly be a better approach than generating lots of .svelte files

Ideally, we want to ship a single Icon.svelte component that can return inlined SVGs via @html. This should improve vite dev performance.

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

1 participant