import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import path from 'path' // https://vite.dev/config/ export default defineConfig({ build: { sourcemap: 'hidden', }, plugins: [vue()], resolve: { alias: { '@': path.resolve(__dirname, './src'), // ✅ 定义 @ = src }, }, server: { proxy: { '/api': { target: 'http://localhost:3001', changeOrigin: true, secure: false, } }, }, })