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: {