Skip to content

Custom input path outside the nuxt 3 app doesn't work #281

@jfernandezpe

Description

@jfernandezpe

Hi,

I use svg-sprite-module in a couple of Nuxt 2 apps in a monorepo andboth apps share the same svgs so with svgSprite.input option I point to the asset package and it works.

Now I'm creating a new Nuxt 3 app in the monorepo and it seems that the same strategy doesn't work, the icons do not load in the nuxt 3 app. After some debugging, I found that svg-sprite-module uses nitro's storage layer to deal with the filesystem. And because I'm pointing to a folder outside nitro's scope, svgSprite cannot the shared SVGs.

Am I doing something wrong? May you suggest any workaround? I would be happy to write a fix to this issue and send you a pull request but I'm not sure where to start.

I create a basic reproduction scenario, without configuring lerna or yarn workspaces: https://github.com/jfernandezpe/svg-sprite-module-error-reproduction

Thank you for your time!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions