You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
640 B
24 lines
640 B
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import path from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src')
|
|
}
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/admin': {
|
|
target: 'http://localhost:12699', // 后端基础地址https://dbqb.nfdxy.net/devLotApi
|
|
changeOrigin: true,
|
|
rewrite: (path) => path
|
|
// 或者更精确的重写(根据后端路径调整):.replace(/^\/api/, '')
|
|
// rewrite: (path) => path.replace(/^\/api\/admin/, '/admin'),
|
|
},
|
|
},
|
|
},
|
|
|
|
})
|