30 lines
645 B
JavaScript
30 lines
645 B
JavaScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
// import vitePluginImport from 'vite-plugin-babel-import';
|
|
import path from 'path'
|
|
|
|
const baseUrl = './'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default () => defineConfig({
|
|
plugins: [
|
|
vue()
|
|
],
|
|
base: baseUrl,
|
|
resolve: {
|
|
alias: {
|
|
'~': path.resolve(__dirname, './'),
|
|
'@': path.resolve(__dirname, 'src')
|
|
}
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/saas-system': {
|
|
target: 'http://192.168.1.164:6006', //代理接口
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/saas-system/, 'saas-system')
|
|
}
|
|
}
|
|
}
|
|
})
|