vuetifyjs / nuxt-module

Zero-config Nuxt Module for Vuetify
https://nuxt.vuetifyjs.com/
MIT License
219 stars 22 forks source link

can't using '@' or '~' in v-img #237

Closed amari10-2 closed 3 months ago

amari10-2 commented 3 months ago

can't using '@' or '~' in v-img. but viewable by img tag.

config ssr = false

first tried with latest version.

using v-img, src used path of '/assets/xxx/yyy.png' starting with '@' or '~'. but not change to '/_nuxt/' and not viewable.

second tried version

but same result as latest version.

confirmed viewable version

viewable in this configuration by v-img with '@' or '~'.

help!

userquin commented 3 months ago

Small change in Nuxt 3.11.2, I'm preparing a PR for Nuxt 3.11.2+ support

userquin commented 3 months ago

@amari10-2 can you check with v0.15.0? You should include latest vue version and dedupe dependencies (remove node_modules and install dependencies or if you're using pnpm run `pnpm dedupe)

(the playground in this repo working)

amari10-2 commented 3 months ago

@userquin sorry I'm late.

i created a new plain project on StackBlitz. (i just added vuetify-nuxt-module to the nuxt starter.)

however, when I use v-img, '@' and '~' are not converted.

do i need to configure anything?

https://stackblitz.com/edit/nuxt-starter-m7ccj9?file=app.vue

userquin commented 3 months ago

I think you are using public resources wrongly: public folder shouldn't be used with any alias/resolver other than the default provided by Vite or Nuxt (via base prefix):

No idea why Nuxt resolving the favicon in img, may be broken when building...

Anyway, the includeTransformAssetsUrls not being initialized properly, by default it should be enabled but missing in the default module options.