import { fileURLToPath, URL } from 'node:url' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' const path = require('path') const common = path.resolve(__dirname, '../common') export default defineConfig({ plugins: [vue()], server: { port: 8001, proxy: { '/files': { target: 'http://basic.waityou24.cn' }, '/jcyjdtglpt/v1/api': { target: 'http://basic.waityou24.cn', changeOrigin: true, ws: false } } }, resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)), '@common': common } }, // 静态路径 base: '', // 打包名称 build: { outDir: '' } })