vite 7.1.2 → 7.1.3
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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/bin/vite.js +3 -3
- package/dist/node/chunks/{dep-CTf3zVuV.js → dep-03SfmTdk.js} +3 -3
- package/dist/node/chunks/dep-6-jTB_1O.js +5 -0
- package/dist/node/chunks/{dep-CMEinpL-.js → dep-Bj7gA1-0.js} +336 -468
- package/dist/node/chunks/{dep-zLyvzoxR.js → dep-C9NktISv.js} +6 -7
- package/dist/node/chunks/{dep-f94b-k0u.js → dep-CA7ICgyJ.js} +1 -2
- package/dist/node/chunks/dep-CPnzVSwg.js +5 -0
- package/dist/node/chunks/{dep-BDCsDwBr.js → dep-CcFMbzqu.js} +0 -1
- package/dist/node/chunks/dep-D5MCzjWT.js +172 -0
- package/dist/node/chunks/dep-SeJl6gzM.js +5 -0
- package/dist/node/chunks/{dep-BDbL9e7d.js → dep-TDFDwW_9.js} +3 -3
- package/dist/node/chunks/{dep-V5uAjiuB.js → dep-UEPspf5j.js} +0 -1
- package/dist/node/chunks/{dep-Du_AlPMa.js → dep-XdVlHtXy.js} +12 -13
- package/dist/node/chunks/{dep-Drtntmtt.js → dep-lCKrEJQm.js} +2 -2
- package/dist/node/cli.js +16 -8
- package/dist/node/constants.js +1 -2
- package/dist/node/index.js +3 -3
- package/package.json +7 -7
- package/dist/node/chunks/dep-CtUaBn5f.js +0 -5
- package/dist/node/chunks/dep-DZ4iRZu_.js +0 -5
@@ -1,6 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import { require_lib } from "./dep-f94b-k0u.js";
|
1
|
+
import { __commonJS, __require } from "./dep-lCKrEJQm.js";
|
2
|
+
import { require_lib } from "./dep-CA7ICgyJ.js";
|
4
3
|
|
5
4
|
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/format-import-prelude.js
|
6
5
|
var require_format_import_prelude = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/format-import-prelude.js": ((exports, module) => {
|
@@ -292,7 +291,7 @@ var require_parse_statements = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
292
291
|
//#endregion
|
293
292
|
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/process-content.js
|
294
293
|
var require_process_content = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/process-content.js": ((exports, module) => {
|
295
|
-
const path$2 =
|
294
|
+
const path$2 = __require("path");
|
296
295
|
let sugarss;
|
297
296
|
module.exports = function processContent$1(result, content, filename, options, postcss) {
|
298
297
|
const { plugins } = options;
|
@@ -302,7 +301,7 @@ var require_process_content = /* @__PURE__ */ __commonJS({ "../../node_modules/.
|
|
302
301
|
if (!sugarss)
|
303
302
|
/* c8 ignore next 3 */
|
304
303
|
try {
|
305
|
-
sugarss =
|
304
|
+
sugarss = __require("sugarss");
|
306
305
|
} catch {}
|
307
306
|
if (sugarss) return runPostcss(postcss, content, filename, plugins, [sugarss]);
|
308
307
|
}
|
@@ -327,7 +326,7 @@ var require_process_content = /* @__PURE__ */ __commonJS({ "../../node_modules/.
|
|
327
326
|
//#endregion
|
328
327
|
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/parse-styles.js
|
329
328
|
var require_parse_styles = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/parse-styles.js": ((exports, module) => {
|
330
|
-
const path$1 =
|
329
|
+
const path$1 = __require("path");
|
331
330
|
const dataURL = require_data_url();
|
332
331
|
const parseStatements = require_parse_statements();
|
333
332
|
const processContent = require_process_content();
|
@@ -434,7 +433,7 @@ var require_parse_styles = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
434
433
|
//#endregion
|
435
434
|
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/index.js
|
436
435
|
var require_postcss_import = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/index.js": ((exports, module) => {
|
437
|
-
const path =
|
436
|
+
const path = __require("path");
|
438
437
|
const applyConditions = require_apply_conditions();
|
439
438
|
const applyRaws = require_apply_raws();
|
440
439
|
const applyStyles = require_apply_styles();
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
import { __commonJS } from "./dep-Drtntmtt.js";
|
1
|
+
import { __commonJS } from "./dep-lCKrEJQm.js";
|
3
2
|
|
4
3
|
//#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/parse.js
|
5
4
|
var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/parse.js": ((exports, module) => {
|
@@ -0,0 +1,172 @@
|
|
1
|
+
import { __commonJS, __toESM } from "./dep-lCKrEJQm.js";
|
2
|
+
import readline from "node:readline";
|
3
|
+
|
4
|
+
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
5
|
+
var require_picocolors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": ((exports, module) => {
|
6
|
+
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
7
|
+
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);
|
8
|
+
let formatter = (open, close, replace = open) => (input) => {
|
9
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
10
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
11
|
+
};
|
12
|
+
let replaceClose = (string, close, replace, index) => {
|
13
|
+
let result = "", cursor = 0;
|
14
|
+
do {
|
15
|
+
result += string.substring(cursor, index) + replace;
|
16
|
+
cursor = index + close.length;
|
17
|
+
index = string.indexOf(close, cursor);
|
18
|
+
} while (~index);
|
19
|
+
return result + string.substring(cursor);
|
20
|
+
};
|
21
|
+
let createColors = (enabled = isColorSupported) => {
|
22
|
+
let f = enabled ? formatter : () => String;
|
23
|
+
return {
|
24
|
+
isColorSupported: enabled,
|
25
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
26
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
27
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
28
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
29
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
30
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
31
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
32
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
33
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
34
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
35
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
36
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
37
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
38
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
39
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
40
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
41
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
42
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
43
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
44
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
45
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
46
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
47
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
48
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
49
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
50
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
51
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
52
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
53
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
54
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
55
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
56
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
57
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
58
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
59
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
60
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
61
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
62
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
63
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
64
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
65
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
66
|
+
};
|
67
|
+
};
|
68
|
+
module.exports = createColors();
|
69
|
+
module.exports.createColors = createColors;
|
70
|
+
}) });
|
71
|
+
|
72
|
+
//#endregion
|
73
|
+
//#region src/node/logger.ts
|
74
|
+
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
75
|
+
const LogLevels = {
|
76
|
+
silent: 0,
|
77
|
+
error: 1,
|
78
|
+
warn: 2,
|
79
|
+
info: 3
|
80
|
+
};
|
81
|
+
let lastType;
|
82
|
+
let lastMsg;
|
83
|
+
let sameCount = 0;
|
84
|
+
function clearScreen() {
|
85
|
+
const repeatCount = process.stdout.rows - 2;
|
86
|
+
const blank = repeatCount > 0 ? "\n".repeat(repeatCount) : "";
|
87
|
+
console.log(blank);
|
88
|
+
readline.cursorTo(process.stdout, 0, 0);
|
89
|
+
readline.clearScreenDown(process.stdout);
|
90
|
+
}
|
91
|
+
let timeFormatter;
|
92
|
+
function getTimeFormatter() {
|
93
|
+
timeFormatter ??= new Intl.DateTimeFormat(void 0, {
|
94
|
+
hour: "numeric",
|
95
|
+
minute: "numeric",
|
96
|
+
second: "numeric"
|
97
|
+
});
|
98
|
+
return timeFormatter;
|
99
|
+
}
|
100
|
+
function createLogger(level = "info", options = {}) {
|
101
|
+
if (options.customLogger) return options.customLogger;
|
102
|
+
const loggedErrors = /* @__PURE__ */ new WeakSet();
|
103
|
+
const { prefix = "[vite]", allowClearScreen = true, console: console$1 = globalThis.console } = options;
|
104
|
+
const thresh = LogLevels[level];
|
105
|
+
const canClearScreen = allowClearScreen && process.stdout.isTTY && !process.env.CI;
|
106
|
+
const clear = canClearScreen ? clearScreen : () => {};
|
107
|
+
function format(type, msg, options$1 = {}) {
|
108
|
+
if (options$1.timestamp) {
|
109
|
+
let tag = "";
|
110
|
+
if (type === "info") tag = import_picocolors.default.cyan(import_picocolors.default.bold(prefix));
|
111
|
+
else if (type === "warn") tag = import_picocolors.default.yellow(import_picocolors.default.bold(prefix));
|
112
|
+
else tag = import_picocolors.default.red(import_picocolors.default.bold(prefix));
|
113
|
+
const environment = options$1.environment ? options$1.environment + " " : "";
|
114
|
+
return `${import_picocolors.default.dim(getTimeFormatter().format(/* @__PURE__ */ new Date()))} ${tag} ${environment}${msg}`;
|
115
|
+
} else return msg;
|
116
|
+
}
|
117
|
+
function output(type, msg, options$1 = {}) {
|
118
|
+
if (thresh >= LogLevels[type]) {
|
119
|
+
const method = type === "info" ? "log" : type;
|
120
|
+
if (options$1.error) loggedErrors.add(options$1.error);
|
121
|
+
if (canClearScreen) if (type === lastType && msg === lastMsg) {
|
122
|
+
sameCount++;
|
123
|
+
clear();
|
124
|
+
console$1[method](format(type, msg, options$1), import_picocolors.default.yellow(`(x${sameCount + 1})`));
|
125
|
+
} else {
|
126
|
+
sameCount = 0;
|
127
|
+
lastMsg = msg;
|
128
|
+
lastType = type;
|
129
|
+
if (options$1.clear) clear();
|
130
|
+
console$1[method](format(type, msg, options$1));
|
131
|
+
}
|
132
|
+
else console$1[method](format(type, msg, options$1));
|
133
|
+
}
|
134
|
+
}
|
135
|
+
const warnedMessages = /* @__PURE__ */ new Set();
|
136
|
+
const logger = {
|
137
|
+
hasWarned: false,
|
138
|
+
info(msg, opts) {
|
139
|
+
output("info", msg, opts);
|
140
|
+
},
|
141
|
+
warn(msg, opts) {
|
142
|
+
logger.hasWarned = true;
|
143
|
+
output("warn", msg, opts);
|
144
|
+
},
|
145
|
+
warnOnce(msg, opts) {
|
146
|
+
if (warnedMessages.has(msg)) return;
|
147
|
+
logger.hasWarned = true;
|
148
|
+
output("warn", msg, opts);
|
149
|
+
warnedMessages.add(msg);
|
150
|
+
},
|
151
|
+
error(msg, opts) {
|
152
|
+
logger.hasWarned = true;
|
153
|
+
output("error", msg, opts);
|
154
|
+
},
|
155
|
+
clearScreen(type) {
|
156
|
+
if (thresh >= LogLevels[type]) clear();
|
157
|
+
},
|
158
|
+
hasErrorLogged(error) {
|
159
|
+
return loggedErrors.has(error);
|
160
|
+
}
|
161
|
+
};
|
162
|
+
return logger;
|
163
|
+
}
|
164
|
+
function printServerUrls(urls, optionsHost, info) {
|
165
|
+
const colorUrl = (url) => import_picocolors.default.cyan(url.replace(/:(\d+)\//, (_, port) => `:${import_picocolors.default.bold(port)}/`));
|
166
|
+
for (const url of urls.local) info(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Local")}: ${colorUrl(url)}`);
|
167
|
+
for (const url of urls.network) info(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Network")}: ${colorUrl(url)}`);
|
168
|
+
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"));
|
169
|
+
}
|
170
|
+
|
171
|
+
//#endregion
|
172
|
+
export { LogLevels, createLogger, printServerUrls, require_picocolors };
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import { BuildEnvironment, build, buildEnvironmentOptionsDefaults, builderOptionsDefaults, createBuilder, createToImportMetaURLBasedRelativeRuntime, injectEnvironmentToHooks, onRollupLog, resolveBuildEnvironmentOptions, resolveBuildOutputs, resolveBuildPlugins, resolveBuilderOptions, resolveLibFilename, resolveUserExternal, toOutputFilePathInCss, toOutputFilePathInHtml, toOutputFilePathInJS, toOutputFilePathWithoutRuntime } from "./dep-
|
3
|
-
import "./dep-
|
1
|
+
import "./dep-D5MCzjWT.js";
|
2
|
+
import { BuildEnvironment, build, buildEnvironmentOptionsDefaults, builderOptionsDefaults, createBuilder, createToImportMetaURLBasedRelativeRuntime, injectEnvironmentToHooks, onRollupLog, resolveBuildEnvironmentOptions, resolveBuildOutputs, resolveBuildPlugins, resolveBuilderOptions, resolveLibFilename, resolveUserExternal, toOutputFilePathInCss, toOutputFilePathInHtml, toOutputFilePathInJS, toOutputFilePathWithoutRuntime } from "./dep-Bj7gA1-0.js";
|
3
|
+
import "./dep-CcFMbzqu.js";
|
4
4
|
|
5
5
|
export { createBuilder, resolveBuildPlugins };
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import { require_lib } from "./dep-f94b-k0u.js";
|
1
|
+
import { __commonJS, __require } from "./dep-lCKrEJQm.js";
|
2
|
+
import { require_lib } from "./dep-CA7ICgyJ.js";
|
4
3
|
|
5
4
|
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/fs.js
|
6
5
|
var require_fs = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/fs.js": ((exports) => {
|
@@ -960,8 +959,8 @@ var require_localsConvention = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
960
959
|
var require_FileSystemLoader = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/FileSystemLoader.js": ((exports) => {
|
961
960
|
Object.defineProperty(exports, "__esModule", { value: true });
|
962
961
|
exports.default = void 0;
|
963
|
-
var _postcss$1 = _interopRequireDefault$21(
|
964
|
-
var _path = _interopRequireDefault$21(
|
962
|
+
var _postcss$1 = _interopRequireDefault$21(__require("postcss"));
|
963
|
+
var _path = _interopRequireDefault$21(__require("path"));
|
965
964
|
var _Parser$1 = _interopRequireDefault$21(require_Parser());
|
966
965
|
var _fs$1 = require_fs();
|
967
966
|
function _interopRequireDefault$21(obj) {
|
@@ -1012,7 +1011,7 @@ var require_FileSystemLoader = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
1012
1011
|
const rootRelativePath = fileResolvedPath || _path.default.resolve(relativeDir, newPath);
|
1013
1012
|
let fileRelativePath = fileResolvedPath || _path.default.resolve(_path.default.resolve(this.root, relativeDir), newPath);
|
1014
1013
|
if (!useFileResolve && newPath[0] !== "." && !_path.default.isAbsolute(newPath)) try {
|
1015
|
-
fileRelativePath =
|
1014
|
+
fileRelativePath = __require.resolve(newPath);
|
1016
1015
|
} catch (e) {}
|
1017
1016
|
const tokens$1 = this.tokensByFile[fileRelativePath];
|
1018
1017
|
if (tokens$1) return tokens$1;
|
@@ -1545,13 +1544,13 @@ var require_getHashDigest = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
|
|
1545
1544
|
hash$1 = new BatchedHash(createMd4());
|
1546
1545
|
} else if (algorithm === "native-md4") {
|
1547
1546
|
if (typeof crypto === "undefined") {
|
1548
|
-
crypto =
|
1547
|
+
crypto = __require("crypto");
|
1549
1548
|
if (BulkUpdateDecorator === void 0) BulkUpdateDecorator = require_BulkUpdateDecorator();
|
1550
1549
|
}
|
1551
1550
|
hash$1 = new BulkUpdateDecorator(() => crypto.createHash("md4"), "md4");
|
1552
1551
|
} else {
|
1553
1552
|
if (typeof crypto === "undefined") {
|
1554
|
-
crypto =
|
1553
|
+
crypto = __require("crypto");
|
1555
1554
|
if (BulkUpdateDecorator === void 0) BulkUpdateDecorator = require_BulkUpdateDecorator();
|
1556
1555
|
}
|
1557
1556
|
hash$1 = new BulkUpdateDecorator(() => crypto.createHash(algorithm), algorithm);
|
@@ -1566,7 +1565,7 @@ var require_getHashDigest = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
|
|
1566
1565
|
//#endregion
|
1567
1566
|
//#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/interpolateName.js
|
1568
1567
|
var require_interpolateName = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/interpolateName.js": ((exports, module) => {
|
1569
|
-
const path$1 =
|
1568
|
+
const path$1 = __require("path");
|
1570
1569
|
const getHashDigest = require_getHashDigest();
|
1571
1570
|
function interpolateName$1(loaderContext, name, options = {}) {
|
1572
1571
|
let filename;
|
@@ -1620,7 +1619,7 @@ var require_interpolateName = /* @__PURE__ */ __commonJS({ "../../node_modules/.
|
|
1620
1619
|
//#region ../../node_modules/.pnpm/generic-names@4.0.0/node_modules/generic-names/index.js
|
1621
1620
|
var require_generic_names = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/generic-names@4.0.0/node_modules/generic-names/index.js": ((exports, module) => {
|
1622
1621
|
var interpolateName = require_interpolateName();
|
1623
|
-
var path =
|
1622
|
+
var path = __require("path");
|
1624
1623
|
/**
|
1625
1624
|
* @param {string} pattern
|
1626
1625
|
* @param {object} options
|
@@ -2828,7 +2827,7 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/util-d
|
|
2828
2827
|
/**
|
2829
2828
|
* For Node.js, simply re-export the core `util.deprecate` function.
|
2830
2829
|
*/
|
2831
|
-
module.exports =
|
2830
|
+
module.exports = __require("util").deprecate;
|
2832
2831
|
}) });
|
2833
2832
|
|
2834
2833
|
//#endregion
|
@@ -5504,7 +5503,7 @@ var require_scoping = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pos
|
|
5504
5503
|
var require_pluginFactory = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/pluginFactory.js": ((exports) => {
|
5505
5504
|
Object.defineProperty(exports, "__esModule", { value: true });
|
5506
5505
|
exports.makePlugin = makePlugin;
|
5507
|
-
var _postcss = _interopRequireDefault(
|
5506
|
+
var _postcss = _interopRequireDefault(__require("postcss"));
|
5508
5507
|
var _unquote = _interopRequireDefault(require_unquote());
|
5509
5508
|
var _Parser = _interopRequireDefault(require_Parser());
|
5510
5509
|
var _saveJSON = _interopRequireDefault(require_saveJSON());
|
@@ -5579,7 +5578,7 @@ var require_pluginFactory = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
|
|
5579
5578
|
//#endregion
|
5580
5579
|
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/index.js
|
5581
5580
|
var require_build = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/index.js": ((exports, module) => {
|
5582
|
-
var _fs =
|
5581
|
+
var _fs = __require("fs");
|
5583
5582
|
var _fs2 = require_fs();
|
5584
5583
|
var _pluginFactory = require_pluginFactory();
|
5585
5584
|
(0, _fs2.setFileSystem)({
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { createRequire as ___createRequire } from 'module'; const require = ___createRequire(import.meta.url);
|
2
1
|
import { createRequire } from "node:module";
|
3
2
|
|
4
3
|
//#region rolldown:runtime
|
@@ -26,6 +25,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
25
|
enumerable: true
|
27
26
|
}) : target, mod));
|
28
27
|
var __toDynamicImportESM = (isNodeMode) => (mod) => __toESM(mod.default, isNodeMode);
|
28
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
29
29
|
|
30
30
|
//#endregion
|
31
|
-
export { __commonJS, __toDynamicImportESM, __toESM };
|
31
|
+
export { __commonJS, __require, __toDynamicImportESM, __toESM };
|
package/dist/node/cli.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import { VERSION } from "./chunks/dep-BDCsDwBr.js";
|
1
|
+
import { __toESM } from "./chunks/dep-lCKrEJQm.js";
|
2
|
+
import { createLogger, require_picocolors } from "./chunks/dep-D5MCzjWT.js";
|
3
|
+
import { VERSION } from "./chunks/dep-CcFMbzqu.js";
|
5
4
|
import fs from "node:fs";
|
6
5
|
import path from "node:path";
|
7
6
|
import { performance } from "node:perf_hooks";
|
@@ -492,6 +491,14 @@ const cac = (name = "") => new CAC(name);
|
|
492
491
|
//#endregion
|
493
492
|
//#region src/node/cli.ts
|
494
493
|
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
494
|
+
function checkNodeVersion(nodeVersion) {
|
495
|
+
const currentVersion = nodeVersion.split(".");
|
496
|
+
const major = parseInt(currentVersion[0], 10);
|
497
|
+
const minor = parseInt(currentVersion[1], 10);
|
498
|
+
const isSupported = major === 20 && minor >= 19 || major === 22 && minor >= 12 || major > 22;
|
499
|
+
return isSupported;
|
500
|
+
}
|
501
|
+
if (!checkNodeVersion(process.versions.node)) console.warn(import_picocolors.default.yellow(`You are using Node.js ${process.versions.node}. Vite requires Node.js version 20.19+ or 22.12+. Please upgrade your Node.js version.`));
|
495
502
|
const cli = cac("vite");
|
496
503
|
let profileSession = global.__vite_profile_session;
|
497
504
|
let profileCount = 0;
|
@@ -568,7 +575,7 @@ const convertBase = (v) => {
|
|
568
575
|
cli.option("-c, --config <file>", `[string] use specified config file`).option("--base <path>", `[string] public base path (default: /)`, { type: [convertBase] }).option("-l, --logLevel <level>", `[string] info | warn | error | silent`).option("--clearScreen", `[boolean] allow/disable clear screen when logging`).option("--configLoader <loader>", `[string] use 'bundle' to bundle the config with esbuild, or 'runner' (experimental) to process it on the fly, or 'native' (experimental) to load using the native runtime (default: bundle)`).option("-d, --debug [feat]", `[string | boolean] show debug logs`).option("-f, --filter <filter>", `[string] filter debug logs`).option("-m, --mode <mode>", `[string] set env mode`);
|
569
576
|
cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--host [host]", `[string] specify hostname`, { type: [convertHost] }).option("--port <port>", `[number] specify port`).option("--open [path]", `[boolean | string] open browser on startup`).option("--cors", `[boolean] enable CORS`).option("--strictPort", `[boolean] exit if specified port is already in use`).option("--force", `[boolean] force the optimizer to ignore the cache and re-bundle`).action(async (root, options) => {
|
570
577
|
filterDuplicateOptions(options);
|
571
|
-
const { createServer } = await import("./chunks/dep-
|
578
|
+
const { createServer } = await import("./chunks/dep-CPnzVSwg.js");
|
572
579
|
try {
|
573
580
|
const server = await createServer({
|
574
581
|
root,
|
@@ -624,7 +631,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
|
|
624
631
|
});
|
625
632
|
cli.command("build [root]", "build for production").option("--target <target>", `[string] transpile target (default: 'baseline-widely-available')`).option("--outDir <dir>", `[string] output directory (default: dist)`).option("--assetsDir <dir>", `[string] directory under outDir to place assets in (default: assets)`).option("--assetsInlineLimit <number>", `[number] static asset base64 inline threshold in bytes (default: 4096)`).option("--ssr [entry]", `[string] build specified entry for server-side rendering`).option("--sourcemap [output]", `[boolean | "inline" | "hidden"] output source maps for build (default: false)`).option("--minify [minifier]", "[boolean | \"terser\" | \"esbuild\"] enable/disable minification, or specify minifier to use (default: esbuild)").option("--manifest [name]", `[boolean | string] emit build manifest json`).option("--ssrManifest [name]", `[boolean | string] emit ssr manifest json`).option("--emptyOutDir", `[boolean] force empty outDir when it's outside of root`).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--app", `[boolean] same as \`builder: {}\``).action(async (root, options) => {
|
626
633
|
filterDuplicateOptions(options);
|
627
|
-
const { createBuilder } = await import("./chunks/dep-
|
634
|
+
const { createBuilder } = await import("./chunks/dep-TDFDwW_9.js");
|
628
635
|
const buildOptions = cleanGlobalCLIOptions(cleanBuilderCLIOptions(options));
|
629
636
|
try {
|
630
637
|
const inlineConfig = {
|
@@ -649,7 +656,8 @@ cli.command("build [root]", "build for production").option("--target <target>",
|
|
649
656
|
});
|
650
657
|
cli.command("optimize [root]", "pre-bundle dependencies (deprecated, the pre-bundle process runs automatically and does not need to be called)").option("--force", `[boolean] force the optimizer to ignore the cache and re-bundle`).action(async (root, options) => {
|
651
658
|
filterDuplicateOptions(options);
|
652
|
-
const {
|
659
|
+
const { resolveConfig } = await import("./chunks/dep-6-jTB_1O.js");
|
660
|
+
const { optimizeDeps } = await import("./chunks/dep-03SfmTdk.js");
|
653
661
|
try {
|
654
662
|
const config = await resolveConfig({
|
655
663
|
root,
|
@@ -667,7 +675,7 @@ cli.command("optimize [root]", "pre-bundle dependencies (deprecated, the pre-bun
|
|
667
675
|
});
|
668
676
|
cli.command("preview [root]", "locally preview production build").option("--host [host]", `[string] specify hostname`, { type: [convertHost] }).option("--port <port>", `[number] specify port`).option("--strictPort", `[boolean] exit if specified port is already in use`).option("--open [path]", `[boolean | string] open browser on startup`).option("--outDir <dir>", `[string] output directory (default: dist)`).action(async (root, options) => {
|
669
677
|
filterDuplicateOptions(options);
|
670
|
-
const { preview } = await import("./chunks/dep-
|
678
|
+
const { preview } = await import("./chunks/dep-SeJl6gzM.js");
|
671
679
|
try {
|
672
680
|
const server = await preview({
|
673
681
|
root,
|
package/dist/node/constants.js
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
import { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_INLINE_LIMIT, DEFAULT_ASSETS_RE, DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_PREVIEW_PORT, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, DEP_VERSION_RE, DEV_PROD_CONDITION, ENV_ENTRY, ENV_PUBLIC_PATH, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, METADATA_FILENAME, OPTIMIZABLE_ENTRY_RE, ROLLUP_HOOKS, SPECIAL_QUERY_RE, VERSION, VITE_PACKAGE_DIR, defaultAllowedOrigins, loopbackHosts, wildcardHosts } from "./chunks/dep-BDCsDwBr.js";
|
1
|
+
import { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_INLINE_LIMIT, DEFAULT_ASSETS_RE, DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_PREVIEW_PORT, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, DEP_VERSION_RE, DEV_PROD_CONDITION, ENV_ENTRY, ENV_PUBLIC_PATH, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, METADATA_FILENAME, OPTIMIZABLE_ENTRY_RE, ROLLUP_HOOKS, SPECIAL_QUERY_RE, VERSION, VITE_PACKAGE_DIR, defaultAllowedOrigins, loopbackHosts, wildcardHosts } from "./chunks/dep-CcFMbzqu.js";
|
3
2
|
|
4
3
|
export { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_INLINE_LIMIT, DEFAULT_ASSETS_RE, DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_PREVIEW_PORT, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, DEP_VERSION_RE, DEV_PROD_CONDITION, ENV_ENTRY, ENV_PUBLIC_PATH, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, METADATA_FILENAME, OPTIMIZABLE_ENTRY_RE, ROLLUP_HOOKS, SPECIAL_QUERY_RE, VERSION, VITE_PACKAGE_DIR, defaultAllowedOrigins, loopbackHosts, wildcardHosts };
|
package/dist/node/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import { BuildEnvironment, DevEnvironment, build, buildErrorMessage, createBuilder, createFilter, createIdResolver,
|
3
|
-
import { DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, VERSION, defaultAllowedOrigins } from "./chunks/dep-
|
1
|
+
import { createLogger } from "./chunks/dep-D5MCzjWT.js";
|
2
|
+
import { BuildEnvironment, DevEnvironment, build, buildErrorMessage, createBuilder, createFilter, createIdResolver, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defineConfig, fetchModule, formatPostcssSourceMap, isCSSRequest, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, normalizePath, optimizeDeps, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, ssrTransform, transformWithEsbuild } from "./chunks/dep-Bj7gA1-0.js";
|
3
|
+
import { DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, VERSION, defaultAllowedOrigins } from "./chunks/dep-CcFMbzqu.js";
|
4
4
|
import { parseAst, parseAstAsync } from "rollup/parseAst";
|
5
5
|
import { version as esbuildVersion } from "esbuild";
|
6
6
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vite",
|
3
|
-
"version": "7.1.
|
3
|
+
"version": "7.1.3",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": "Evan You",
|
@@ -69,7 +69,7 @@
|
|
69
69
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
70
70
|
"dependencies": {
|
71
71
|
"esbuild": "^0.25.0",
|
72
|
-
"fdir": "^6.
|
72
|
+
"fdir": "^6.5.0",
|
73
73
|
"picomatch": "^4.0.3",
|
74
74
|
"postcss": "^8.5.6",
|
75
75
|
"rollup": "^4.43.0",
|
@@ -79,10 +79,10 @@
|
|
79
79
|
"fsevents": "~2.3.3"
|
80
80
|
},
|
81
81
|
"devDependencies": {
|
82
|
-
"@babel/parser": "^7.28.
|
83
|
-
"@jridgewell/remapping": "^2.3.
|
84
|
-
"@jridgewell/trace-mapping": "^0.3.
|
85
|
-
"@oxc-project/types": "0.
|
82
|
+
"@babel/parser": "^7.28.3",
|
83
|
+
"@jridgewell/remapping": "^2.3.5",
|
84
|
+
"@jridgewell/trace-mapping": "^0.3.30",
|
85
|
+
"@oxc-project/types": "0.81.0",
|
86
86
|
"@polka/compression": "^1.0.0-next.25",
|
87
87
|
"@rolldown/pluginutils": "^1.0.0-beta.32",
|
88
88
|
"@rollup/plugin-alias": "^5.1.1",
|
@@ -125,7 +125,7 @@
|
|
125
125
|
"postcss-modules": "^6.0.1",
|
126
126
|
"premove": "^4.0.0",
|
127
127
|
"resolve.exports": "^2.0.3",
|
128
|
-
"rolldown": "^1.0.0-beta.
|
128
|
+
"rolldown": "^1.0.0-beta.32",
|
129
129
|
"rolldown-plugin-dts": "^0.15.6",
|
130
130
|
"rollup-plugin-license": "^3.6.0",
|
131
131
|
"sass": "^1.90.0",
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import { createRequire as ___createRequire } from 'module'; const require = ___createRequire(import.meta.url);
|
2
|
-
import { _createServer, createServer, createServerCloseFn, resolveServerOptions, restartServerWithUrls, serverConfigDefaults } from "./dep-CMEinpL-.js";
|
3
|
-
import "./dep-BDCsDwBr.js";
|
4
|
-
|
5
|
-
export { createServer };
|