Files
AI-interview-web/vite.config.js

27 lines
657 B
JavaScript
Raw Normal View History

2025-09-08 17:31:33 +08:00
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
2025-09-11 22:33:15 +08:00
import { fileURLToPath, URL } from 'node:url'
2025-09-08 17:31:33 +08:00
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
2025-09-11 22:33:15 +08:00
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
2025-09-08 17:31:33 +08:00
server: {
host: '0.0.0.0',
proxy: {
// Proxy API requests to the backend server
'/api': {
target: 'http://localhost:8080',
changeOrigin: true, // Needed for virtual hosted sites
secure: false, // Optional: if you are using https
2025-09-17 21:36:49 +08:00
rewrite: (path) => path.replace(/^\/api/, ''),
2025-09-08 17:31:33 +08:00
},
},
},
})