Files
TEST/admin-panel/vite.config.js

19 lines
487 B
JavaScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig(({ command }) => ({
plugins: [react()],
base: command === 'build' ? '/panel/' : '/',
server: {
port: 5173,
proxy: {
'/api': { target: 'http://localhost:8080', changeOrigin: true },
'/auth': { target: 'http://localhost:8080', changeOrigin: true },
},
},
build: {
outDir: '../src/main/resources/static/panel',
emptyOutDir: true,
},
}));