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

Fix path resolution #282

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

obulat
Copy link

@obulat obulat commented Jun 13, 2023

Might fix #281

Description

In our app, we use src directory inside the root. We use svg-sprite-module with Nuxt 2, and all the paths work correctly. However, trying to migrate to Nuxt 3 causes the paths to fail. I tried replacing the path values in nitro:init hook with the ones that are resolved at the start of the setup function (inputDir and outDir). It seems to work with the setup where assets folder is under src folder, and the options for this module are set as

  svgSprite: {
    input: "~/assets/svg/raw",
    output: "~/assets/svg/sprite",
  },

I am not sure how to test this change.

@obulat obulat marked this pull request as ready for review June 13, 2023 15:47
src/module.ts Outdated Show resolved Hide resolved
src/module.ts Outdated Show resolved Hide resolved
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 this pull request may close these issues.

Custom input path outside the nuxt 3 app doesn't work
1 participant