Files
app-product/dist/assets/remoteEntry.js
编码猿 b77e36a178
Some checks failed
build and push / build-and-push (push) Has been cancelled
first commit
2025-10-07 03:17:55 +08:00

2 lines
1.8 KiB
JavaScript

const p={},b=new Set(["Module","__esModule","default","_export_sfc"]);let g={"./ProductDomain":()=>(y([],!1,"./ProductDomain"),D("/app-product/assets/__federation_expose_ProductDomain-J98eKK33.js").then(e=>Object.keys(e).every(r=>b.has(r))?()=>e.default:()=>e)),"./ProductRouter":()=>(y([],!1,"./ProductRouter"),D("/app-product/assets/__federation_expose_ProductRouter-BB_8fJdP.js").then(e=>Object.keys(e).every(r=>b.has(r))?()=>e.default:()=>e))};const m={},y=(e,r,c)=>{const s=import.meta.url;if(typeof s>"u"){console.warn('The remote style takes effect only when the build.target option in the vite.config.ts file is higher than that of "es2020".');return}const i=s.substring(0,s.lastIndexOf("remoteEntry.js")),_='/app-product/';'assets',e.forEach(a=>{let o="";const l=_||i;if(l){const n={trailing:t=>t.endsWith("/")?t.slice(0,-1):t,leading:t=>t.startsWith("/")?t.slice(1):t},E=t=>t.startsWith("http")||t.startsWith("//"),f=n.trailing(l),u=n.leading(a),h=n.trailing(i);E(l)?o=[f,u].filter(Boolean).join("/"):h.includes(f)?o=[h,u].filter(Boolean).join("/"):o=[h+f,u].filter(Boolean).join("/")}else o=a;if(r){const n="css__app-product__"+c;window[n]=window[n]||[],window[n].push(o);return}if(o in m)return;m[o]=!0;const d=document.createElement("link");d.rel="stylesheet",d.href=o,document.head.appendChild(d)})};async function D(e){return p[e]??=import(e),p[e]}const w=e=>{if(!g[e])throw new Error("Can not find remote module "+e);return g[e]()},T=e=>{globalThis.__federation_shared__=globalThis.__federation_shared__||{},Object.entries(e).forEach(([r,c])=>{for(const[s,i]of Object.entries(c)){const _=i.scope||"default";globalThis.__federation_shared__[_]=globalThis.__federation_shared__[_]||{};const a=globalThis.__federation_shared__[_];(a[r]=a[r]||{})[s]=i}})};export{y as dynamicLoadingCss,w as get,T as init};