Files
TaskPool/web/vite.config.ts
T

26 lines
625 B
TypeScript
Raw Normal View History

2025-12-20 09:30:16 +08:00
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import tailwindcss from '@tailwindcss/vite'
import { fileURLToPath, URL } from 'node:url'
export default defineConfig({
plugins: [vue(), tailwindcss()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server: {
proxy: {
'/api': {
target: 'http://localhost:8052',
changeOrigin: true,
ws: true
}
}
2026-01-13 18:18:50 +08:00
},
2026-01-13 22:03:21 +08:00
// 使用相对路径,这样动态导入的模块也会使用相对路径
// 浏览器会根据当前页面 URL 解析相对路径
base: './'
2025-12-20 09:30:16 +08:00
})