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

Support "custom" srcDir #307

Open
Siilwyn opened this issue Dec 20, 2023 · 1 comment · May be fixed by #326
Open

Support "custom" srcDir #307

Siilwyn opened this issue Dec 20, 2023 · 1 comment · May be fixed by #326

Comments

@Siilwyn
Copy link

Siilwyn commented Dec 20, 2023

With a the srcDir set in Nuxt the module won't find the icons and writes output to the default 'root' directory.

So with:

export default defineNuxtConfig({
  srcDir: "src",
  modules: [
    '@nuxtjs/svg-sprite',
  ],
});

Expected would be reading and writing icons from/to: ./src/assets/sprite/ but instead an empty gen is written to ./assets/sprite/.

I've tried some combinations of custom input & output, but couldn't find a working workaround sadly...

@Siilwyn
Copy link
Author

Siilwyn commented Apr 15, 2024

Found a workaround just now:

  svgSprite: {
    input: '~/src/assets/sprite/svg',
  }

And then use a symbolic symlink from assets/sprite/gen to src/assets/sprite/gen.

volkanakkus pushed a commit to volkanakkus/svg-sprite that referenced this issue Sep 18, 2024
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

Successfully merging a pull request may close this issue.

1 participant