diff --git a/.env.development b/.env.development index 791cf51..233ded6 100644 --- a/.env.development +++ b/.env.development @@ -1,9 +1,7 @@ #mode 环境 VITE_MODE = dev -#服务器域名 -VITE_HOST = http://192.168.1.249:8084/ - # 请求域名 -VITE_APP_BASE_URL='http://192.168.1.249:8084/ai-agent-server/' +# VITE_APP_BASE_URL='http://192.168.1.249:8084/ai-agent-server/' +VITE_APP_BASE_URL='https://info.xglpa.com/ai-agent-server' diff --git a/.env.production b/.env.production index 9d60707..86c7475 100644 --- a/.env.production +++ b/.env.production @@ -5,7 +5,7 @@ VITE_MODE = production VITE_HOST = https://test.szxgl.cn/ # 请求域名 -VITE_APP_BASE_URL='https://test.szxgl.cn/ai-agent-server/' +VITE_APP_BASE_URL='https://info.xglpa.com/ai-agent-server' #静态资源目录 VITE_CDN_DIR = 'https://cdn.xglpa.com/ai-agent-m/' \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index b2a98e5..fab51ce 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,4 +1,4 @@ -import { defineConfig, loadEnv } from "vite"; +import { defineConfig } from "vite"; import uni from "@dcloudio/vite-plugin-uni"; import tailwindcss from "tailwindcss"; import autoprefixer from "autoprefixer"; @@ -24,38 +24,21 @@ if (!weappTailwindcssDisabled) { } // https://vitejs.dev/config/ -export default defineConfig(({ command, mode }) => { - console.log("mode:", mode); - const env = loadEnv(mode, process.cwd(), ""); - return { - plugins: [ - uni(), - uniRouter({ - includes: ["style"], - }), - weappTailwindcssDisabled ? undefined : vwt(), - ], - css: { - postcss: { - plugins: postcssPlugin, - }, +export default defineConfig({ + plugins: [ + uni(), + uniRouter({ + includes: ["style"], + }), + weappTailwindcssDisabled ? undefined : vwt(), + ], + css: { + postcss: { + plugins: postcssPlugin, }, - server: { - port: 8991, - }, - base: mode != "dev" ? env.VITE_CDN_DIR : "./", - build: { - assetsDir: "static", // 静态资源存放目录(默认是 assets) - rollupOptions: { - output: { - // 代码分割配置 - manualChunks: (id) => { - if (id.includes("node_modules")) { - return "vendor"; - } - }, - }, - }, - }, - }; + }, + server: { + port: 8991, + }, + base: "./", });