问题
图片依赖:
Vite 打包前端项目时图片无法引入,报如下错误:
ERROR [vite]: Rollup failed to resolve import "%7BlibeiDanmuKongmu%7D" from "D:/java/workspace/jeecgboot-vue3/src/views/funeral/tombInfo/area.vue?vue&type=script&setup=true&lang.ts".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
解决
将图片依赖 src 属性的写法改为如下所示: