vite-plugin-vue2 icon indicating copy to clipboard operation
vite-plugin-vue2 copied to clipboard

<img> inconsistency between dev and production

Open kingyue737 opened this issue 2 years ago • 0 comments

I'm using Vuetify's <v-img> component.

<template>
  <div id="app">
    <v-img src="src/vite.svg" />
    <div>Hello World</div>
  </div>
</template>

In dev mode, it can display the image correctly: image

But after build, the following error is raised:

Failed to load resource: the server responded with a status of 404 (Not Found)    (vite.svg:1)

It seems that asset url handling didn't work on this image and thus Vite didn't copy it to outDir .

Not sure whether this inconsistency is resulted from a bug of Vite or this plugin.

minimal repo: https://stackblitz.com/edit/vitejs-vite-fmwhb6

kingyue737 avatar Dec 13 '22 07:12 kingyue737