Initial commit of integrated agent system
This commit is contained in:
79
frontend/vite.config.js
Normal file
79
frontend/vite.config.js
Normal file
@@ -0,0 +1,79 @@
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import tsconfigPaths from "vite-tsconfig-paths";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
|
||||
export default defineConfig({
|
||||
server: {
|
||||
allowedHosts: ["localhost", "trading.evoagents.cn","www.evoagents.cn"],
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:8000',
|
||||
changeOrigin: true
|
||||
},
|
||||
'/ws': {
|
||||
target: 'ws://localhost:8765',
|
||||
ws: true
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: [react(), tsconfigPaths(),tailwindcss()],
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (!id.includes("node_modules")) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
id.includes("/three/") ||
|
||||
id.includes("/@react-three/") ||
|
||||
id.includes("/meshline/") ||
|
||||
id.includes("/troika-")
|
||||
) {
|
||||
return "three-stack";
|
||||
}
|
||||
|
||||
if (
|
||||
id.includes("/recharts/") ||
|
||||
id.includes("/d3-") ||
|
||||
id.includes("/victory-")
|
||||
) {
|
||||
return "charts";
|
||||
}
|
||||
|
||||
if (
|
||||
id.includes("/react-markdown/") ||
|
||||
id.includes("/remark-gfm/") ||
|
||||
id.includes("/remark-") ||
|
||||
id.includes("/mdast-") ||
|
||||
id.includes("/micromark") ||
|
||||
id.includes("/unified/") ||
|
||||
id.includes("/hast-") ||
|
||||
id.includes("/vfile/")
|
||||
) {
|
||||
return "markdown";
|
||||
}
|
||||
|
||||
if (
|
||||
id.includes("/jszip/") ||
|
||||
id.includes("/pako/") ||
|
||||
id.includes("/fflate/")
|
||||
) {
|
||||
return "zip-utils";
|
||||
}
|
||||
|
||||
return "vendor";
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
test: {
|
||||
environment: "jsdom"
|
||||
},
|
||||
preview: {
|
||||
host: "0.0.0.0",
|
||||
port: 4173
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user