41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { fileURLToPath, URL } from 'node:url'
|
|
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import vueDevTools from 'vite-plugin-vue-devtools'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
server: {
|
|
proxy: {
|
|
"/search": {
|
|
target: "https://192.168.99.121",
|
|
changeOrigin: true,
|
|
secure: false, // Ignores SSL certificate issues
|
|
},
|
|
"/recommend": {
|
|
target: "https://192.168.99.121",
|
|
changeOrigin: true,
|
|
secure: false, // Ignores SSL certificate issues
|
|
// configure: (proxy) => {
|
|
// proxy.on('proxyReq', (proxyReq, req) => {
|
|
// console.log('Incoming request URL:', req.url); // Logs request URL
|
|
// console.log('Final URL sent to backend:', proxyReq.path); // Logs what Vite sends
|
|
// console.log('Final URL sent to backend:', proxyReq)
|
|
// });
|
|
// }
|
|
},
|
|
},
|
|
},
|
|
plugins: [
|
|
vue(),
|
|
vueDevTools(),
|
|
tailwindcss(),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
},
|
|
},
|
|
})
|