| import { defineConfig } from 'vite' | |
| import react from '@vitejs/plugin-react' | |
| import { fileURLToPath } from 'url' | |
| import { dirname, resolve } from 'path' | |
| const __filename = fileURLToPath(import.meta.url) | |
| const __dirname = dirname(__filename) | |
| // https://vitejs.dev/config/ | |
| export default defineConfig({ | |
| plugins: [react()], | |
| resolve: { | |
| alias: { | |
| '@': resolve(__dirname, './src'), | |
| }, | |
| }, | |
| server: { | |
| port: 5173, | |
| proxy: { | |
| '/api': { | |
| target: 'http://localhost:7286', | |
| changeOrigin: true, | |
| } | |
| } | |
| }, | |
| build: { | |
| outDir: 'dist', | |
| assetsDir: 'assets', | |
| sourcemap: false, | |
| } | |
| }) | |