dataControl/vite.config.js

37 lines
822 B
Vue
Raw Normal View History

2023-11-12 09:47:28 +08:00
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vitePluginImport from 'vite-plugin-babel-import';
import path from 'path'
const baseUrl = {
development: './',
beta: './',
release: './'
}
// https://vitejs.dev/config/
export default ({ mode }) => defineConfig({
plugins: [
vue()
],
base: baseUrl[mode],
resolve: {
alias: {
'~': path.resolve(__dirname, './'),
'@': path.resolve(__dirname, 'src')
}
},
server: {
proxy: {
'/api': {
2024-04-09 09:08:15 +08:00
// target: 'http://cdcm_test_api.shikicc.com:58909',
2024-01-20 21:48:14 +08:00
// target: 'http://frp.shikicc.com:58951',
2023-11-12 09:47:28 +08:00
// target: 'http://10.10.14.123',
2024-04-09 09:08:15 +08:00
target: 'https://cdcm_api.shikicc.com',
2023-11-12 09:47:28 +08:00
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, '/api')
}
}
}
})