VirtualPR/frontend/vite.config.js

27 lines
550 B
JavaScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { resolve } from 'node:path';
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
"@": resolve(__dirname, "src")
}
},
server: {
port: 5176,
strictPort: true,
watch: {
usePolling: true,
interval: 1000,
},
proxy: {
'/api': {
target: 'http://127.0.0.1:4000',
changeOrigin: true,
cookieDomainRewrite: 'localhost',
},
},
},
});