gitFoxCode / nuxt-icons

Module for Nuxt allowing pleasant use of svg icons
192 stars 23 forks source link

[Question] Can I use `nuxt-icons` with nuxt extends? #30

Open szulcus opened 1 year ago

szulcus commented 1 year ago

Nuxt extends docs: https://nuxt.com/docs/examples/advanced/config-extends/

When I move my ~/assets/icons directory to base folder and axtend Nuxt with ./base, icons is didn't work. I tried to install the module directly in base, but then the module is not loaded at all. What can I do wrong?

image

vacijj commented 1 year ago

We get the same error, when we extend from a module.

@gitFoxCode do you have already an idea how to fix it or should I dig into it and provide a PR?

Workaround

We created a symlink in the root project. In your case the following might work.

cd assets
ln -s ../base/assets/icons

This restricts you to load the icons only from one location. But it is a workaround.