Open ivandimovd opened 10 months ago
Having the same problem. While module's setup
hook does care about configured nuxt aliases, nitro:init
hook responsible for generating and scanning icon directories ignores user alias configuration:
// module.ts:130
nuxt.hook("nitro:init", async (nitro) => {
const input = options.input.replace(/~|\.\//, "root").replace(/\//g, ":");
const output = options.output.replace(/~\/|\.\//, "");
@ivandimovd hello. Can you show example how you using your alias? Thank you.
In a new Nuxt 3 project, I integrated the module. During build time, it generates icons under root/assets/sprite/etc..., but at runtime, it expects them in root/src/assets. It's seems to be working, when I generate the icons in root/assets/sprite/gen and then copy them to root/src/assets/sprite. I saw that it is generating a wrong path in .nuxt/svg-sprite.mjs
As a temporary solution, I'm using an alias.