26 lines
778 B
TypeScript
26 lines
778 B
TypeScript
import { fileURLToPath, URL } from 'node:url'
|
||
|
||
import { defineConfig } from 'vite'
|
||
import vue from '@vitejs/plugin-vue'
|
||
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||
|
||
// https://vitejs.dev/config/
|
||
export default defineConfig({
|
||
plugins: [vue(), vueJsx()],
|
||
resolve: {
|
||
alias: {
|
||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||
}
|
||
}
|
||
// server: {
|
||
// // 配置代理
|
||
// proxy: {
|
||
// '/addon': {
|
||
// target: 'http://192.168.1.14:8001', // 目标服务器的地址
|
||
// changeOrigin: true, // 是否改变源,开启后服务器接收到的请求头中的Host字段会被设置为目标URL的Host
|
||
// rewrite: (path) => path.replace(/^\/addon/, '') // 重写路径,去除请求路径中的'/api'
|
||
// }
|
||
// }
|
||
// }
|
||
})
|