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

Custom collections not working in ssr: false when all icons are rendered with svg mode #228

Closed
zigomir opened this issue Aug 1, 2024 · 1 comment

Comments

@zigomir
Copy link

zigomir commented Aug 1, 2024

It doesn't matter wether you specify svg via app.config.ts or via mode prop of the Icon component.

Reproduction branch: https://github.com/zigomir/icon/tree/local-fs-svg-issue-reproduction and diff main...zigomir:icon:local-fs-svg-issue-reproduction

Workaround is to include at least one icon from the custom collection in css mode like so:

<template>
  <Icon
    name="custom1:nuxt-v3"
    size="64"
    mode="svg"
  />

  <!--
    WORKAROUND: load at least one icon in css mode to make svg mode work.
    It doesn't even have to be the same icon
  -->
  <Icon
    style="display: none;"
    name="custom1:nuxt-v1"
    size="64"
    mode="css"
  />
</template>

This might also be related to #212

@antfu antfu closed this as completed in f433863 Aug 1, 2024
@awacode21
Copy link

This did not fix #212

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