mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-17 04:43:13 +00:00
39 lines
799 B
TypeScript
39 lines
799 B
TypeScript
import react from "@vitejs/plugin-react-swc";
|
|
import { resolve } from "path";
|
|
import { defineConfig } from "vite";
|
|
|
|
const devProxyServer = "http://localhost:8082/";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
host: "0.0.0.0",
|
|
port: 3000,
|
|
proxy: {
|
|
"^/api": {
|
|
target: devProxyServer,
|
|
xfwd: true,
|
|
},
|
|
"^/slash.api.v2": {
|
|
target: devProxyServer,
|
|
xfwd: true,
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@/": `${resolve(__dirname, "src")}/`,
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
entryFileNames: "app.[hash].js",
|
|
chunkFileNames: "assets/chunk-vendors.[hash].js",
|
|
assetFileNames: "assets/[name].[hash][extname]",
|
|
},
|
|
},
|
|
},
|
|
});
|