1
0
Fork 0
activist/vite.config.ts

37 lines
838 B
TypeScript
Raw Permalink Normal View History

2024-11-16 11:40:53 -05:00
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite';
2024-11-16 11:40:53 -05:00
import vue from '@vitejs/plugin-vue'
// 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(),
tailwindcss(),
2024-11-16 11:40:53 -05:00
],
resolve: {
alias: {
'@': 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/, ''),
},
'^/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
})