2024-03-09 23:07:09 +01:00
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
import react from '@vitejs/plugin-react-swc'
|
|
|
|
import svgr from 'vite-plugin-svgr'
|
|
|
|
import {viteStaticCopy} from "vite-plugin-static-copy";
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
|
|
|
plugins: [react(), svgr(), viteStaticCopy({
|
|
|
|
targets: [
|
|
|
|
{
|
|
|
|
src: '../src/locales',
|
|
|
|
dest: ''
|
|
|
|
}
|
|
|
|
]
|
|
|
|
})],
|
|
|
|
base: '/admin',
|
|
|
|
build:{
|
2024-03-26 17:11:24 +01:00
|
|
|
outDir: '../src/templates/admin',
|
|
|
|
emptyOutDir: true,
|
2024-03-09 23:07:09 +01:00
|
|
|
},
|
|
|
|
server:{
|
|
|
|
proxy: {
|
|
|
|
'/socket.io/*': {
|
|
|
|
target: 'http://localhost:9001',
|
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path) => path.replace(/^\/api/, '')
|
|
|
|
},
|
|
|
|
'/admin-auth/': {
|
|
|
|
target: 'http://localhost:9001',
|
|
|
|
changeOrigin: true,
|
2024-04-21 17:58:51 +02:00
|
|
|
},
|
|
|
|
'/stats': {
|
|
|
|
target: 'http://localhost:9001',
|
|
|
|
changeOrigin: true,
|
|
|
|
}
|
2024-03-09 23:07:09 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|