mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-02-04 12:40:08 +00:00
38 lines
756 B
TypeScript
38 lines
756 B
TypeScript
import path from "path"
|
|
import react from "@vitejs/plugin-react"
|
|
import { defineConfig } from "vite"
|
|
|
|
export default defineConfig({
|
|
base: '/dashboard',
|
|
plugins: [react()],
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8008',
|
|
changeOrigin: true,
|
|
},
|
|
'/api/v1/ws': {
|
|
target: 'http://localhost:8008',
|
|
changeOrigin: true,
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks(id) {
|
|
if (id.includes('node_modules')) {
|
|
return id.toString().split('node_modules/')[1].split('/')[0].toString();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|