fix(web): 媒体库图片不显示 — 添加 /uploads Vite 代理 + 修复路径前缀
前端图片 URL 使用 ./uploads/... 相对路径导致 404: 1. Vite 添加 /uploads 代理到后端 3000 端口 2. MediaLibrary 和 MediaPicker 图片 src 去掉 ./ 前缀
This commit is contained in:
@@ -11,6 +11,10 @@ export default defineConfig({
|
||||
target: "http://localhost:3000",
|
||||
changeOrigin: true,
|
||||
},
|
||||
"/uploads": {
|
||||
target: "http://localhost:3000",
|
||||
changeOrigin: true,
|
||||
},
|
||||
"/ws": {
|
||||
target: "ws://localhost:3000",
|
||||
ws: true,
|
||||
|
||||
Reference in New Issue
Block a user