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
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
})
|