-
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Steps to reproduce
vite.config.ts
export default defineConfig({
plugins: [
vue(),
imagemin({cache: false}),
]
// vue文件
<script setup lang="ts">
import img39 from '@/assets/images/39.jpg?url'
const imgSrc38 = new URL(`../assets/images/38.jpg`, import.meta.url).href
</script>
<template>
<div>
<img src="@/assets/images/37.jpg" class="w-400" />
<img :src="imgSrc38" class="w-400 mt-20" />
<img :src="img39" class="w-400 mt-20" />
</div>
</template>
pnpm run build
pnpm run previewresult:
imgSrc38 img39 not work
What is expected?
希望可以正常工作或应该如何更改才能使用。
What is actually happening?
不开启cache:false 的第一次也会有这个问题,第二次就好了。
System Info
Any additional comments?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels