You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (relList && relList.supports && relList.supports("modulepreload")) return;
23
+
for (const link of document.querySelectorAll('link[rel="modulepreload"]')) processPreload(link);
24
+
new MutationObserver((mutations) => {
25
+
for (const mutation of mutations) {
26
+
if (mutation.type !== "childList") continue;
27
+
for (const node of mutation.addedNodes) if (node.tagName === "LINK" && node.rel === "modulepreload") processPreload(node);
28
+
}
29
+
}).observe(document, {
30
+
childList: true,
31
+
subtree: true
32
+
});
33
+
function getFetchOpts(link) {
34
+
const fetchOpts = {};
35
+
if (link.integrity) fetchOpts.integrity = link.integrity;
36
+
if (link.referrerPolicy) fetchOpts.referrerPolicy = link.referrerPolicy;
37
+
if (link.crossOrigin === "use-credentials") fetchOpts.credentials = "include";
38
+
else if (link.crossOrigin === "anonymous") fetchOpts.credentials = "omit";
39
+
else fetchOpts.credentials = "same-origin";
40
+
return fetchOpts;
41
+
}
42
+
function processPreload(link) {
43
+
if (link.ep) return;
44
+
link.ep = true;
45
+
const fetchOpts = getFetchOpts(link);
46
+
fetch(link.href, fetchOpts);
47
+
}
48
+
})();
49
+
function greet(name) {
50
+
console.log(\`Hello, \${String(name)}!\`);
51
+
}
52
+
greet("World");
53
+
//# sourceMappingURL=shared-module.js.map
54
+
",
55
+
"shared-module.js.map": "{"version":3,"file":"shared-module.js","sources":["../../src/shared-module.js"],"sourcesContent":["// This is a shared module that is used by multiple HTML pages\\nexport function greet(name) {\\n // eslint-disable-next-line no-console\\n console.log(\`Hello, \${String(name)}!\`);\\n}\\n\\nexport const VERSION = \\"1.0.0\\";\\n\\n// Side effect: greet on load\\ngreet(\\"World\\");\\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACO,SAAS,MAAM,MAAM;AAE1B,UAAQ,IAAI,UAAU,OAAO,IAAI,CAAC,GAAG;AACvC;AAKA,MAAM,OAAO;"}",
0 commit comments