vite 6.0.0-alpha.17 → 6.0.0-alpha.19
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/LICENSE.md +112 -203
- package/client.d.ts +4 -0
- package/dist/client/client.mjs +614 -612
- package/dist/client/env.mjs +18 -24
- package/dist/node/chunks/{dep-DVlS5vGL.js → dep-BWEMV5Th.js} +44780 -46989
- package/dist/node/chunks/{dep-CrWVpuYf.js → dep-D-7KCb9p.js} +32 -2
- package/dist/node/chunks/{dep-DJVII9WQ.js → dep-MbEgMyUv.js} +12 -16
- package/dist/node/chunks/{dep-CNsiFGD3.js → dep-bCS_cgqC.js} +1 -1
- package/dist/node/cli.js +253 -263
- package/dist/node/constants.js +105 -108
- package/dist/node/index.d.ts +157 -108
- package/dist/node/index.js +125 -143
- package/dist/node/module-runner.d.ts +21 -7
- package/dist/node/module-runner.js +201 -151
- package/dist/node-cjs/publicUtils.cjs +538 -625
- package/package.json +20 -23
- package/types/customEvent.d.ts +1 -0
- package/dist/client/client.mjs.map +0 -1
- package/dist/client/env.mjs.map +0 -1
package/dist/client/env.mjs
CHANGED
@@ -1,30 +1,24 @@
|
|
1
1
|
const context = (() => {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
else {
|
12
|
-
return Function('return this')();
|
13
|
-
}
|
2
|
+
if (typeof globalThis !== "undefined") {
|
3
|
+
return globalThis;
|
4
|
+
} else if (typeof self !== "undefined") {
|
5
|
+
return self;
|
6
|
+
} else if (typeof window !== "undefined") {
|
7
|
+
return window;
|
8
|
+
} else {
|
9
|
+
return Function("return this")();
|
10
|
+
}
|
14
11
|
})();
|
15
|
-
// assign defines
|
16
12
|
const defines = __DEFINES__;
|
17
13
|
Object.keys(defines).forEach((key) => {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
target = target[segment] || (target[segment] = {});
|
27
|
-
}
|
14
|
+
const segments = key.split(".");
|
15
|
+
let target = context;
|
16
|
+
for (let i = 0; i < segments.length; i++) {
|
17
|
+
const segment = segments[i];
|
18
|
+
if (i === segments.length - 1) {
|
19
|
+
target[segment] = defines[key];
|
20
|
+
} else {
|
21
|
+
target = target[segment] || (target[segment] = {});
|
28
22
|
}
|
23
|
+
}
|
29
24
|
});
|
30
|
-
//# sourceMappingURL=env.mjs.map
|