qmodel/qmodel-vue3-js/vite.config.js

30 lines
645 B
JavaScript
Raw Permalink Normal View History

2023-10-31 22:53:44 +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 = './'
// 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')
}
}
}
})