From d9c74abaeb803e0a6030abba40848da666b9a8b8 Mon Sep 17 00:00:00 2001 From: wangjian963 <15215920+aprilry@user.noreply.gitee.com> Date: Wed, 3 Jun 2026 15:43:03 +0800 Subject: [PATCH] =?UTF-8?q?"fix(build):=20=E4=BF=AE=E5=A4=8D=20vxe-table?= =?UTF-8?q?=20=E8=A1=A8=E6=A0=BC=E6=97=A0=E6=B3=95=E6=B8=B2=E6=9F=93?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9A=84=E9=97=AE=E9=A2=98"=20-m=20"?= =?UTF-8?q?=E6=A0=B9=E5=9B=A0=EF=BC=9AVite=20=E9=A2=84=E6=89=93=E5=8C=85?= =?UTF-8?q?=20vxe-table=20=E6=97=B6=E5=B0=86=20=20=20xe-utils/hasOwnProp?= =?UTF-8?q?=20=E5=86=85=E8=81=94=EF=BC=8C=E5=AF=BC=E8=87=B4=20patchDepsPlu?= =?UTF-8?q?gin=20=E7=9A=84=20Vue=203=20Proxy=20=E5=85=BC=E5=AE=B9=E8=A1=A5?= =?UTF-8?q?=E4=B8=81=E6=97=A0=E6=B3=95=E7=94=9F=E6=95=88=EF=BC=8Cobj.hasOw?= =?UTF-8?q?nProperty(key)=20=E5=9C=A8=20Proxy=20=20=20=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E4=B8=8A=E6=8A=9B=E5=87=BA=20TypeError=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复:在 optimizeDeps.exclude 中排除 xe-utils,阻止预打包,确保补丁生效。" --- openhis-ui-vue3/vite.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openhis-ui-vue3/vite.config.js b/openhis-ui-vue3/vite.config.js index 2cc44ac46..ffdab3d5b 100755 --- a/openhis-ui-vue3/vite.config.js +++ b/openhis-ui-vue3/vite.config.js @@ -55,6 +55,11 @@ export default defineConfig(({ mode, command }) => { build: { cssMinify: 'esbuild', }, + optimizeDeps: { + // 排除 xe-utils 预打包,以便 patchDepsPlugin 能拦截并修补 hasOwnProp + // (Vue 3 Proxy 对象上调用 obj.hasOwnProperty(key) 会失败) + exclude: ['xe-utils'], + }, //fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file css: { preprocessorOptions: {