2024-11-16 11:40:53 -05:00
|
|
|
import { fileURLToPath, URL } from 'node:url'
|
|
|
|
|
|
|
|
|
|
import { defineConfig } from 'vite'
|
2025-10-22 09:19:37 -04:00
|
|
|
import tailwindcss from '@tailwindcss/vite';
|
2024-11-16 11:40:53 -05:00
|
|
|
import vue from '@vitejs/plugin-vue'
|
2025-10-22 09:19:37 -04:00
|
|
|
// import vueDevTools from 'vite-plugin-vue-devtools'
|
2024-11-16 11:40:53 -05:00
|
|
|
|
|
|
|
|
// https://vite.dev/config/
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [
|
|
|
|
|
vue(),
|
2024-11-24 20:50:39 -05:00
|
|
|
// vueDevTools(),
|
2025-10-22 09:19:37 -04:00
|
|
|
tailwindcss(),
|
2024-11-16 11:40:53 -05:00
|
|
|
],
|
|
|
|
|
resolve: {
|
|
|
|
|
alias: {
|
2025-10-22 09:19:37 -04:00
|
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
2024-11-16 11:40:53 -05:00
|
|
|
},
|
|
|
|
|
},
|
2024-11-24 20:50:39 -05:00
|
|
|
server: {
|
|
|
|
|
proxy: {
|
2024-11-26 11:30:20 -05:00
|
|
|
'^/api/': {
|
2024-11-25 20:06:22 -05:00
|
|
|
target: 'http://127.0.0.1:8000',
|
2024-11-24 20:50:39 -05:00
|
|
|
changeOrigin: true,
|
|
|
|
|
secure: false,
|
2024-11-26 11:30:20 -05:00
|
|
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
2025-10-22 09:19:37 -04:00
|
|
|
},
|
|
|
|
|
'^/api-2/': {
|
|
|
|
|
target: 'http://127.0.0.1:5000',
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
secure: false,
|
|
|
|
|
rewrite: (path) => path.replace(/^\/api-2/, ''),
|
2024-11-26 11:30:20 -05:00
|
|
|
}
|
2024-11-24 20:50:39 -05:00
|
|
|
},
|
|
|
|
|
},
|
2024-11-16 11:40:53 -05:00
|
|
|
})
|