Skip to content

Commit

Permalink
chore: update frontend build options
Browse files Browse the repository at this point in the history
  • Loading branch information
boojack committed Nov 5, 2024
1 parent bd8462b commit e84fdf1
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions frontend/web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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]",
},
},
},
});

0 comments on commit e84fdf1

Please sign in to comment.