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

[Bug] Input/Ouput properties are not respected #295

Open
ivandimovd opened this issue Oct 23, 2023 · 2 comments
Open

[Bug] Input/Ouput properties are not respected #295

ivandimovd opened this issue Oct 23, 2023 · 2 comments

Comments

@ivandimovd
Copy link

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.

@AndriiGera
Copy link

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(/~\/|\.\//, "");

@wunschpunsh
Copy link

@ivandimovd hello. Can you show example how you using your alias? Thank you.

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

3 participants