FrostByte/vite.config.ts
2023-10-10 00:03:04 +02:00

20 lines
470 B
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
import { qrcode } from 'vite-plugin-qrcode'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), qrcode()],
server: {
port: 3000,
open: true,
proxy: {
'/api': {
target: 'http://localhost:8080/api',
changeOrigin: true,
secure: false,
rewrite: (path): string => path.replace(/^\/api/, '')
}
}
}
})