@vitest/browser 0.25.2 → 0.25.4
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/client/__vitest__/assets/index.17258d7b.js +33 -0
- package/dist/client/__vitest__/index.html +1 -1
- package/dist/client/assets/index.5e00c68b.js +497 -0
- package/dist/client/index.html +1 -1
- package/package.json +7 -7
- package/dist/client/__vitest__/assets/index.0b7f73e8.js +0 -33
- package/dist/client/assets/index.891d93e6.js +0 -41
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
(function polyfill() {
|
|
2
|
-
const relList = document.createElement("link").relList;
|
|
3
|
-
if (relList && relList.supports && relList.supports("modulepreload")) {
|
|
4
|
-
return;
|
|
5
|
-
}
|
|
6
|
-
for (const link of document.querySelectorAll('link[rel="modulepreload"]')) {
|
|
7
|
-
processPreload(link);
|
|
8
|
-
}
|
|
9
|
-
new MutationObserver((mutations) => {
|
|
10
|
-
for (const mutation of mutations) {
|
|
11
|
-
if (mutation.type !== "childList") {
|
|
12
|
-
continue;
|
|
13
|
-
}
|
|
14
|
-
for (const node of mutation.addedNodes) {
|
|
15
|
-
if (node.tagName === "LINK" && node.rel === "modulepreload")
|
|
16
|
-
processPreload(node);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}).observe(document, { childList: true, subtree: true });
|
|
20
|
-
function getFetchOpts(script) {
|
|
21
|
-
const fetchOpts = {};
|
|
22
|
-
if (script.integrity)
|
|
23
|
-
fetchOpts.integrity = script.integrity;
|
|
24
|
-
if (script.referrerpolicy)
|
|
25
|
-
fetchOpts.referrerPolicy = script.referrerpolicy;
|
|
26
|
-
if (script.crossorigin === "use-credentials")
|
|
27
|
-
fetchOpts.credentials = "include";
|
|
28
|
-
else if (script.crossorigin === "anonymous")
|
|
29
|
-
fetchOpts.credentials = "omit";
|
|
30
|
-
else
|
|
31
|
-
fetchOpts.credentials = "same-origin";
|
|
32
|
-
return fetchOpts;
|
|
33
|
-
}
|
|
34
|
-
function processPreload(link) {
|
|
35
|
-
if (link.ep)
|
|
36
|
-
return;
|
|
37
|
-
link.ep = true;
|
|
38
|
-
const fetchOpts = getFetchOpts(link);
|
|
39
|
-
fetch(link.href, fetchOpts);
|
|
40
|
-
}
|
|
41
|
-
})();
|