From c15621c8083dee0364988b9afefe3ed565cdb0ed Mon Sep 17 00:00:00 2001 From: abearxiong Date: Tue, 14 Oct 2025 22:08:36 +0800 Subject: [PATCH] CLEAR --- astro.config.mjs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index 4a30f9e..d55582c 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -6,23 +6,17 @@ import pkgs from './package.json'; import tailwindcss from '@tailwindcss/vite'; const isDev = process.env.NODE_ENV === 'development'; -const plugins = [tailwindcss()]; + let target = process.env.VITE_API_URL || 'https://localhost:51015'; const apiProxy = { target: target, changeOrigin: true, ws: true, rewriteWsOrigin: true, secure: false, cookieDomainRewrite: 'localhost' }; let proxy = { - '/root/center/': { - target: `${target}/root/center/`, - }, - '/user/login/': { - target: `${target}/user/login/`, + '/root/': { + target: `${target}/root/`, }, '/api': apiProxy, - '/client': apiProxy, }; export default defineConfig({ - // ... - // site: 'https://kevisual.xiongxiao.me/root/astro', base: isDev ? undefined : pkgs.basename, integrations: [ mdx(), @@ -31,10 +25,7 @@ export default defineConfig({ ], vite: { - plugins, - define: { - BASE_NAME: JSON.stringify(pkgs.basename), - }, + plugins: [tailwindcss()], server: { port: 7008, host: '0.0.0.0',