kiwilan / nuxt-svg-transformer

Nuxt 3 module. Transform SVG to inject dynamically into Vue component, type included. Powered by unplugin.
https://github.com/kiwilan/unplugin-svg-transformer
MIT License
27 stars 6 forks source link

`request url is outside of Vite serving allow list` #4

Closed ewilan-riviere closed 1 year ago

ewilan-riviere commented 1 year ago

Recent bug with Vite with 0.0.8 release:

The request url "/path/to/project/nuxt-svg-transformer/src/runtime/component.vue" is outside of Vite serving allow list.

Temporary solution

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  vite: {
    server: {
      fs: {
        // Allow serving files from one level up to the project root
        allow: ['..'],
      },
    },
  },
})

I work on another solution.

ewilan-riviere commented 1 year ago

Upgrade to release 0.0.9 will fix this bug.