代码拉取完成,页面将自动刷新
同步操作将从 ZnPi/pi-admin-web 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import { fileURLToPath, URL } from "node:url";
import { defineConfig, loadEnv } from "vite";
import vue from "@vitejs/plugin-vue";
import vueJsx from "@vitejs/plugin-vue-jsx";
// Element Plus
import AutoImport from "unplugin-auto-import/vite";
import Components from "unplugin-vue-components/vite";
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
// vxe-table
import {
createStyleImportPlugin,
VxeTableResolve,
} from "vite-plugin-style-import";
// svg
import path from "path";
import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
import vueSetupExtend from "vite-plugin-vue-setup-extend";
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
return {
server: {
host: "0.0.0.0",
open: true,
proxy: {
[env.VITE_APP_BASE_API]: {
target: "http://localhost:9317",
changeOrigin: true,
rewrite: (path) =>
path.replace(new RegExp("^" + env.VITE_APP_BASE_API), ""),
},
},
},
plugins: [
vue(),
vueJsx(),
AutoImport({
resolvers: [ElementPlusResolver()],
}),
Components({
resolvers: [ElementPlusResolver()],
}),
createSvgIconsPlugin({
iconDirs: [
path.resolve(process.cwd(), "src/assets/icons"),
path.resolve(process.cwd(), "src/assets/icons/bpmn-icons"),
],
symbolId: "icon-[dir]-[name]",
}),
vueSetupExtend(),
createStyleImportPlugin({
resolves: [VxeTableResolve()],
}),
],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
types: fileURLToPath(new URL("./types", import.meta.url)),
"vue-i18n": "vue-i18n/dist/vue-i18n.cjs.js",
},
},
build: {
chunkSizeWarningLimit: 2500,
},
};
});
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。