inncom_list/vite.config.js

25 lines
540 B
JavaScript
Raw Normal View History

2024-03-22 22:56:42 +08:00
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import path from 'path'
2024-03-19 23:55:38 +08:00
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
2024-03-22 22:56:42 +08:00
resolve: {
alias: {
'~': path.resolve(__dirname, './'),
'@': path.resolve(__dirname, 'src')
}
},
server: {
proxy: {
'/api': {
target: 'http://api.shikicc.com:58909',
2024-03-23 12:52:35 +08:00
// target: 'http://10.10.10.4:3000',
2024-03-22 22:56:42 +08:00
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, '/api')
}
}
}
2024-03-19 23:55:38 +08:00
})