vite 6.0.0-beta.4 → 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.
@@ -1,4 +1,4 @@
1
- import { M as commonjsGlobal, L as getDefaultExportFromCjs } from './dep-Cpgpmu8-.js';
1
+ import { M as commonjsGlobal, L as getDefaultExportFromCjs } from './dep-BW_D9zgJ.js';
2
2
  import require$$0$3 from 'fs';
3
3
  import require$$0$1 from 'postcss';
4
4
  import require$$0 from 'path';
@@ -1,4 +1,4 @@
1
- import { L as getDefaultExportFromCjs } from './dep-Cpgpmu8-.js';
1
+ import { L as getDefaultExportFromCjs } from './dep-BW_D9zgJ.js';
2
2
  import require$$0$1 from 'path';
3
3
  import require$$0 from 'fs';
4
4
  import { r as requireLib } from './dep-mtw2NpNs.js';
package/dist/node/cli.js CHANGED
@@ -2,7 +2,7 @@ import path from 'node:path';
2
2
  import fs__default from 'node:fs';
3
3
  import { performance } from 'node:perf_hooks';
4
4
  import { EventEmitter } from 'events';
5
- import { K as colors, E as createLogger, r as resolveConfig } from './chunks/dep-Cpgpmu8-.js';
5
+ import { K as colors, E as createLogger, r as resolveConfig } from './chunks/dep-BW_D9zgJ.js';
6
6
  import { VERSION } from './constants.js';
7
7
  import 'node:fs/promises';
8
8
  import 'node:url';
@@ -740,7 +740,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
740
740
  `[boolean] force the optimizer to ignore the cache and re-bundle`
741
741
  ).action(async (root, options) => {
742
742
  filterDuplicateOptions(options);
743
- const { createServer } = await import('./chunks/dep-Cpgpmu8-.js').then(function (n) { return n.O; });
743
+ const { createServer } = await import('./chunks/dep-BW_D9zgJ.js').then(function (n) { return n.O; });
744
744
  try {
745
745
  const server = await createServer({
746
746
  root,
@@ -833,7 +833,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
833
833
  ).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--app", `[boolean] same as \`builder: {}\``).action(
834
834
  async (root, options) => {
835
835
  filterDuplicateOptions(options);
836
- const { createBuilder } = await import('./chunks/dep-Cpgpmu8-.js').then(function (n) { return n.P; });
836
+ const { createBuilder } = await import('./chunks/dep-BW_D9zgJ.js').then(function (n) { return n.P; });
837
837
  const buildOptions = cleanGlobalCLIOptions(
838
838
  cleanBuilderCLIOptions(options)
839
839
  );
@@ -868,7 +868,7 @@ cli.command("optimize [root]", "pre-bundle dependencies").option(
868
868
  ).action(
869
869
  async (root, options) => {
870
870
  filterDuplicateOptions(options);
871
- const { optimizeDeps } = await import('./chunks/dep-Cpgpmu8-.js').then(function (n) { return n.N; });
871
+ const { optimizeDeps } = await import('./chunks/dep-BW_D9zgJ.js').then(function (n) { return n.N; });
872
872
  try {
873
873
  const config = await resolveConfig(
874
874
  {
@@ -894,7 +894,7 @@ ${e.stack}`),
894
894
  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(
895
895
  async (root, options) => {
896
896
  filterDuplicateOptions(options);
897
- const { preview } = await import('./chunks/dep-Cpgpmu8-.js').then(function (n) { return n.Q; });
897
+ const { preview } = await import('./chunks/dep-BW_D9zgJ.js').then(function (n) { return n.Q; });
898
898
  try {
899
899
  const server = await preview({
900
900
  root,
@@ -26,6 +26,7 @@ export { CustomEventMap, InferCustomEventPayload, InvalidatePayload } from '../.
26
26
  import { SecureContextOptions } from 'node:tls';
27
27
  import { ZlibOptions } from 'node:zlib';
28
28
  import * as PostCSS from 'postcss';
29
+ import { SassLegacyPreprocessBaseOptions, SassModernPreprocessBaseOptions, LessPreprocessorBaseOptions, StylusPreprocessorBaseOptions } from '../../types/cssPreprocessorOptions.js';
29
30
  export { GeneralImportGlobOptions, ImportGlobFunction, ImportGlobOptions, KnownAsTypeMap } from '../../types/importGlob.js';
30
31
  export { ChunkMetadata } from '../../types/metadata.js';
31
32
 
@@ -754,8 +755,8 @@ interface PreviewServer {
754
755
  */
755
756
  httpServer: HttpServer;
756
757
  /**
757
- * The resolved urls Vite prints on the CLI.
758
- * null before server is listening.
758
+ * The resolved urls Vite prints on the CLI (URL-encoded). Returns `null`
759
+ * if the server is not listening on any port.
759
760
  */
760
761
  resolvedUrls: ResolvedServerUrls | null;
761
762
  /**
@@ -2976,8 +2977,8 @@ interface ViteDevServer {
2976
2977
  */
2977
2978
  moduleGraph: ModuleGraph;
2978
2979
  /**
2979
- * The resolved urls Vite prints on the CLI. null in middleware mode or
2980
- * before `server.listen` is called.
2980
+ * The resolved urls Vite prints on the CLI (URL-encoded). Returns `null`
2981
+ * in middleware mode or if the server is not listening on any port.
2981
2982
  */
2982
2983
  resolvedUrls: ResolvedServerUrls | null;
2983
2984
  /**
@@ -3157,7 +3158,13 @@ interface CSSOptions {
3157
3158
  * In addition to options specific to each processors, Vite supports `additionalData` option.
3158
3159
  * The `additionalData` option can be used to inject extra code for each style content.
3159
3160
  */
3160
- preprocessorOptions?: Record<string, any>;
3161
+ preprocessorOptions?: {
3162
+ scss?: SassPreprocessorOptions;
3163
+ sass?: SassPreprocessorOptions;
3164
+ less?: LessPreprocessorOptions;
3165
+ styl?: StylusPreprocessorOptions;
3166
+ stylus?: StylusPreprocessorOptions;
3167
+ };
3161
3168
  /**
3162
3169
  * If this option is set, preprocessors will run in workers when possible.
3163
3170
  * `true` means the number of CPUs minus 1.
@@ -3208,6 +3215,24 @@ interface PreprocessCSSResult {
3208
3215
  */
3209
3216
  declare function preprocessCSS(code: string, filename: string, config: ResolvedConfig): Promise<PreprocessCSSResult>;
3210
3217
  declare function formatPostcssSourceMap(rawMap: ExistingRawSourceMap, file: string): Promise<ExistingRawSourceMap>;
3218
+ type PreprocessorAdditionalDataResult = string | {
3219
+ content: string;
3220
+ map?: ExistingRawSourceMap;
3221
+ };
3222
+ type PreprocessorAdditionalData = string | ((source: string, filename: string) => PreprocessorAdditionalDataResult | Promise<PreprocessorAdditionalDataResult>);
3223
+ type SassPreprocessorOptions = {
3224
+ additionalData?: PreprocessorAdditionalData;
3225
+ } & (({
3226
+ api?: 'legacy';
3227
+ } & SassLegacyPreprocessBaseOptions) | ({
3228
+ api: 'modern' | 'modern-compiler';
3229
+ } & SassModernPreprocessBaseOptions));
3230
+ type LessPreprocessorOptions = {
3231
+ additionalData?: PreprocessorAdditionalData;
3232
+ } & LessPreprocessorBaseOptions;
3233
+ type StylusPreprocessorOptions = {
3234
+ additionalData?: PreprocessorAdditionalData;
3235
+ } & StylusPreprocessorBaseOptions;
3211
3236
 
3212
3237
  interface HtmlTagDescriptor {
3213
3238
  tag: string;
@@ -3476,10 +3501,11 @@ interface JsonOptions {
3476
3501
  namedExports?: boolean;
3477
3502
  /**
3478
3503
  * Generate performant output as JSON.parse("stringified").
3479
- * Enabling this will disable namedExports.
3480
- * @default false
3504
+ *
3505
+ * When set to 'auto', the data will be stringified only if the data is bigger than 10kB.
3506
+ * @default 'auto'
3481
3507
  */
3482
- stringify?: boolean;
3508
+ stringify?: boolean | 'auto';
3483
3509
  }
3484
3510
 
3485
3511
  type SSRTarget = 'node' | 'webworker';
@@ -1,6 +1,6 @@
1
1
  export { parseAst, parseAstAsync } from 'rollup/parseAst';
2
- import { i as isInNodeModules, a as arraify } from './chunks/dep-Cpgpmu8-.js';
3
- export { B as BuildEnvironment, D as DevEnvironment, S as ServerHMRConnector, b as build, j as buildErrorMessage, e as createBuilder, z as createFilter, f as createIdResolver, E as createLogger, k as createRunnableDevEnvironment, c as createServer, u as createServerHotChannel, q as createServerModuleRunner, d as defineConfig, n as fetchModule, g as formatPostcssSourceMap, H as isFileLoadingAllowed, G as isFileServingAllowed, m as isRunnableDevEnvironment, l as loadConfigFromFile, I as loadEnv, y as mergeAlias, x as mergeConfig, v as moduleRunnerTransform, w as normalizePath, o as optimizeDeps, h as preprocessCSS, p as preview, r as resolveConfig, J as resolveEnvPrefix, A as rollupVersion, F as searchForWorkspaceRoot, C as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-Cpgpmu8-.js';
2
+ import { i as isInNodeModules, a as arraify } from './chunks/dep-BW_D9zgJ.js';
3
+ export { B as BuildEnvironment, D as DevEnvironment, S as ServerHMRConnector, b as build, j as buildErrorMessage, e as createBuilder, z as createFilter, f as createIdResolver, E as createLogger, k as createRunnableDevEnvironment, c as createServer, u as createServerHotChannel, q as createServerModuleRunner, d as defineConfig, n as fetchModule, g as formatPostcssSourceMap, H as isFileLoadingAllowed, G as isFileServingAllowed, m as isRunnableDevEnvironment, l as loadConfigFromFile, I as loadEnv, y as mergeAlias, x as mergeConfig, v as moduleRunnerTransform, w as normalizePath, o as optimizeDeps, h as preprocessCSS, p as preview, r as resolveConfig, J as resolveEnvPrefix, A as rollupVersion, F as searchForWorkspaceRoot, C as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-BW_D9zgJ.js';
4
4
  export { VERSION as version } from './constants.js';
5
5
  export { version as esbuildVersion } from 'esbuild';
6
6
  import 'node:fs';
@@ -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$$0$1 = require('path');
12
- var require$$0$2 = require('crypto');
13
- var require$$1$1 = require('fs');
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
 
@@ -1257,7 +1257,6 @@ function requireConstants () {
1257
1257
  if (hasRequiredConstants) return constants;
1258
1258
  hasRequiredConstants = 1;
1259
1259
 
1260
- const path = require$$0$1;
1261
1260
  const WIN_SLASH = '\\\\/';
1262
1261
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
1263
1262
 
@@ -1280,6 +1279,7 @@ function requireConstants () {
1280
1279
  const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
1281
1280
  const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
1282
1281
  const STAR = `${QMARK}*?`;
1282
+ const SEP = '/';
1283
1283
 
1284
1284
  const POSIX_CHARS = {
1285
1285
  DOT_LITERAL,
@@ -1296,7 +1296,8 @@ function requireConstants () {
1296
1296
  NO_DOTS_SLASH,
1297
1297
  QMARK_NO_DOT,
1298
1298
  STAR,
1299
- START_ANCHOR
1299
+ START_ANCHOR,
1300
+ SEP
1300
1301
  };
1301
1302
 
1302
1303
  /**
@@ -1316,7 +1317,8 @@ function requireConstants () {
1316
1317
  NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
1317
1318
  QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
1318
1319
  START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
1319
- END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
1320
+ END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
1321
+ SEP: '\\'
1320
1322
  };
1321
1323
 
1322
1324
  /**
@@ -1410,8 +1412,6 @@ function requireConstants () {
1410
1412
  CHAR_VERTICAL_LINE: 124, /* | */
1411
1413
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
1412
1414
 
1413
- SEP: path.sep,
1414
-
1415
1415
  /**
1416
1416
  * Create EXTGLOB_CHARS
1417
1417
  */
@@ -1437,6 +1437,8 @@ function requireConstants () {
1437
1437
  return constants;
1438
1438
  }
1439
1439
 
1440
+ /*global navigator*/
1441
+
1440
1442
  var hasRequiredUtils;
1441
1443
 
1442
1444
  function requireUtils () {
@@ -1444,8 +1446,6 @@ function requireUtils () {
1444
1446
  hasRequiredUtils = 1;
1445
1447
  (function (exports) {
1446
1448
 
1447
- const path = require$$0$1;
1448
- const win32 = process.platform === 'win32';
1449
1449
  const {
1450
1450
  REGEX_BACKSLASH,
1451
1451
  REGEX_REMOVE_BACKSLASH,
@@ -1459,25 +1459,23 @@ function requireUtils () {
1459
1459
  exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
1460
1460
  exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
1461
1461
 
1462
- exports.removeBackslashes = str => {
1463
- return str.replace(REGEX_REMOVE_BACKSLASH, match => {
1464
- return match === '\\' ? '' : match;
1465
- });
1466
- };
1462
+ exports.isWindows = () => {
1463
+ if (typeof navigator !== 'undefined' && navigator.platform) {
1464
+ const platform = navigator.platform.toLowerCase();
1465
+ return platform === 'win32' || platform === 'windows';
1466
+ }
1467
1467
 
1468
- exports.supportsLookbehinds = () => {
1469
- const segs = process.version.slice(1).split('.').map(Number);
1470
- if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
1471
- return true;
1468
+ if (typeof process !== 'undefined' && process.platform) {
1469
+ return process.platform === 'win32';
1472
1470
  }
1471
+
1473
1472
  return false;
1474
1473
  };
1475
1474
 
1476
- exports.isWindows = options => {
1477
- if (options && typeof options.windows === 'boolean') {
1478
- return options.windows;
1479
- }
1480
- return win32 === true || path.sep === '\\';
1475
+ exports.removeBackslashes = str => {
1476
+ return str.replace(REGEX_REMOVE_BACKSLASH, match => {
1477
+ return match === '\\' ? '' : match;
1478
+ });
1481
1479
  };
1482
1480
 
1483
1481
  exports.escapeLast = (input, char, lastIdx) => {
@@ -1505,6 +1503,17 @@ function requireUtils () {
1505
1503
  output = `(?:^(?!${output}).*$)`;
1506
1504
  }
1507
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;
1508
1517
  };
1509
1518
  } (utils));
1510
1519
  return utils;
@@ -1980,10 +1989,9 @@ function requireParse () {
1980
1989
  const tokens = [bos];
1981
1990
 
1982
1991
  const capture = opts.capture ? '' : '?:';
1983
- const win32 = utils.isWindows(options);
1984
1992
 
1985
1993
  // create constants based on platform, for windows or posix
1986
- const PLATFORM_CHARS = constants.globChars(win32);
1994
+ const PLATFORM_CHARS = constants.globChars(opts.windows);
1987
1995
  const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
1988
1996
 
1989
1997
  const {
@@ -2119,8 +2127,8 @@ function requireParse () {
2119
2127
 
2120
2128
  if (tok.value || tok.output) append(tok);
2121
2129
  if (prev && prev.type === 'text' && tok.type === 'text') {
2130
+ prev.output = (prev.output || prev.value) + tok.value;
2122
2131
  prev.value += tok.value;
2123
- prev.output = (prev.output || '') + tok.value;
2124
2132
  return;
2125
2133
  }
2126
2134
 
@@ -2608,10 +2616,6 @@ function requireParse () {
2608
2616
  const next = peek();
2609
2617
  let output = value;
2610
2618
 
2611
- if (next === '<' && !utils.supportsLookbehinds()) {
2612
- throw new Error('Node.js v10 or higher is required for regex lookbehinds');
2613
- }
2614
-
2615
2619
  if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) {
2616
2620
  output = `\\${value}`;
2617
2621
  }
@@ -2919,7 +2923,6 @@ function requireParse () {
2919
2923
  }
2920
2924
 
2921
2925
  input = REPLACEMENTS[input] || input;
2922
- const win32 = utils.isWindows(options);
2923
2926
 
2924
2927
  // create constants based on platform, for windows or posix
2925
2928
  const {
@@ -2932,7 +2935,7 @@ function requireParse () {
2932
2935
  NO_DOTS_SLASH,
2933
2936
  STAR,
2934
2937
  START_ANCHOR
2935
- } = constants.globChars(win32);
2938
+ } = constants.globChars(opts.windows);
2936
2939
 
2937
2940
  const nodot = opts.dot ? NO_DOTS : NO_DOT;
2938
2941
  const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
@@ -3001,14 +3004,13 @@ function requireParse () {
3001
3004
  return parse_1;
3002
3005
  }
3003
3006
 
3004
- var picomatch_1;
3007
+ var picomatch_1$1;
3005
3008
  var hasRequiredPicomatch$1;
3006
3009
 
3007
3010
  function requirePicomatch$1 () {
3008
- if (hasRequiredPicomatch$1) return picomatch_1;
3011
+ if (hasRequiredPicomatch$1) return picomatch_1$1;
3009
3012
  hasRequiredPicomatch$1 = 1;
3010
3013
 
3011
- const path = require$$0$1;
3012
3014
  const scan = requireScan();
3013
3015
  const parse = requireParse();
3014
3016
  const utils = requireUtils();
@@ -3057,7 +3059,7 @@ function requirePicomatch$1 () {
3057
3059
  }
3058
3060
 
3059
3061
  const opts = options || {};
3060
- const posix = utils.isWindows(options);
3062
+ const posix = opts.windows;
3061
3063
  const regex = isState
3062
3064
  ? picomatch.compileRe(glob, options)
3063
3065
  : picomatch.makeRe(glob, options, false, true);
@@ -3166,9 +3168,9 @@ function requirePicomatch$1 () {
3166
3168
  * @api public
3167
3169
  */
3168
3170
 
3169
- picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
3171
+ picomatch.matchBase = (input, glob, options) => {
3170
3172
  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
3171
- return regex.test(path.basename(input));
3173
+ return regex.test(utils.basename(input));
3172
3174
  };
3173
3175
 
3174
3176
  /**
@@ -3347,22 +3349,36 @@ function requirePicomatch$1 () {
3347
3349
  * Expose "picomatch"
3348
3350
  */
3349
3351
 
3350
- picomatch_1 = picomatch;
3351
- return picomatch_1;
3352
+ picomatch_1$1 = picomatch;
3353
+ return picomatch_1$1;
3352
3354
  }
3353
3355
 
3354
- var picomatch;
3356
+ var picomatch_1;
3355
3357
  var hasRequiredPicomatch;
3356
3358
 
3357
3359
  function requirePicomatch () {
3358
- if (hasRequiredPicomatch) return picomatch;
3360
+ if (hasRequiredPicomatch) return picomatch_1;
3359
3361
  hasRequiredPicomatch = 1;
3360
3362
 
3361
- picomatch = requirePicomatch$1();
3362
- return picomatch;
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;
3363
3379
  }
3364
3380
 
3365
- var picomatchExports = requirePicomatch();
3381
+ var picomatchExports = /*@__PURE__*/ requirePicomatch();
3366
3382
  var pm = /*@__PURE__*/getDefaultExportFromCjs(picomatchExports);
3367
3383
 
3368
3384
  // Helper since Typescript can't detect readonly arrays with Array.isArray
@@ -3377,24 +3393,24 @@ function ensureArray(thing) {
3377
3393
  return [thing];
3378
3394
  }
3379
3395
 
3380
- const normalizePathRegExp = new RegExp(`\\${require$$0$1.win32.sep}`, 'g');
3396
+ const normalizePathRegExp = new RegExp(`\\${require$$1$1.win32.sep}`, 'g');
3381
3397
  const normalizePath$1 = function normalizePath(filename) {
3382
- return filename.replace(normalizePathRegExp, require$$0$1.posix.sep);
3398
+ return filename.replace(normalizePathRegExp, require$$1$1.posix.sep);
3383
3399
  };
3384
3400
 
3385
3401
  function getMatcherString(id, resolutionBase) {
3386
- if (resolutionBase === false || require$$0$1.isAbsolute(id) || id.startsWith('**')) {
3402
+ if (resolutionBase === false || require$$1$1.isAbsolute(id) || id.startsWith('**')) {
3387
3403
  return normalizePath$1(id);
3388
3404
  }
3389
3405
  // resolve('') is valid and will default to process.cwd()
3390
- const basePath = normalizePath$1(require$$0$1.resolve(resolutionBase || ''))
3406
+ const basePath = normalizePath$1(require$$1$1.resolve(resolutionBase || ''))
3391
3407
  // escape all possible (posix + win) path characters that might interfere with regex
3392
3408
  .replace(/[-^$*+?.()|[\]{}]/g, '\\$&');
3393
3409
  // Note that we use posix.join because:
3394
3410
  // 1. the basePath has been normalized to use /
3395
3411
  // 2. the incoming glob (id) matcher, also uses /
3396
3412
  // otherwise Node will force backslash (\) on windows
3397
- return require$$0$1.posix.join(basePath, normalizePath$1(id));
3413
+ return require$$1$1.posix.join(basePath, normalizePath$1(id));
3398
3414
  }
3399
3415
  const createFilter$1 = function createFilter(include, exclude, options) {
3400
3416
  const resolutionBase = options && options.resolve;
@@ -4149,8 +4165,8 @@ function requireEtag () {
4149
4165
  * @private
4150
4166
  */
4151
4167
 
4152
- var crypto = require$$0$2;
4153
- var Stats = require$$1$1.Stats;
4168
+ var crypto = require$$0$1;
4169
+ var Stats = require$$1$2.Stats;
4154
4170
 
4155
4171
  /**
4156
4172
  * Module variables.
@@ -5867,10 +5883,10 @@ var hasRequiredMain$1;
5867
5883
  function requireMain$1 () {
5868
5884
  if (hasRequiredMain$1) return main$2.exports;
5869
5885
  hasRequiredMain$1 = 1;
5870
- const fs = require$$1$1;
5871
- const path = require$$0$1;
5886
+ const fs = require$$1$2;
5887
+ const path = require$$1$1;
5872
5888
  const os = require$$2;
5873
- const crypto = require$$0$2;
5889
+ const crypto = require$$0$1;
5874
5890
  const packageJson = require$$4;
5875
5891
 
5876
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.4",
3
+ "version": "6.0.0-beta.5",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -74,7 +74,7 @@
74
74
  "dependencies": {
75
75
  "esbuild": "^0.24.0",
76
76
  "postcss": "^8.4.47",
77
- "rollup": "^4.22.5"
77
+ "rollup": "^4.23.0"
78
78
  },
79
79
  "optionalDependencies": {
80
80
  "fsevents": "~2.3.3"
@@ -120,7 +120,7 @@
120
120
  "pathe": "^1.1.2",
121
121
  "periscopic": "^4.0.2",
122
122
  "picocolors": "^1.1.1",
123
- "picomatch": "^2.3.1",
123
+ "picomatch": "^4.0.2",
124
124
  "postcss-import": "^16.1.0",
125
125
  "postcss-load-config": "^4.0.2",
126
126
  "postcss-modules": "^6.0.0",
@@ -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
+ }