This commit is contained in:
2025-11-28 15:03:34 +08:00
parent 0abe862aff
commit b310413bfc
6 changed files with 221 additions and 327 deletions

View File

@@ -7,13 +7,14 @@ import pkgs from './package.json';
import tailwindcss from '@tailwindcss/vite';
const isDev = process.env.NODE_ENV === 'development';
let target = process.env.VITE_API_URL || 'https://localhost:51015';
let target = process.env.VITE_API_URL || 'http://localhost:51015';
const apiProxy = { target: target, changeOrigin: true, ws: true, rewriteWsOrigin: true, secure: false, cookieDomainRewrite: 'localhost' };
let proxy = {
'/root/': {
target: `${target}/root/`,
},
'/api': apiProxy,
'/client': apiProxy,
};
const basename = isDev ? undefined : `${pkgs.basename}`;