chore: update frontend build options

This commit is contained in:
Steven 2024-11-05 22:56:36 +08:00
parent bd8462b2b3
commit e84fdf13fa

View File

@ -2,11 +2,7 @@ import react from "@vitejs/plugin-react-swc";
import { resolve } from "path";
import { defineConfig } from "vite";
let devProxyServer = "http://localhost:8082/";
if (process.env.DEV_PROXY_SERVER && process.env.DEV_PROXY_SERVER.length > 0) {
console.log("Use devProxyServer from environment: ", process.env.DEV_PROXY_SERVER);
devProxyServer = process.env.DEV_PROXY_SERVER;
}
const devProxyServer = "http://localhost:8082/";
// https://vitejs.dev/config/
export default defineConfig({
@ -30,4 +26,13 @@ export default defineConfig({
"@/": `${resolve(__dirname, "src")}/`,
},
},
build: {
rollupOptions: {
output: {
entryFileNames: "app.[hash].js",
chunkFileNames: "assets/chunk-vendors.[hash].js",
assetFileNames: "assets/[name].[hash][extname]",
},
},
},
});