[问题 | question]主应用是V5的,V6作为子应用加载失败

Author: wangzhipeng404Created Jun 22, 2026Updated Aug 17, 2026

问题描述 | Problem description

加载子应用时报错 chunk path empty but not in a worker

排查发现umi.js最开始的这段代码的 document.currentScript 为 null

(function(){;(function(){with(this){const {Array,ArrayBuffer,Boolean,constructor,DataView,Date,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Error,escape,EvalError,Float32Array,Float64Array,Function,hasOwnProperty,Infinity,Int16Array,Int32Array,Int8Array,isFinite,isNaN,isPrototypeOf,JSON,Map,Math,NaN,Number,Object,parseFloat,parseInt,Promise,propertyIsEnumerable,Proxy,RangeError,ReferenceError,Reflect,RegExp,Set,String,Symbol,SyntaxError,toLocaleString,toString,TypeError,Uint16Array,Uint32Array,Uint8Array,Uint8ClampedArray,undefined,unescape,URIError,valueOf,WeakMap,WeakSet,window,self,globalThis,requestAnimationFrame}=this;(globalThis["utooChunk__nctiweb_auto_test"] || (globalThis["utooChunk__nctiweb_auto_test"] = [])).push([
    typeof document === "object" ? document.currentScript : undefined,
    ...
]);

是配置问题还是bug?该怎么解决?

Source: ant-design/ant-design-pro