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 icon collection path bug when using Nuxt v4 directory structure #3133

Open
realsamanrad opened this issue Jan 17, 2025 · 0 comments
Open
Labels
bug Something isn't working triage v3 #1289

Comments

@realsamanrad
Copy link

Environment

  • Node version: 22.13
  • Nuxt version: 3.15

Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.0.0-alpha.11

Reproduction

https://codesandbox.io/p/devbox/affectionate-sky-8vxn4g

Description

When using compatibilityVersion: 4, the dir in icon.customCollections should be absolute path (./app/assets/icons):

✔ Nuxt Icon loaded local collection custom with 1 icons

Otherwise, when using ~/assets/icons, it doesn't find any icon:

✔ Nuxt Icon loaded local collection custom with 0 icons

Additional context

nuxt.config.ts

export default defineNuxtConfig({
  modules: ["@nuxt/ui"],
  devtools: { enabled: true },
  compatibilityDate: "2024-12-19",
  future: {
    compatibilityVersion: 4,
  },
  icon: {
    customCollections: [
      {
        prefix: "custom",
        dir: "~/assets/icons", // not working
        // dir: "./app/assets/icons", // it works
      },
    ],
  },
});

Logs

@realsamanrad realsamanrad added bug Something isn't working triage v3 #1289 labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage v3 #1289
Projects
None yet
Development

No branches or pull requests

1 participant