已发布了一版没有cdn的版本
This commit is contained in:
parent
4213c2c9e0
commit
ef3fd40ff4
@ -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'
|
||||
|
||||
|
||||
@ -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/'
|
||||
@ -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: "./",
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user