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

Question; when generating where do the icons get stored? #298

Open
liamcharmer opened this issue Nov 13, 2024 · 1 comment
Open

Question; when generating where do the icons get stored? #298

liamcharmer opened this issue Nov 13, 2024 · 1 comment

Comments

@liamcharmer
Copy link

I am just wondering, when you are using this with the following nuxt config. Where does the icons get stored when you generate? (Or how does it work as i don't fully understand).

Reason I ask is that i have used this library for a project that runs offline; I have installed the icons locally to the project. And sometimes the icons do not appear on my offline project.

I have recently added the icon: entry to the nuxt config to see if this fixes it. And to be honest I don't know if the outcome of this has done anything yes or no, because it is hard to replicate the bug of the icons not appearing.

Any ideas?

export default defineNuxtConfig({
  compatibilityDate: "2024-04-03",
  devtools: { enabled: true },
  vite: {
    css: {
      preprocessorOptions: {
        scss: {
          api: "modern",
        },
      },
    },
  },
  nitro: {
    publicAssets: [
      {
        dir: "public",
        maxAge: 60 * 60 * 24 * 365, // 1 year
      },
    ],
  },
  icon: {
    clientBundle: {
      scan: true,
      includeCustomCollections: true,
      icons: [
        "heroicons:user-solid",
        "heroicons:document-arrow-down",
        "heroicons:arrow-up-circle-16-solid",
        "heroicons:arrow-down-circle-16-solid",
        "heroicons:flag-20-solid",
        "heroicons:lock-open-solid",
        "heroicons:heart-solid",
        "heroicons:chat-bubble-oval-left-16-solid",
        "heroicons:minus-circle-16-solid",
        "heroicons:speaker-wave-solid",
        "heroicons:phone-16-solid",
        "material-symbols:mail-rounded",
        "material-symbols:database",
        "material-symbols:list-alt",
        "material-symbols:headphones-rounded",
        "fa6-solid:users",
        "fa6-solid:battery-full",
        "fa6-solid:battery-three-quarters",
        "fa6-solid:battery-half",
        "fa6-solid:battery-quarter",
        "fa6-solid:wifi",
        "fa6-solid:users",
        "fa6-solid:check",
      ],
    },
  },
  modules: [
    "@nuxtjs/ionic",
    "@nuxtjs/tailwindcss",
    "@vueuse/nuxt",
    "@nuxt/icon",
    "nuxt-particles",
    "@vite-pwa/nuxt",
  ],
  ssr: false,
});

Entries to package.json

 "@iconify-json/fa6-solid": "^1.2.1",
    "@iconify-json/heroicons": "^1.2.1",
    "@iconify-json/material-symbols": "^1.2.4",
@antfu
Copy link
Member

antfu commented Nov 14, 2024

Can you create a minimal reproduction for me to investigate? I am happy to help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants