vite 6.0.0-beta.3 → 6.0.0-beta.5
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 +52 -736
- package/bin/vite.js +1 -0
- package/dist/client/client.mjs +1 -1
- package/dist/node/chunks/{dep-ChZnDG_O.js → dep-BW_D9zgJ.js} +15731 -16256
- package/dist/node/chunks/{dep-D-7KCb9p.js → dep-CdoEeCn3.js} +704 -439
- package/dist/node/chunks/{dep-CBTZ9M2V.js → dep-DUrICmHV.js} +4 -8
- package/dist/node/chunks/{dep-DHwgfHPT.js → dep-jvFrlYpX.js} +9 -13
- package/dist/node/chunks/{dep-wWOLM6NS.js → dep-mtw2NpNs.js} +0 -4
- package/dist/node/cli.js +19 -33
- package/dist/node/index.d.ts +54 -14
- package/dist/node/index.js +5 -4
- package/dist/node/module-runner.js +1 -1
- package/dist/node-cjs/publicUtils.cjs +147 -145
- package/package.json +16 -16
- package/types/cssPreprocessorOptions.d.ts +43 -0
@@ -8,9 +8,9 @@ var node_child_process = require('node:child_process');
|
|
8
8
|
var node_module = require('node:module');
|
9
9
|
var require$$0 = require('tty');
|
10
10
|
var require$$1 = require('util');
|
11
|
-
var require$$
|
12
|
-
var require$$0$
|
13
|
-
var
|
11
|
+
var require$$1$1 = require('path');
|
12
|
+
var require$$0$1 = require('crypto');
|
13
|
+
var require$$1$2 = require('fs');
|
14
14
|
var readline = require('node:readline');
|
15
15
|
var require$$2 = require('os');
|
16
16
|
|
@@ -126,10 +126,6 @@ function getDefaultExportFromCjs (x) {
|
|
126
126
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
127
127
|
}
|
128
128
|
|
129
|
-
function commonjsRequire(path) {
|
130
|
-
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
131
|
-
}
|
132
|
-
|
133
129
|
var picocolors = {exports: {}};
|
134
130
|
|
135
131
|
var hasRequiredPicocolors;
|
@@ -137,29 +133,19 @@ var hasRequiredPicocolors;
|
|
137
133
|
function requirePicocolors () {
|
138
134
|
if (hasRequiredPicocolors) return picocolors.exports;
|
139
135
|
hasRequiredPicocolors = 1;
|
140
|
-
let argv =
|
141
|
-
env = process.env;
|
136
|
+
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
142
137
|
let isColorSupported =
|
143
|
-
!(
|
144
|
-
(
|
145
|
-
|
146
|
-
|
147
|
-
(commonjsRequire != null && require$$0.isatty(1) && env.TERM !== "dumb") ||
|
148
|
-
"CI" in env);
|
149
|
-
|
150
|
-
let formatter =
|
151
|
-
(open, close, replace = open) =>
|
138
|
+
!(!!env.NO_COLOR || argv.includes("--no-color")) &&
|
139
|
+
(!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env.TERM !== "dumb") || !!env.CI);
|
140
|
+
|
141
|
+
let formatter = (open, close, replace = open) =>
|
152
142
|
input => {
|
153
|
-
let string = "" + input;
|
154
|
-
|
155
|
-
return ~index
|
156
|
-
? open + replaceClose(string, close, replace, index) + close
|
157
|
-
: open + string + close
|
143
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
144
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close
|
158
145
|
};
|
159
146
|
|
160
147
|
let replaceClose = (string, close, replace, index) => {
|
161
|
-
let result = "";
|
162
|
-
let cursor = 0;
|
148
|
+
let result = "", cursor = 0;
|
163
149
|
do {
|
164
150
|
result += string.substring(cursor, index) + replace;
|
165
151
|
cursor = index + close.length;
|
@@ -169,54 +155,54 @@ function requirePicocolors () {
|
|
169
155
|
};
|
170
156
|
|
171
157
|
let createColors = (enabled = isColorSupported) => {
|
172
|
-
let
|
158
|
+
let f = enabled ? formatter : () => String;
|
173
159
|
return {
|
174
160
|
isColorSupported: enabled,
|
175
|
-
reset:
|
176
|
-
bold:
|
177
|
-
dim:
|
178
|
-
italic:
|
179
|
-
underline:
|
180
|
-
inverse:
|
181
|
-
hidden:
|
182
|
-
strikethrough:
|
183
|
-
|
184
|
-
black:
|
185
|
-
red:
|
186
|
-
green:
|
187
|
-
yellow:
|
188
|
-
blue:
|
189
|
-
magenta:
|
190
|
-
cyan:
|
191
|
-
white:
|
192
|
-
gray:
|
193
|
-
|
194
|
-
bgBlack:
|
195
|
-
bgRed:
|
196
|
-
bgGreen:
|
197
|
-
bgYellow:
|
198
|
-
bgBlue:
|
199
|
-
bgMagenta:
|
200
|
-
bgCyan:
|
201
|
-
bgWhite:
|
202
|
-
|
203
|
-
blackBright:
|
204
|
-
redBright:
|
205
|
-
greenBright:
|
206
|
-
yellowBright:
|
207
|
-
blueBright:
|
208
|
-
magentaBright:
|
209
|
-
cyanBright:
|
210
|
-
whiteBright:
|
211
|
-
|
212
|
-
bgBlackBright:
|
213
|
-
bgRedBright:
|
214
|
-
bgGreenBright:
|
215
|
-
bgYellowBright:
|
216
|
-
bgBlueBright:
|
217
|
-
bgMagentaBright:
|
218
|
-
bgCyanBright:
|
219
|
-
bgWhiteBright:
|
161
|
+
reset: f("\x1b[0m", "\x1b[0m"),
|
162
|
+
bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"),
|
163
|
+
dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"),
|
164
|
+
italic: f("\x1b[3m", "\x1b[23m"),
|
165
|
+
underline: f("\x1b[4m", "\x1b[24m"),
|
166
|
+
inverse: f("\x1b[7m", "\x1b[27m"),
|
167
|
+
hidden: f("\x1b[8m", "\x1b[28m"),
|
168
|
+
strikethrough: f("\x1b[9m", "\x1b[29m"),
|
169
|
+
|
170
|
+
black: f("\x1b[30m", "\x1b[39m"),
|
171
|
+
red: f("\x1b[31m", "\x1b[39m"),
|
172
|
+
green: f("\x1b[32m", "\x1b[39m"),
|
173
|
+
yellow: f("\x1b[33m", "\x1b[39m"),
|
174
|
+
blue: f("\x1b[34m", "\x1b[39m"),
|
175
|
+
magenta: f("\x1b[35m", "\x1b[39m"),
|
176
|
+
cyan: f("\x1b[36m", "\x1b[39m"),
|
177
|
+
white: f("\x1b[37m", "\x1b[39m"),
|
178
|
+
gray: f("\x1b[90m", "\x1b[39m"),
|
179
|
+
|
180
|
+
bgBlack: f("\x1b[40m", "\x1b[49m"),
|
181
|
+
bgRed: f("\x1b[41m", "\x1b[49m"),
|
182
|
+
bgGreen: f("\x1b[42m", "\x1b[49m"),
|
183
|
+
bgYellow: f("\x1b[43m", "\x1b[49m"),
|
184
|
+
bgBlue: f("\x1b[44m", "\x1b[49m"),
|
185
|
+
bgMagenta: f("\x1b[45m", "\x1b[49m"),
|
186
|
+
bgCyan: f("\x1b[46m", "\x1b[49m"),
|
187
|
+
bgWhite: f("\x1b[47m", "\x1b[49m"),
|
188
|
+
|
189
|
+
blackBright: f("\x1b[90m", "\x1b[39m"),
|
190
|
+
redBright: f("\x1b[91m", "\x1b[39m"),
|
191
|
+
greenBright: f("\x1b[92m", "\x1b[39m"),
|
192
|
+
yellowBright: f("\x1b[93m", "\x1b[39m"),
|
193
|
+
blueBright: f("\x1b[94m", "\x1b[39m"),
|
194
|
+
magentaBright: f("\x1b[95m", "\x1b[39m"),
|
195
|
+
cyanBright: f("\x1b[96m", "\x1b[39m"),
|
196
|
+
whiteBright: f("\x1b[97m", "\x1b[39m"),
|
197
|
+
|
198
|
+
bgBlackBright: f("\x1b[100m", "\x1b[49m"),
|
199
|
+
bgRedBright: f("\x1b[101m", "\x1b[49m"),
|
200
|
+
bgGreenBright: f("\x1b[102m", "\x1b[49m"),
|
201
|
+
bgYellowBright: f("\x1b[103m", "\x1b[49m"),
|
202
|
+
bgBlueBright: f("\x1b[104m", "\x1b[49m"),
|
203
|
+
bgMagentaBright: f("\x1b[105m", "\x1b[49m"),
|
204
|
+
bgCyanBright: f("\x1b[106m", "\x1b[49m"),
|
205
|
+
bgWhiteBright: f("\x1b[107m", "\x1b[49m"),
|
220
206
|
}
|
221
207
|
};
|
222
208
|
|
@@ -1271,7 +1257,6 @@ function requireConstants () {
|
|
1271
1257
|
if (hasRequiredConstants) return constants;
|
1272
1258
|
hasRequiredConstants = 1;
|
1273
1259
|
|
1274
|
-
const path = require$$0$1;
|
1275
1260
|
const WIN_SLASH = '\\\\/';
|
1276
1261
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
1277
1262
|
|
@@ -1294,6 +1279,7 @@ function requireConstants () {
|
|
1294
1279
|
const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
|
1295
1280
|
const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
|
1296
1281
|
const STAR = `${QMARK}*?`;
|
1282
|
+
const SEP = '/';
|
1297
1283
|
|
1298
1284
|
const POSIX_CHARS = {
|
1299
1285
|
DOT_LITERAL,
|
@@ -1310,7 +1296,8 @@ function requireConstants () {
|
|
1310
1296
|
NO_DOTS_SLASH,
|
1311
1297
|
QMARK_NO_DOT,
|
1312
1298
|
STAR,
|
1313
|
-
START_ANCHOR
|
1299
|
+
START_ANCHOR,
|
1300
|
+
SEP
|
1314
1301
|
};
|
1315
1302
|
|
1316
1303
|
/**
|
@@ -1330,7 +1317,8 @@ function requireConstants () {
|
|
1330
1317
|
NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
|
1331
1318
|
QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
|
1332
1319
|
START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
|
1333
|
-
END_ANCHOR: `(?:[${WIN_SLASH}]|$)
|
1320
|
+
END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
|
1321
|
+
SEP: '\\'
|
1334
1322
|
};
|
1335
1323
|
|
1336
1324
|
/**
|
@@ -1424,8 +1412,6 @@ function requireConstants () {
|
|
1424
1412
|
CHAR_VERTICAL_LINE: 124, /* | */
|
1425
1413
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
|
1426
1414
|
|
1427
|
-
SEP: path.sep,
|
1428
|
-
|
1429
1415
|
/**
|
1430
1416
|
* Create EXTGLOB_CHARS
|
1431
1417
|
*/
|
@@ -1451,6 +1437,8 @@ function requireConstants () {
|
|
1451
1437
|
return constants;
|
1452
1438
|
}
|
1453
1439
|
|
1440
|
+
/*global navigator*/
|
1441
|
+
|
1454
1442
|
var hasRequiredUtils;
|
1455
1443
|
|
1456
1444
|
function requireUtils () {
|
@@ -1458,8 +1446,6 @@ function requireUtils () {
|
|
1458
1446
|
hasRequiredUtils = 1;
|
1459
1447
|
(function (exports) {
|
1460
1448
|
|
1461
|
-
const path = require$$0$1;
|
1462
|
-
const win32 = process.platform === 'win32';
|
1463
1449
|
const {
|
1464
1450
|
REGEX_BACKSLASH,
|
1465
1451
|
REGEX_REMOVE_BACKSLASH,
|
@@ -1473,25 +1459,23 @@ function requireUtils () {
|
|
1473
1459
|
exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
|
1474
1460
|
exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
|
1475
1461
|
|
1476
|
-
exports.
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1462
|
+
exports.isWindows = () => {
|
1463
|
+
if (typeof navigator !== 'undefined' && navigator.platform) {
|
1464
|
+
const platform = navigator.platform.toLowerCase();
|
1465
|
+
return platform === 'win32' || platform === 'windows';
|
1466
|
+
}
|
1481
1467
|
|
1482
|
-
|
1483
|
-
|
1484
|
-
if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
|
1485
|
-
return true;
|
1468
|
+
if (typeof process !== 'undefined' && process.platform) {
|
1469
|
+
return process.platform === 'win32';
|
1486
1470
|
}
|
1471
|
+
|
1487
1472
|
return false;
|
1488
1473
|
};
|
1489
1474
|
|
1490
|
-
exports.
|
1491
|
-
|
1492
|
-
return
|
1493
|
-
}
|
1494
|
-
return win32 === true || path.sep === '\\';
|
1475
|
+
exports.removeBackslashes = str => {
|
1476
|
+
return str.replace(REGEX_REMOVE_BACKSLASH, match => {
|
1477
|
+
return match === '\\' ? '' : match;
|
1478
|
+
});
|
1495
1479
|
};
|
1496
1480
|
|
1497
1481
|
exports.escapeLast = (input, char, lastIdx) => {
|
@@ -1519,6 +1503,17 @@ function requireUtils () {
|
|
1519
1503
|
output = `(?:^(?!${output}).*$)`;
|
1520
1504
|
}
|
1521
1505
|
return output;
|
1506
|
+
};
|
1507
|
+
|
1508
|
+
exports.basename = (path, { windows } = {}) => {
|
1509
|
+
const segs = path.split(windows ? /[\\/]/ : '/');
|
1510
|
+
const last = segs[segs.length - 1];
|
1511
|
+
|
1512
|
+
if (last === '') {
|
1513
|
+
return segs[segs.length - 2];
|
1514
|
+
}
|
1515
|
+
|
1516
|
+
return last;
|
1522
1517
|
};
|
1523
1518
|
} (utils));
|
1524
1519
|
return utils;
|
@@ -1994,10 +1989,9 @@ function requireParse () {
|
|
1994
1989
|
const tokens = [bos];
|
1995
1990
|
|
1996
1991
|
const capture = opts.capture ? '' : '?:';
|
1997
|
-
const win32 = utils.isWindows(options);
|
1998
1992
|
|
1999
1993
|
// create constants based on platform, for windows or posix
|
2000
|
-
const PLATFORM_CHARS = constants.globChars(
|
1994
|
+
const PLATFORM_CHARS = constants.globChars(opts.windows);
|
2001
1995
|
const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
|
2002
1996
|
|
2003
1997
|
const {
|
@@ -2133,8 +2127,8 @@ function requireParse () {
|
|
2133
2127
|
|
2134
2128
|
if (tok.value || tok.output) append(tok);
|
2135
2129
|
if (prev && prev.type === 'text' && tok.type === 'text') {
|
2130
|
+
prev.output = (prev.output || prev.value) + tok.value;
|
2136
2131
|
prev.value += tok.value;
|
2137
|
-
prev.output = (prev.output || '') + tok.value;
|
2138
2132
|
return;
|
2139
2133
|
}
|
2140
2134
|
|
@@ -2622,10 +2616,6 @@ function requireParse () {
|
|
2622
2616
|
const next = peek();
|
2623
2617
|
let output = value;
|
2624
2618
|
|
2625
|
-
if (next === '<' && !utils.supportsLookbehinds()) {
|
2626
|
-
throw new Error('Node.js v10 or higher is required for regex lookbehinds');
|
2627
|
-
}
|
2628
|
-
|
2629
2619
|
if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) {
|
2630
2620
|
output = `\\${value}`;
|
2631
2621
|
}
|
@@ -2933,7 +2923,6 @@ function requireParse () {
|
|
2933
2923
|
}
|
2934
2924
|
|
2935
2925
|
input = REPLACEMENTS[input] || input;
|
2936
|
-
const win32 = utils.isWindows(options);
|
2937
2926
|
|
2938
2927
|
// create constants based on platform, for windows or posix
|
2939
2928
|
const {
|
@@ -2946,7 +2935,7 @@ function requireParse () {
|
|
2946
2935
|
NO_DOTS_SLASH,
|
2947
2936
|
STAR,
|
2948
2937
|
START_ANCHOR
|
2949
|
-
} = constants.globChars(
|
2938
|
+
} = constants.globChars(opts.windows);
|
2950
2939
|
|
2951
2940
|
const nodot = opts.dot ? NO_DOTS : NO_DOT;
|
2952
2941
|
const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
|
@@ -3015,14 +3004,13 @@ function requireParse () {
|
|
3015
3004
|
return parse_1;
|
3016
3005
|
}
|
3017
3006
|
|
3018
|
-
var picomatch_1;
|
3007
|
+
var picomatch_1$1;
|
3019
3008
|
var hasRequiredPicomatch$1;
|
3020
3009
|
|
3021
3010
|
function requirePicomatch$1 () {
|
3022
|
-
if (hasRequiredPicomatch$1) return picomatch_1;
|
3011
|
+
if (hasRequiredPicomatch$1) return picomatch_1$1;
|
3023
3012
|
hasRequiredPicomatch$1 = 1;
|
3024
3013
|
|
3025
|
-
const path = require$$0$1;
|
3026
3014
|
const scan = requireScan();
|
3027
3015
|
const parse = requireParse();
|
3028
3016
|
const utils = requireUtils();
|
@@ -3071,7 +3059,7 @@ function requirePicomatch$1 () {
|
|
3071
3059
|
}
|
3072
3060
|
|
3073
3061
|
const opts = options || {};
|
3074
|
-
const posix =
|
3062
|
+
const posix = opts.windows;
|
3075
3063
|
const regex = isState
|
3076
3064
|
? picomatch.compileRe(glob, options)
|
3077
3065
|
: picomatch.makeRe(glob, options, false, true);
|
@@ -3180,9 +3168,9 @@ function requirePicomatch$1 () {
|
|
3180
3168
|
* @api public
|
3181
3169
|
*/
|
3182
3170
|
|
3183
|
-
picomatch.matchBase = (input, glob, options
|
3171
|
+
picomatch.matchBase = (input, glob, options) => {
|
3184
3172
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
3185
|
-
return regex.test(
|
3173
|
+
return regex.test(utils.basename(input));
|
3186
3174
|
};
|
3187
3175
|
|
3188
3176
|
/**
|
@@ -3361,22 +3349,36 @@ function requirePicomatch$1 () {
|
|
3361
3349
|
* Expose "picomatch"
|
3362
3350
|
*/
|
3363
3351
|
|
3364
|
-
picomatch_1 = picomatch;
|
3365
|
-
return picomatch_1;
|
3352
|
+
picomatch_1$1 = picomatch;
|
3353
|
+
return picomatch_1$1;
|
3366
3354
|
}
|
3367
3355
|
|
3368
|
-
var
|
3356
|
+
var picomatch_1;
|
3369
3357
|
var hasRequiredPicomatch;
|
3370
3358
|
|
3371
3359
|
function requirePicomatch () {
|
3372
|
-
if (hasRequiredPicomatch) return
|
3360
|
+
if (hasRequiredPicomatch) return picomatch_1;
|
3373
3361
|
hasRequiredPicomatch = 1;
|
3374
3362
|
|
3375
|
-
|
3376
|
-
|
3363
|
+
const pico = requirePicomatch$1();
|
3364
|
+
const utils = requireUtils();
|
3365
|
+
|
3366
|
+
function picomatch(glob, options, returnState = false) {
|
3367
|
+
// default to os.platform()
|
3368
|
+
if (options && (options.windows === null || options.windows === undefined)) {
|
3369
|
+
// don't mutate the original options object
|
3370
|
+
options = { ...options, windows: utils.isWindows() };
|
3371
|
+
}
|
3372
|
+
|
3373
|
+
return pico(glob, options, returnState);
|
3374
|
+
}
|
3375
|
+
|
3376
|
+
Object.assign(picomatch, pico);
|
3377
|
+
picomatch_1 = picomatch;
|
3378
|
+
return picomatch_1;
|
3377
3379
|
}
|
3378
3380
|
|
3379
|
-
var picomatchExports = requirePicomatch();
|
3381
|
+
var picomatchExports = /*@__PURE__*/ requirePicomatch();
|
3380
3382
|
var pm = /*@__PURE__*/getDefaultExportFromCjs(picomatchExports);
|
3381
3383
|
|
3382
3384
|
// Helper since Typescript can't detect readonly arrays with Array.isArray
|
@@ -3391,24 +3393,24 @@ function ensureArray(thing) {
|
|
3391
3393
|
return [thing];
|
3392
3394
|
}
|
3393
3395
|
|
3394
|
-
const normalizePathRegExp = new RegExp(`\\${require$$
|
3396
|
+
const normalizePathRegExp = new RegExp(`\\${require$$1$1.win32.sep}`, 'g');
|
3395
3397
|
const normalizePath$1 = function normalizePath(filename) {
|
3396
|
-
return filename.replace(normalizePathRegExp, require$$
|
3398
|
+
return filename.replace(normalizePathRegExp, require$$1$1.posix.sep);
|
3397
3399
|
};
|
3398
3400
|
|
3399
3401
|
function getMatcherString(id, resolutionBase) {
|
3400
|
-
if (resolutionBase === false || require$$
|
3402
|
+
if (resolutionBase === false || require$$1$1.isAbsolute(id) || id.startsWith('**')) {
|
3401
3403
|
return normalizePath$1(id);
|
3402
3404
|
}
|
3403
3405
|
// resolve('') is valid and will default to process.cwd()
|
3404
|
-
const basePath = normalizePath$1(require$$
|
3406
|
+
const basePath = normalizePath$1(require$$1$1.resolve(resolutionBase || ''))
|
3405
3407
|
// escape all possible (posix + win) path characters that might interfere with regex
|
3406
3408
|
.replace(/[-^$*+?.()|[\]{}]/g, '\\$&');
|
3407
3409
|
// Note that we use posix.join because:
|
3408
3410
|
// 1. the basePath has been normalized to use /
|
3409
3411
|
// 2. the incoming glob (id) matcher, also uses /
|
3410
3412
|
// otherwise Node will force backslash (\) on windows
|
3411
|
-
return require$$
|
3413
|
+
return require$$1$1.posix.join(basePath, normalizePath$1(id));
|
3412
3414
|
}
|
3413
3415
|
const createFilter$1 = function createFilter(include, exclude, options) {
|
3414
3416
|
const resolutionBase = options && options.resolve;
|
@@ -4163,8 +4165,8 @@ function requireEtag () {
|
|
4163
4165
|
* @private
|
4164
4166
|
*/
|
4165
4167
|
|
4166
|
-
var crypto = require$$0$
|
4167
|
-
var Stats =
|
4168
|
+
var crypto = require$$0$1;
|
4169
|
+
var Stats = require$$1$2.Stats;
|
4168
4170
|
|
4169
4171
|
/**
|
4170
4172
|
* Module variables.
|
@@ -4642,27 +4644,6 @@ class Mappings {
|
|
4642
4644
|
let charInHiresBoundary = false;
|
4643
4645
|
|
4644
4646
|
while (originalCharIndex < chunk.end) {
|
4645
|
-
if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
|
4646
|
-
const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
|
4647
|
-
|
4648
|
-
if (this.hires === 'boundary') {
|
4649
|
-
// in hires "boundary", group segments per word boundary than per char
|
4650
|
-
if (wordRegex.test(original[originalCharIndex])) {
|
4651
|
-
// for first char in the boundary found, start the boundary by pushing a segment
|
4652
|
-
if (!charInHiresBoundary) {
|
4653
|
-
this.rawSegments.push(segment);
|
4654
|
-
charInHiresBoundary = true;
|
4655
|
-
}
|
4656
|
-
} else {
|
4657
|
-
// for non-word char, end the boundary by pushing a segment
|
4658
|
-
this.rawSegments.push(segment);
|
4659
|
-
charInHiresBoundary = false;
|
4660
|
-
}
|
4661
|
-
} else {
|
4662
|
-
this.rawSegments.push(segment);
|
4663
|
-
}
|
4664
|
-
}
|
4665
|
-
|
4666
4647
|
if (original[originalCharIndex] === '\n') {
|
4667
4648
|
loc.line += 1;
|
4668
4649
|
loc.column = 0;
|
@@ -4671,6 +4652,27 @@ class Mappings {
|
|
4671
4652
|
this.generatedCodeColumn = 0;
|
4672
4653
|
first = true;
|
4673
4654
|
} else {
|
4655
|
+
if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
|
4656
|
+
const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
|
4657
|
+
|
4658
|
+
if (this.hires === 'boundary') {
|
4659
|
+
// in hires "boundary", group segments per word boundary than per char
|
4660
|
+
if (wordRegex.test(original[originalCharIndex])) {
|
4661
|
+
// for first char in the boundary found, start the boundary by pushing a segment
|
4662
|
+
if (!charInHiresBoundary) {
|
4663
|
+
this.rawSegments.push(segment);
|
4664
|
+
charInHiresBoundary = true;
|
4665
|
+
}
|
4666
|
+
} else {
|
4667
|
+
// for non-word char, end the boundary by pushing a segment
|
4668
|
+
this.rawSegments.push(segment);
|
4669
|
+
charInHiresBoundary = false;
|
4670
|
+
}
|
4671
|
+
} else {
|
4672
|
+
this.rawSegments.push(segment);
|
4673
|
+
}
|
4674
|
+
}
|
4675
|
+
|
4674
4676
|
loc.column += 1;
|
4675
4677
|
this.generatedCodeColumn += 1;
|
4676
4678
|
first = false;
|
@@ -5881,10 +5883,10 @@ var hasRequiredMain$1;
|
|
5881
5883
|
function requireMain$1 () {
|
5882
5884
|
if (hasRequiredMain$1) return main$2.exports;
|
5883
5885
|
hasRequiredMain$1 = 1;
|
5884
|
-
const fs =
|
5885
|
-
const path = require$$
|
5886
|
+
const fs = require$$1$2;
|
5887
|
+
const path = require$$1$1;
|
5886
5888
|
const os = require$$2;
|
5887
|
-
const crypto = require$$0$
|
5889
|
+
const crypto = require$$0$1;
|
5888
5890
|
const packageJson = require$$4;
|
5889
5891
|
|
5890
5892
|
const version = packageJson.version;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vite",
|
3
|
-
"version": "6.0.0-beta.
|
3
|
+
"version": "6.0.0-beta.5",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": "Evan You",
|
@@ -74,19 +74,19 @@
|
|
74
74
|
"dependencies": {
|
75
75
|
"esbuild": "^0.24.0",
|
76
76
|
"postcss": "^8.4.47",
|
77
|
-
"rollup": "^4.
|
77
|
+
"rollup": "^4.23.0"
|
78
78
|
},
|
79
79
|
"optionalDependencies": {
|
80
80
|
"fsevents": "~2.3.3"
|
81
81
|
},
|
82
82
|
"devDependencies": {
|
83
83
|
"@ampproject/remapping": "^2.3.0",
|
84
|
-
"@babel/parser": "^7.25.
|
84
|
+
"@babel/parser": "^7.25.8",
|
85
85
|
"@jridgewell/trace-mapping": "^0.3.25",
|
86
86
|
"@polka/compression": "^1.0.0-next.25",
|
87
87
|
"@rollup/plugin-alias": "^5.1.1",
|
88
|
-
"@rollup/plugin-commonjs": "^28.0.
|
89
|
-
"@rollup/plugin-dynamic-import-vars": "^2.1.
|
88
|
+
"@rollup/plugin-commonjs": "^28.0.1",
|
89
|
+
"@rollup/plugin-dynamic-import-vars": "^2.1.4",
|
90
90
|
"@rollup/plugin-json": "^6.1.0",
|
91
91
|
"@rollup/plugin-node-resolve": "15.3.0",
|
92
92
|
"@rollup/pluginutils": "^5.1.2",
|
@@ -107,21 +107,20 @@
|
|
107
107
|
"escape-html": "^1.0.3",
|
108
108
|
"estree-walker": "^3.0.3",
|
109
109
|
"etag": "^1.8.1",
|
110
|
-
"fast-glob": "^3.3.2",
|
111
110
|
"http-proxy": "^1.18.1",
|
112
111
|
"launch-editor-middleware": "^2.9.1",
|
113
112
|
"lightningcss": "^1.27.0",
|
114
|
-
"magic-string": "^0.30.
|
113
|
+
"magic-string": "^0.30.12",
|
115
114
|
"micromatch": "^4.0.8",
|
116
115
|
"mlly": "^1.7.2",
|
117
116
|
"mrmime": "^2.0.0",
|
118
117
|
"nanoid": "^5.0.7",
|
119
|
-
"open": "^
|
120
|
-
"parse5": "^7.
|
118
|
+
"open": "^10.1.0",
|
119
|
+
"parse5": "^7.2.0",
|
121
120
|
"pathe": "^1.1.2",
|
122
121
|
"periscopic": "^4.0.2",
|
123
|
-
"picocolors": "^1.1.
|
124
|
-
"picomatch": "^
|
122
|
+
"picocolors": "^1.1.1",
|
123
|
+
"picomatch": "^4.0.2",
|
125
124
|
"postcss-import": "^16.1.0",
|
126
125
|
"postcss-load-config": "^4.0.2",
|
127
126
|
"postcss-modules": "^6.0.0",
|
@@ -129,14 +128,15 @@
|
|
129
128
|
"rollup-plugin-dts": "^6.1.1",
|
130
129
|
"rollup-plugin-esbuild": "^6.1.1",
|
131
130
|
"rollup-plugin-license": "^3.5.3",
|
132
|
-
"sass": "^1.
|
133
|
-
"sass-embedded": "^1.
|
134
|
-
"sirv": "^
|
131
|
+
"sass": "^1.80.3",
|
132
|
+
"sass-embedded": "^1.80.3",
|
133
|
+
"sirv": "^3.0.0",
|
135
134
|
"source-map-support": "^0.5.21",
|
136
135
|
"strip-ansi": "^7.1.0",
|
137
136
|
"strip-literal": "^2.1.0",
|
137
|
+
"tinyglobby": "^0.2.9",
|
138
138
|
"tsconfck": "^3.1.4",
|
139
|
-
"tslib": "^2.
|
139
|
+
"tslib": "^2.8.0",
|
140
140
|
"types": "link:./types",
|
141
141
|
"ufo": "^1.5.4",
|
142
142
|
"ws": "^8.18.0"
|
@@ -149,7 +149,7 @@
|
|
149
149
|
"sass-embedded": "*",
|
150
150
|
"stylus": "*",
|
151
151
|
"sugarss": "*",
|
152
|
-
"terser": "^5.
|
152
|
+
"terser": "^5.16.0"
|
153
153
|
},
|
154
154
|
"peerDependenciesMeta": {
|
155
155
|
"@types/node": {
|
@@ -0,0 +1,43 @@
|
|
1
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
2
|
+
|
3
|
+
// @ts-ignore `sass` may not be installed
|
4
|
+
import type Sass from 'sass'
|
5
|
+
// @ts-ignore `less` may not be installed
|
6
|
+
import type Less from 'less'
|
7
|
+
// @ts-ignore `less` may not be installed
|
8
|
+
import type Stylus from 'stylus'
|
9
|
+
|
10
|
+
/* eslint-enable @typescript-eslint/ban-ts-comment */
|
11
|
+
|
12
|
+
export type SassLegacyPreprocessBaseOptions = Omit<
|
13
|
+
Sass.LegacyStringOptions<'async'>,
|
14
|
+
| 'data'
|
15
|
+
| 'file'
|
16
|
+
| 'outFile'
|
17
|
+
| 'sourceMap'
|
18
|
+
| 'omitSourceMapUrl'
|
19
|
+
| 'sourceMapEmbed'
|
20
|
+
| 'sourceMapRoot'
|
21
|
+
>
|
22
|
+
|
23
|
+
export type SassModernPreprocessBaseOptions = Omit<
|
24
|
+
Sass.StringOptions<'async'>,
|
25
|
+
'url' | 'sourceMap'
|
26
|
+
>
|
27
|
+
|
28
|
+
export type LessPreprocessorBaseOptions = Omit<
|
29
|
+
Less.Options,
|
30
|
+
'sourceMap' | 'filename'
|
31
|
+
>
|
32
|
+
|
33
|
+
export type StylusPreprocessorBaseOptions = Omit<
|
34
|
+
Stylus.RenderOptions,
|
35
|
+
'filename'
|
36
|
+
> & { define?: Record<string, any> }
|
37
|
+
|
38
|
+
declare global {
|
39
|
+
// LESS' types somewhat references this which doesn't make sense in Node,
|
40
|
+
// so we have to shim it
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
42
|
+
interface HTMLLinkElement {}
|
43
|
+
}
|