1
Some checks failed
Deploy to GitHub Pages / Deploy to GitHub Pages (push) Has been cancelled

This commit is contained in:
2026-03-10 10:11:57 +08:00
parent e94484fb5b
commit 810cbb38c2
9 changed files with 169 additions and 1 deletions

View File

@ -271,6 +271,18 @@ module.exports = {
open: {
target: ['http://localhost:8090'],
},
// 代理 API 請求解決開發環境跨域dev-server 要求 proxy 為陣列)
proxy: [
{
context: ['/api'],
target: 'https://admin-api.wagoo.pet',
// target: 'https://admin-api.wagoo.me',
changeOrigin: true,
pathRewrite: { '^/api': '' },
secure: true,
},
],
setupMiddlewares: (middlewares, devServer) => {
if (!devServer) {
throw new Error('dev-server is not defined')