@aprovan/patchwork-compiler 0.1.2-dev.5b24ed2 → 0.1.2-dev.68f15f3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -81,7 +81,7 @@ __export(index_exports, {
81
81
  });
82
82
  module.exports = __toCommonJS(index_exports);
83
83
 
84
- // ../../node_modules/.pnpm/tsup@8.5.1_jiti@1.21.7_postcss@8.5.6_tsx@4.21.0_typescript@5.9.3/node_modules/tsup/assets/cjs_shims.js
84
+ // ../../node_modules/.pnpm/tsup@8.5.1_jiti@1.21.7_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3/node_modules/tsup/assets/cjs_shims.js
85
85
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
86
86
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
87
87
 
@@ -1141,14 +1141,18 @@ async function mountEmbedded(widget, options, image, proxy) {
1141
1141
  const globalMapping = frameworkConfig.globals || {};
1142
1142
  const deps = frameworkConfig.deps || {};
1143
1143
  injectImportMap(globalMapping, preloadUrls, deps);
1144
+ const preloadCache = window.__preloadedModules;
1144
1145
  const preloadedModules = await Promise.all(
1145
- preloadUrls.map(
1146
- (url) => import(
1146
+ preloadUrls.map(async (url) => {
1147
+ if (preloadCache?.has(url)) {
1148
+ return preloadCache.get(url);
1149
+ }
1150
+ return import(
1147
1151
  /* webpackIgnore: true */
1148
1152
  /* @vite-ignore */
1149
1153
  url
1150
- )
1151
- )
1154
+ );
1155
+ })
1152
1156
  );
1153
1157
  const win = window;
1154
1158
  const globalNames = Object.values(globalMapping);