dykj-shanghu/vite.config.ts
2024-05-26 19:02:12 +08:00

26 lines
778 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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'
// }
// }
// }
})