24 lines
652 B
TypeScript
24 lines
652 B
TypeScript
|
|
import { defineConfig } from "vite";
|
||
|
|
import react from "@vitejs/plugin-react";
|
||
|
|
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [react()],
|
||
|
|
build: {
|
||
|
|
rollupOptions: {
|
||
|
|
output: {
|
||
|
|
// Entry script at site root (/index-[hash].js); lazy chunks + CSS stay under /assets/.
|
||
|
|
entryFileNames: "[name]-[hash].js",
|
||
|
|
chunkFileNames: "assets/[name]-[hash].js",
|
||
|
|
assetFileNames: "assets/[name]-[hash][extname]",
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
server: {
|
||
|
|
port: 5173,
|
||
|
|
proxy: {
|
||
|
|
"/api": { target: "http://127.0.0.1:8080", changeOrigin: true },
|
||
|
|
"/uploads": { target: "http://127.0.0.1:8080", changeOrigin: true },
|
||
|
|
},
|
||
|
|
},
|
||
|
|
});
|