26 lines
540 B
TypeScript
26 lines
540 B
TypeScript
import { defineConfig } from '@vben/vite-config';
|
||
|
||
import ElementPlus from 'unplugin-element-plus/vite';
|
||
|
||
export default defineConfig(async () => {
|
||
return {
|
||
application: {},
|
||
vite: {
|
||
plugins: [
|
||
ElementPlus({
|
||
format: 'esm',
|
||
}),
|
||
],
|
||
server: {
|
||
proxy: {
|
||
'/api': {
|
||
changeOrigin: true,
|
||
// 本地联调:后端地址(保持 /api 前缀,不做 rewrite)
|
||
target: 'http://127.0.0.1:7801',
|
||
},
|
||
},
|
||
},
|
||
},
|
||
};
|
||
});
|