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

feat(core): rewrite to use built-in svg components #239

Open
wants to merge 9 commits into
base: next
Choose a base branch
from

Conversation

stramel
Copy link
Collaborator

@stramel stramel commented Sep 25, 2024

Caution

These changes are still highly volatile and unlikely to work for you. Proceed with caution

Building on top of the hopefully soon to be accepted Built-in SVG components in withastro/astro#12067. Discussed here withastro/roadmap#699

This adds virtual paths to the Iconify collections and icons. Simply import astro:icons/<collection>/<icon> in order to use the icon component.

This changes also removes the functionality associated with local svg imports since this is now covered through Astro.

Another big change is that we're no longer running SVGO. I'm assuming that Iconify is handling most of the optimizations for us. Any local icon optimizations would be moved into the astro repo (likely post MVP)

TODO:

  • rewrite functionality to use the built-in SVG components
  • fix typings for virtual module imports
  • agree upon virtual module naming
  • update demo to use new imports
  • fix type assertions on the integration/vite plugin
  • add better error handling
  • add logging
  • documentation
  • tests
  • provide offline support?
  • clean up

@stramel stramel self-assigned this Sep 25, 2024
Copy link

changeset-bot bot commented Sep 25, 2024

⚠️ No Changeset found

Latest commit: 67074b8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Sep 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-astroicon ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 26, 2024 3:26am
astroicon ❌ Failed (Inspect) Sep 26, 2024 3:26am

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.

1 participant