@aprovan/patchwork-compiler 0.1.2-dev.4a481e4 → 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 +9 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1054,14 +1054,18 @@ async function mountEmbedded(widget, options, image, proxy) {
|
|
|
1054
1054
|
const globalMapping = frameworkConfig.globals || {};
|
|
1055
1055
|
const deps = frameworkConfig.deps || {};
|
|
1056
1056
|
injectImportMap(globalMapping, preloadUrls, deps);
|
|
1057
|
+
const preloadCache = window.__preloadedModules;
|
|
1057
1058
|
const preloadedModules = await Promise.all(
|
|
1058
|
-
preloadUrls.map(
|
|
1059
|
-
(url)
|
|
1059
|
+
preloadUrls.map(async (url) => {
|
|
1060
|
+
if (preloadCache?.has(url)) {
|
|
1061
|
+
return preloadCache.get(url);
|
|
1062
|
+
}
|
|
1063
|
+
return import(
|
|
1060
1064
|
/* webpackIgnore: true */
|
|
1061
1065
|
/* @vite-ignore */
|
|
1062
1066
|
url
|
|
1063
|
-
)
|
|
1064
|
-
)
|
|
1067
|
+
);
|
|
1068
|
+
})
|
|
1065
1069
|
);
|
|
1066
1070
|
const win = window;
|
|
1067
1071
|
const globalNames = Object.values(globalMapping);
|