fix: 修复预览 loading 与媒体代理
This commit is contained in:
1 parent
18ddf125be
commit
0574a85632
4 files changed
+37
-3
No files matched your search
@@ -82,6 +82,19 @@ export default defineConfig({
|
||||
h5: {
|
||||
publicPath: process.env.PREVIEW_PUBLIC_PATH || "/",
|
||||
router: { mode: "hash" },
|
||||
devServer: { host: "0.0.0.0", port: Number(process.env.PREVIEW_PORT || 3002) },
|
||||
devServer: {
|
||||
host: "0.0.0.0",
|
||||
port: Number(process.env.PREVIEW_PORT || 3002),
|
||||
proxy: {
|
||||
"/media": {
|
||||
target:
|
||||
process.env.MEDIA_API_TARGET ||
|
||||
(process.env.API_BASE_URL?.startsWith("http")
|
||||
? new URL(process.env.API_BASE_URL).origin
|
||||
: "http://localhost:3001"),
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user