1 Star 0 Fork 0

我们村希望/bigScreen-v3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vite.config.js 1.84 KB
一键复制 编辑 原始数据 按行查看 历史
panxingdi 提交于 2024-05-14 11:31 . first commit
import { fileURLToPath, URL } from "node:url";
import { defineConfig, loadEnv } from "vite";
import vue from "@vitejs/plugin-vue";
// https://vitejs.dev/config/
export default defineConfig(({ mode, command }) => {
const env = loadEnv(mode, process.cwd());
return {
plugins: [vue()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
css: {
preprocessorOptions: {
scss: {
additionalData: `@import '@/assets/style/base.scss';`,
},
},
},
server: {
host: "0.0.0.0",
port: 5177,
open: false,
proxy: {
[env.VITE_APP_BASE_API]: {
target: env.VITE_APP_BASE_TARGET_API,
changeOrigin: true,
rewrite: (path) => path.replace(new RegExp("^" + env.VITE_APP_BASE_API), ""),
},
["/websocket"]: {
target: env.VITE_APP_BASE_TARGET_API,
changeOrigin: true,
ws: true,
rewrite: (path) => path.replace(new RegExp("^/websocket"), "/websocket"),
},
["/magicApi"]: {
target: env.VITE_APP_BASE_TARGET_API,
changeOrigin: true,
ws: true,
rewrite: (path) => path.replace(new RegExp("^/magicApi"), "/magicApi"),
},
["/magic-api"]: {
target: env.VITE_APP_BASE_TARGET_API,
changeOrigin: true,
rewrite: (path) => path.replace(new RegExp("^/magicApi"), "/magicApi"),
},
["/admin"]: {
target: env.VITE_APP_BASE_TARGET_API,
changeOrigin: true,
rewrite: (path) => path.replace(new RegExp("^/admin"), "/admin"),
},
["/profile"]: {
target: env.VITE_APP_BASE_TARGET_API,
changeOrigin: true,
rewrite: (path) => path.replace(new RegExp("^/profile"), "/profile"),
},
},
},
};
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/our-village-hopes/big-screen-v3.git
git@gitee.com:our-village-hopes/big-screen-v3.git
our-village-hopes
big-screen-v3
bigScreen-v3
master

搜索帮助