vite 7.2.4 → 8.0.0-beta.0
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 +55 -90
- package/dist/client/client.mjs +4 -4
- package/dist/node/chunks/build.js +1 -1
- package/dist/node/chunks/build2.js +123 -123
- package/dist/node/chunks/chunk.js +26 -9
- package/dist/node/chunks/config.js +3 -36618
- package/dist/node/chunks/lib.js +11 -11
- package/dist/node/chunks/logger.js +10 -14
- package/dist/node/chunks/node.js +35583 -0
- package/dist/node/chunks/optimizer.js +1 -1
- package/dist/node/chunks/postcss-import.js +21 -21
- package/dist/node/chunks/preview.js +1 -1
- package/dist/node/chunks/server.js +1 -1
- package/dist/node/cli.js +3 -3
- package/dist/node/index.d.ts +199 -41
- package/dist/node/index.js +2 -28
- package/dist/node/internal.d.ts +2 -0
- package/dist/node/internal.js +3 -0
- package/package.json +18 -25
- package/types/customEvent.d.ts +1 -1
- package/types/hot.d.ts +1 -1
- package/types/importMeta.d.ts +2 -2
- package/types/internal/esbuildOptions.d.ts +28 -0
- package/types/internal/rollupTypeCompat.d.ts +24 -0
- package/types/metadata.d.ts +6 -1
- package/dist/node/chunks/config2.js +0 -4
- package/types/package.json +0 -4
package/dist/node/chunks/lib.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as __commonJSMin } from "./chunk.js";
|
|
2
2
|
|
|
3
3
|
//#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/parse.js
|
|
4
|
-
var require_parse = /* @__PURE__ */
|
|
4
|
+
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5
5
|
var openParentheses = "(".charCodeAt(0);
|
|
6
6
|
var closeParentheses = ")".charCodeAt(0);
|
|
7
7
|
var singleQuote = "'".charCodeAt(0);
|
|
@@ -229,11 +229,11 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postc
|
|
|
229
229
|
}
|
|
230
230
|
return stack[0].nodes;
|
|
231
231
|
};
|
|
232
|
-
})
|
|
232
|
+
}));
|
|
233
233
|
|
|
234
234
|
//#endregion
|
|
235
235
|
//#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/walk.js
|
|
236
|
-
var require_walk = /* @__PURE__ */
|
|
236
|
+
var require_walk = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
237
237
|
module.exports = function walk$1(nodes, cb, bubble) {
|
|
238
238
|
var i, max, node, result;
|
|
239
239
|
for (i = 0, max = nodes.length; i < max; i += 1) {
|
|
@@ -243,11 +243,11 @@ var require_walk = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcs
|
|
|
243
243
|
if (bubble) cb(node, i, nodes);
|
|
244
244
|
}
|
|
245
245
|
};
|
|
246
|
-
})
|
|
246
|
+
}));
|
|
247
247
|
|
|
248
248
|
//#endregion
|
|
249
249
|
//#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/stringify.js
|
|
250
|
-
var require_stringify = /* @__PURE__ */
|
|
250
|
+
var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
251
251
|
function stringifyNode(node, custom) {
|
|
252
252
|
var type = node.type;
|
|
253
253
|
var value = node.value;
|
|
@@ -277,11 +277,11 @@ var require_stringify = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/p
|
|
|
277
277
|
return stringifyNode(nodes, custom);
|
|
278
278
|
}
|
|
279
279
|
module.exports = stringify$1;
|
|
280
|
-
})
|
|
280
|
+
}));
|
|
281
281
|
|
|
282
282
|
//#endregion
|
|
283
283
|
//#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/unit.js
|
|
284
|
-
var require_unit = /* @__PURE__ */
|
|
284
|
+
var require_unit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
285
285
|
var minus = "-".charCodeAt(0);
|
|
286
286
|
var plus = "+".charCodeAt(0);
|
|
287
287
|
var dot = ".".charCodeAt(0);
|
|
@@ -345,11 +345,11 @@ var require_unit = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcs
|
|
|
345
345
|
unit: value.slice(pos)
|
|
346
346
|
};
|
|
347
347
|
};
|
|
348
|
-
})
|
|
348
|
+
}));
|
|
349
349
|
|
|
350
350
|
//#endregion
|
|
351
351
|
//#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/index.js
|
|
352
|
-
var require_lib = /* @__PURE__ */
|
|
352
|
+
var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
353
353
|
var parse = require_parse();
|
|
354
354
|
var walk = require_walk();
|
|
355
355
|
var stringify = require_stringify();
|
|
@@ -371,7 +371,7 @@ var require_lib = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss
|
|
|
371
371
|
ValueParser.walk = walk;
|
|
372
372
|
ValueParser.stringify = stringify;
|
|
373
373
|
module.exports = ValueParser;
|
|
374
|
-
})
|
|
374
|
+
}));
|
|
375
375
|
|
|
376
376
|
//#endregion
|
|
377
377
|
export { require_lib as t };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { s as __toESM, t as __commonJSMin } from "./chunk.js";
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
3
|
import path, { resolve } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import readline from "node:readline";
|
|
6
6
|
|
|
7
7
|
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
8
|
-
var require_picocolors = /* @__PURE__ */
|
|
8
|
+
var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9
9
|
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
10
10
|
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
11
11
|
let formatter = (open, close, replace = open) => (input) => {
|
|
@@ -70,7 +70,7 @@ var require_picocolors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
70
70
|
};
|
|
71
71
|
module.exports = createColors();
|
|
72
72
|
module.exports.createColors = createColors;
|
|
73
|
-
})
|
|
73
|
+
}));
|
|
74
74
|
|
|
75
75
|
//#endregion
|
|
76
76
|
//#region src/node/constants.ts
|
|
@@ -88,9 +88,6 @@ const ROLLUP_HOOKS = [
|
|
|
88
88
|
"footer",
|
|
89
89
|
"augmentChunkHash",
|
|
90
90
|
"outputOptions",
|
|
91
|
-
"renderDynamicImport",
|
|
92
|
-
"resolveFileUrl",
|
|
93
|
-
"resolveImportMeta",
|
|
94
91
|
"intro",
|
|
95
92
|
"outro",
|
|
96
93
|
"closeBundle",
|
|
@@ -100,7 +97,6 @@ const ROLLUP_HOOKS = [
|
|
|
100
97
|
"watchChange",
|
|
101
98
|
"resolveDynamicImport",
|
|
102
99
|
"resolveId",
|
|
103
|
-
"shouldTransformCachedModule",
|
|
104
100
|
"transform",
|
|
105
101
|
"onLog"
|
|
106
102
|
];
|
|
@@ -144,10 +140,10 @@ const DEFAULT_EXTENSIONS = [
|
|
|
144
140
|
* The value is generated by `pnpm generate-target` script.
|
|
145
141
|
*/
|
|
146
142
|
const ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET = [
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"safari16"
|
|
143
|
+
"chrome111",
|
|
144
|
+
"edge111",
|
|
145
|
+
"firefox114",
|
|
146
|
+
"safari16.4"
|
|
151
147
|
];
|
|
152
148
|
const DEFAULT_CONFIG_FILES = [
|
|
153
149
|
"vite.config.js",
|
|
@@ -319,9 +315,9 @@ function createLogger(level = "info", options = {}) {
|
|
|
319
315
|
return logger;
|
|
320
316
|
}
|
|
321
317
|
function printServerUrls(urls, optionsHost, info) {
|
|
322
|
-
const colorUrl = (url) => import_picocolors.default.cyan(url.replace(/:(\d+)\//, (_, port) => `:${import_picocolors.default.bold(port)}/`));
|
|
323
|
-
for (const url of urls.local) info(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Local")}: ${colorUrl(url)}`);
|
|
324
|
-
for (const url of urls.network) info(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Network")}: ${colorUrl(url)}`);
|
|
318
|
+
const colorUrl = (url$1) => import_picocolors.default.cyan(url$1.replace(/:(\d+)\//, (_, port) => `:${import_picocolors.default.bold(port)}/`));
|
|
319
|
+
for (const url$1 of urls.local) info(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Local")}: ${colorUrl(url$1)}`);
|
|
320
|
+
for (const url$1 of urls.network) info(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Network")}: ${colorUrl(url$1)}`);
|
|
325
321
|
if (urls.network.length === 0 && optionsHost === void 0) info(import_picocolors.default.dim(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Network")}: use `) + import_picocolors.default.bold("--host") + import_picocolors.default.dim(" to expose"));
|
|
326
322
|
}
|
|
327
323
|
|