| 1234567891011121314151617181920212223242526272829303132333435 |
- import { fileURLToPath, URL } from 'node:url'
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- //vite.config.ts 和 axios.config.ts和baiqi的版本有些许出入,若保留其版本无法正常登陆
- //目前用的还是xiaoyu的版本
- // https://vitejs.dev/config/
- export default defineConfig({
- //配置代理,解决跨域问题。详见EAI问题文档
- server: {
- host: '127.0.0.1',
- port: 4000,
- proxy: {
- '/api': {
- target: 'http://localhost:8080',
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/api/, ''),
- },
- },
- },
-
- plugins: [
- vue(),
- ],
- resolve: {
- alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url))
- }
- },
-
- })
|