提交 8ebdc6ae 编写于 作者: zhangzhiwei's avatar zhangzhiwei

.

上级 f07f7c63
import { defineConfig } from "vite"; import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni"; import uni from "@dcloudio/vite-plugin-uni";
// https://vitejs.dev/config/
import path from "path"; import path from "path";
// https://vitejs.dev/config/ // https://vitejs.dev/config/
...@@ -9,9 +8,9 @@ let Timestamp = '' ...@@ -9,9 +8,9 @@ let Timestamp = ''
filePath = 'assets/'; //打包文件存放文件夹路径 filePath = 'assets/'; //打包文件存放文件夹路径
Timestamp = '.' + new Date().getTime();//时间戳 Timestamp = '.' + new Date().getTime();//时间戳
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [
uni() uni()
], ],
build:{ build:{
rollupOptions: { rollupOptions: {
// dir: "dist", // dir: "dist",
...@@ -27,23 +26,18 @@ export default defineConfig({ ...@@ -27,23 +26,18 @@ export default defineConfig({
} }
} }
}, },
server: { server: {
proxy: { proxy: {
'^/pre': { '^/pre': {
target: 'https://wxapplets-jyx.edstao.com', target: 'https://wxapplets-jyx.edstao.com',
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/pre/, '') rewrite: (path) => path.replace(/^\/pre/, '')
}, },
'^/api': { '^/prod': {
target: 'https://wxapplets-jyx.edstao.com', target: 'https://etaoh5.edstao.com/',
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/pre/, '') rewrite: (path) => path.replace(/^\/prod/, '')
}, }
'^/prod': { }
target: 'https://etaoh5.edstao.com/',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/prod/, '')
}
} }
}
}); });
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册