selenium_keyan/selenium_vue/frontend-vite/vite.config.ts

22 lines
438 B
TypeScript
Raw Normal View History

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': '/src',
},
},
server: {
host: true,
port: 5173,
proxy: {
'/api/crawl': {
target: process.env.VITE_CRAWL_API_URL || 'http://127.0.0.1:5000',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}
}
},
})