35 Star 69 Fork 34

BizSpring / BizSpring Vue3 Java微服务商城 SpringCloud 源码 跨境电商 跨境商城 电商国际化 外贸 独立站 多国语言 移动商城

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vite.config.js 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
allen 提交于 2023-09-13 14:48 . 修复了一些问题
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from "@vitejs/plugin-vue-jsx"
import { globalBaseUrl } from './public/config'
import path from 'path'
const {resolve} = require('path')
const url = globalBaseUrl
export default defineConfig({
plugins: [
vue(),
vueJsx(),
],
server: {
port: 8082,
cors: true,
open: false,
proxy: {
'/api': {
target: url,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
},
'/auth': {
target: url,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/auth/, '/auth')
},
'/upms': {
target: url,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/upms/, '/upms')
},
'/doc': {
target: url,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/doc/, '/doc')
},
'/webjars': {
target: url,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/webjars/, '/webjars')
},
'/swagger-resources': {
target: url,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/swagger-resources/, '/swagger-resources')
}
}
},
define: {
__VUE_I18N_FULL_INSTALL__: true,
__VUE_I18N_LEGACY_API__: false,
__INTLIFY_PROD_DEVTOOLS__: false,
},
resolve: {
alias: {
"@": resolve(__dirname, "./src"),
"components": resolve(__dirname, "./src/components"),
"styles": resolve(__dirname, "./src/styles"),
"utils": resolve(__dirname, "./src/utils"),
}
}
})
JavaScript
1
https://gitee.com/BizSpring/bizspring-vue3-opensource.git
git@gitee.com:BizSpring/bizspring-vue3-opensource.git
BizSpring
bizspring-vue3-opensource
BizSpring Vue3 Java微服务商城 SpringCloud 源码 跨境电商 跨境商城 电商国际化 外贸 独立站 多国语言 移动商城
master

搜索帮助