"fix(build): 修复 vxe-table 表格无法渲染数据的问题" -m "根因:Vite 预打包 vxe-table 时将
xe-utils/hasOwnProp 内联,导致 patchDepsPlugin 的 Vue 3 Proxy 兼容补丁无法生效,obj.hasOwnProperty(key) 在 Proxy 对象上抛出 TypeError。 修复:在 optimizeDeps.exclude 中排除 xe-utils,阻止预打包,确保补丁生效。"
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user