FrostByte/client/vite.config.ts

24 lines
555 B
TypeScript
Raw Normal View History

2023-10-09 19:21:55 +02:00
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
import { qrcode } from 'vite-plugin-qrcode'
// https://vitejs.dev/config/
export default defineConfig({
build: {
// outDir: '../server/public' // Override default outDir('dist')
},
2023-10-09 19:21:55 +02:00
plugins: [react(), qrcode()],
2023-10-10 00:03:04 +02:00
server: {
port: 3000,
open: true,
proxy: {
'/api': {
target: 'http://localhost:8080/api',
changeOrigin: true,
secure: false,
rewrite: (path): string => path.replace(/^\/api/, '')
}
}
}
2023-10-09 19:21:55 +02:00
})