vite 5.4.7 → 5.4.9

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 CHANGED
@@ -3,7 +3,7 @@ Vite is released under the MIT license:
3
3
 
4
4
  MIT License
5
5
 
6
- Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
6
+ Copyright (c) 2019-present, VoidZero Inc. and Vite contributors
7
7
 
8
8
  Permission is hereby granted, free of charge, to any person obtaining a copy
9
9
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -11,10 +11,10 @@
11
11
 
12
12
  Vite (French word for "fast", pronounced `/vit/`) is a new breed of frontend build tool that significantly improves the frontend development experience. It consists of two major parts:
13
13
 
14
- - A dev server that serves your source files over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), with [rich built-in features](https://vitejs.dev/guide/features.html) and astonishingly fast [Hot Module Replacement (HMR)](https://vitejs.dev/guide/features.html#hot-module-replacement).
14
+ - A dev server that serves your source files over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), with [rich built-in features](https://vite.dev/guide/features.html) and astonishingly fast [Hot Module Replacement (HMR)](https://vite.dev/guide/features.html#hot-module-replacement).
15
15
 
16
- - A [build command](https://vitejs.dev/guide/build.html) that bundles your code with [Rollup](https://rollupjs.org), pre-configured to output highly optimized static assets for production.
16
+ - A [build command](https://vite.dev/guide/build.html) that bundles your code with [Rollup](https://rollupjs.org), pre-configured to output highly optimized static assets for production.
17
17
 
18
- In addition, Vite is highly extensible via its [Plugin API](https://vitejs.dev/guide/api-plugin.html) and [JavaScript API](https://vitejs.dev/guide/api-javascript.html) with full typing support.
18
+ In addition, Vite is highly extensible via its [Plugin API](https://vite.dev/guide/api-plugin.html) and [JavaScript API](https://vite.dev/guide/api-javascript.html) with full typing support.
19
19
 
20
- [Read the Docs to Learn More](https://vitejs.dev).
20
+ [Read the Docs to Learn More](https://vite.dev).
@@ -513,14 +513,14 @@ try {
513
513
  your current setup:
514
514
  (browser) ${currentScriptHost} <--[HTTP]--> ${serverHost} (server)
515
515
  (browser) ${socketHost} <--[WebSocket (failing)]--> ${directSocketHost} (server)
516
- Check out your Vite / network configuration and https://vitejs.dev/config/server-options.html#server-hmr .`
516
+ Check out your Vite / network configuration and https://vite.dev/config/server-options.html#server-hmr .`
517
517
  );
518
518
  });
519
519
  socket.addEventListener(
520
520
  "open",
521
521
  () => {
522
522
  console.info(
523
- "[vite] Direct websocket connection fallback. Check out https://vitejs.dev/config/server-options.html#server-hmr to remove the previous connection error."
523
+ "[vite] Direct websocket connection fallback. Check out https://vite.dev/config/server-options.html#server-hmr to remove the previous connection error."
524
524
  );
525
525
  },
526
526
  { once: true }
@@ -561,7 +561,7 @@ function setupWebSocket(protocol, hostAndPath, onCloseWithoutOpen) {
561
561
  return socket2;
562
562
  }
563
563
  function cleanUrl(pathname) {
564
- const url = new URL(pathname, "http://vitejs.dev");
564
+ const url = new URL(pathname, "http://vite.dev");
565
565
  url.searchParams.delete("direct");
566
566
  return url.pathname + url.search;
567
567
  }
@@ -818,7 +818,7 @@ function injectQuery(url, queryToInject) {
818
818
  return url;
819
819
  }
820
820
  const pathname = url.replace(/[?#].*$/, "");
821
- const { search, hash } = new URL(url, "http://vitejs.dev");
821
+ const { search, hash } = new URL(url, "http://vite.dev");
822
822
  return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ""}${hash || ""}`;
823
823
  }
824
824
 
@@ -1,4 +1,4 @@
1
- import { B as getDefaultExportFromCjs } from './dep-DG6Lorbi.js';
1
+ import { B as getDefaultExportFromCjs } from './dep-Cyk9bIUq.js';
2
2
  import require$$0 from 'path';
3
3
  import require$$0__default from 'fs';
4
4
  import { l as lib } from './dep-IQS-Za7F.js';
@@ -18221,13 +18221,35 @@ function isGlobMatch(filename, dir, patterns, allowJs) {
18221
18221
  // filename must end with part of pattern that comes after last wildcard
18222
18222
  let lastWildcardIndex = pattern.length;
18223
18223
  let hasWildcard = false;
18224
+ let hasExtension = false;
18225
+ let hasSlash = false;
18226
+ let lastSlashIndex = -1;
18224
18227
  for (let i = pattern.length - 1; i > -1; i--) {
18225
- if (pattern[i] === '*' || pattern[i] === '?') {
18226
- lastWildcardIndex = i;
18227
- hasWildcard = true;
18228
+ const c = pattern[i];
18229
+ if (!hasWildcard) {
18230
+ if (c === '*' || c === '?') {
18231
+ lastWildcardIndex = i;
18232
+ hasWildcard = true;
18233
+ }
18234
+ }
18235
+ if (!hasSlash) {
18236
+ if (c === '.') {
18237
+ hasExtension = true;
18238
+ } else if (c === '/') {
18239
+ lastSlashIndex = i;
18240
+ hasSlash = true;
18241
+ }
18242
+ }
18243
+ if (hasWildcard && hasSlash) {
18228
18244
  break;
18229
18245
  }
18230
18246
  }
18247
+ if (!hasExtension && (!hasWildcard || lastWildcardIndex < lastSlashIndex)) {
18248
+ // add implicit glob
18249
+ pattern += `${pattern.endsWith('/') ? '' : '/'}${GLOB_ALL_PATTERN}`;
18250
+ lastWildcardIndex = pattern.length - 1;
18251
+ hasWildcard = true;
18252
+ }
18231
18253
 
18232
18254
  // if pattern does not end with wildcard, filename must end with pattern after last wildcard
18233
18255
  if (
@@ -18265,11 +18287,18 @@ function isGlobMatch(filename, dir, patterns, allowJs) {
18265
18287
  return false;
18266
18288
  }
18267
18289
 
18268
- // if no wildcard in pattern, filename must be equal to resolved pattern
18269
18290
  if (!hasWildcard) {
18291
+ // no wildcard in pattern, filename must be equal to resolved pattern
18270
18292
  return filename === resolvedPattern;
18293
+ } else if (
18294
+ firstWildcardIndex + GLOB_ALL_PATTERN.length ===
18295
+ resolvedPattern.length - (pattern.length - 1 - lastWildcardIndex) &&
18296
+ resolvedPattern.slice(firstWildcardIndex, firstWildcardIndex + GLOB_ALL_PATTERN.length) ===
18297
+ GLOB_ALL_PATTERN
18298
+ ) {
18299
+ // singular glob-all pattern and we already validated prefix and suffix matches
18300
+ return true;
18271
18301
  }
18272
-
18273
18302
  // complex pattern, use regex to check it
18274
18303
  if (PATTERN_REGEX_CACHE.has(resolvedPattern)) {
18275
18304
  return PATTERN_REGEX_CACHE.get(resolvedPattern).test(filename);
@@ -20605,7 +20634,7 @@ function dataURIPlugin() {
20605
20634
  resolved = /* @__PURE__ */ new Map();
20606
20635
  },
20607
20636
  resolveId(id) {
20608
- if (!dataUriRE.test(id)) {
20637
+ if (!id.trimStart().startsWith("data:")) {
20609
20638
  return;
20610
20639
  }
20611
20640
  const uri = new URL$3(id);
@@ -36953,8 +36982,8 @@ function createCachedImport(imp) {
36953
36982
  return cached;
36954
36983
  };
36955
36984
  }
36956
- const importPostcssImport = createCachedImport(() => import('./dep-CdRA0jgn.js').then(function (n) { return n.i; }));
36957
- const importPostcssModules = createCachedImport(() => import('./dep-CEc13REz.js').then(function (n) { return n.i; }));
36985
+ const importPostcssImport = createCachedImport(() => import('./dep-Bs_uPLzU.js').then(function (n) { return n.i; }));
36986
+ const importPostcssModules = createCachedImport(() => import('./dep-D6390W8B.js').then(function (n) { return n.i; }));
36958
36987
  const importPostcss = createCachedImport(() => import('postcss'));
36959
36988
  const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
36960
36989
  let alwaysFakeWorkerWorkerControllerCache;
@@ -37416,7 +37445,7 @@ const makeModernScssWorker = (resolvers, alias, maxWorkers) => {
37416
37445
  fileURLToPath2(canonicalUrl),
37417
37446
  options.filename
37418
37447
  );
37419
- return { contents, syntax };
37448
+ return { contents, syntax, sourceMapUrl: canonicalUrl };
37420
37449
  }
37421
37450
  };
37422
37451
  sassOptions.importers = [
@@ -37446,11 +37475,12 @@ const makeModernScssWorker = (resolvers, alias, maxWorkers) => {
37446
37475
  return worker;
37447
37476
  };
37448
37477
  const makeModernCompilerScssWorker = (resolvers, alias, _maxWorkers) => {
37449
- let compiler;
37478
+ let compilerPromise;
37450
37479
  const worker = {
37451
37480
  async run(sassPath, data, options) {
37452
37481
  const sass = (await import(pathToFileURL(sassPath).href)).default;
37453
- compiler ??= await sass.initAsyncCompiler();
37482
+ compilerPromise ??= sass.initAsyncCompiler();
37483
+ const compiler = await compilerPromise;
37454
37484
  const sassOptions = { ...options };
37455
37485
  sassOptions.url = pathToFileURL(options.filename);
37456
37486
  sassOptions.sourceMap = options.enableSourcemap;
@@ -37476,7 +37506,7 @@ const makeModernCompilerScssWorker = (resolvers, alias, _maxWorkers) => {
37476
37506
  resolvers.sass
37477
37507
  );
37478
37508
  const contents = result2.contents ?? await fsp.readFile(result2.file, "utf-8");
37479
- return { contents, syntax };
37509
+ return { contents, syntax, sourceMapUrl: canonicalUrl };
37480
37510
  }
37481
37511
  };
37482
37512
  sassOptions.importers = [
@@ -37493,8 +37523,8 @@ const makeModernCompilerScssWorker = (resolvers, alias, _maxWorkers) => {
37493
37523
  };
37494
37524
  },
37495
37525
  async stop() {
37496
- compiler?.dispose();
37497
- compiler = void 0;
37526
+ (await compilerPromise)?.dispose();
37527
+ compilerPromise = void 0;
37498
37528
  }
37499
37529
  };
37500
37530
  return worker;
@@ -37962,7 +37992,10 @@ async function compileLightningCSS(id, src, config, urlReplacer) {
37962
37992
  }
37963
37993
  deps.add(dep.url);
37964
37994
  if (urlReplacer) {
37965
- const replaceUrl = await urlReplacer(dep.url, dep.loc.filePath);
37995
+ const replaceUrl = await urlReplacer(
37996
+ dep.url,
37997
+ toAbsolute(dep.loc.filePath)
37998
+ );
37966
37999
  css = css.replace(dep.placeholder, () => replaceUrl);
37967
38000
  } else {
37968
38001
  css = css.replace(dep.placeholder, () => dep.url);
@@ -45061,14 +45094,21 @@ var linux = {
45061
45094
  codium: 'codium',
45062
45095
  emacs: 'emacs',
45063
45096
  gvim: 'gvim',
45097
+ idea: 'idea',
45064
45098
  'idea.sh': 'idea',
45099
+ phpstorm: 'phpstorm',
45065
45100
  'phpstorm.sh': 'phpstorm',
45101
+ pycharm: 'pycharm',
45066
45102
  'pycharm.sh': 'pycharm',
45103
+ rubymine: 'rubymine',
45067
45104
  'rubymine.sh': 'rubymine',
45068
45105
  sublime_text: 'subl',
45069
45106
  vim: 'vim',
45107
+ webstorm: 'webstorm',
45070
45108
  'webstorm.sh': 'webstorm',
45109
+ goland: 'goland',
45071
45110
  'goland.sh': 'goland',
45111
+ rider: 'rider',
45072
45112
  'rider.sh': 'rider'
45073
45113
  };
45074
45114
 
@@ -45378,36 +45418,6 @@ function launchEditor (file, specifiedEditor, onErrorCallback) {
45378
45418
  fileName = path$5.relative('', fileName);
45379
45419
  }
45380
45420
 
45381
- // cmd.exe on Windows is vulnerable to RCE attacks given a file name of the
45382
- // form "C:\Users\myusername\Downloads\& curl 172.21.93.52". Use a safe file
45383
- // name pattern to validate user-provided file names. This doesn't cover the
45384
- // entire range of valid file names but should cover almost all of them in practice.
45385
- // (Backport of
45386
- // https://github.com/facebook/create-react-app/pull/4866
45387
- // and
45388
- // https://github.com/facebook/create-react-app/pull/5431)
45389
-
45390
- // Allows alphanumeric characters, periods, dashes, slashes, underscores, plus and space.
45391
- const WINDOWS_CMD_SAFE_FILE_NAME_PATTERN = /^([A-Za-z]:[/\\])?[\p{L}0-9/.\-\\_+ ]+$/u;
45392
- if (
45393
- process.platform === 'win32' &&
45394
- !WINDOWS_CMD_SAFE_FILE_NAME_PATTERN.test(fileName.trim())
45395
- ) {
45396
- console.log();
45397
- console.log(
45398
- colors.red('Could not open ' + path$5.basename(fileName) + ' in the editor.')
45399
- );
45400
- console.log();
45401
- console.log(
45402
- 'When running on Windows, file names are checked against a safe file name ' +
45403
- 'pattern to protect against remote code execution attacks. File names ' +
45404
- 'may consist only of alphanumeric characters (all languages), periods, ' +
45405
- 'dashes, slashes, and underscores.'
45406
- );
45407
- console.log();
45408
- return
45409
- }
45410
-
45411
45421
  if (lineNumber) {
45412
45422
  const extraArgs = getArgumentsForPosition(editor, fileName, lineNumber, columnNumber);
45413
45423
  args.push.apply(args, extraArgs);
@@ -45423,13 +45433,55 @@ function launchEditor (file, specifiedEditor, onErrorCallback) {
45423
45433
  }
45424
45434
 
45425
45435
  if (process.platform === 'win32') {
45426
- // On Windows, launch the editor in a shell because spawn can only
45427
- // launch .exe files.
45428
- _childProcess = childProcess$1.spawn(
45429
- 'cmd.exe',
45430
- ['/C', editor].concat(args),
45431
- { stdio: 'inherit' }
45432
- );
45436
+ // On Windows, we need to use `exec` with the `shell: true` option,
45437
+ // and some more sanitization is required.
45438
+
45439
+ // However, CMD.exe on Windows is vulnerable to RCE attacks given a file name of the
45440
+ // form "C:\Users\myusername\Downloads\& curl 172.21.93.52".
45441
+ // `create-react-app` used a safe file name pattern to validate user-provided file names:
45442
+ // - https://github.com/facebook/create-react-app/pull/4866
45443
+ // - https://github.com/facebook/create-react-app/pull/5431
45444
+ // But that's not a viable solution for this package because
45445
+ // it's depended on by so many meta frameworks that heavily rely on
45446
+ // special characters in file names for filesystem-based routing.
45447
+ // We need to at least:
45448
+ // - Support `+` because it's used in SvelteKit and Vike
45449
+ // - Support `$` because it's used in Remix
45450
+ // - Support `(` and `)` because they are used in Analog, SolidStart, and Vike
45451
+ // - Support `@` because it's used in Vike
45452
+ // - Support `[` and `]` because they are widely used for [slug]
45453
+ // So here we choose to use `^` to escape special characters instead.
45454
+
45455
+ // According to https://ss64.com/nt/syntax-esc.html,
45456
+ // we can use `^` to escape `&`, `<`, `>`, `|`, `%`, and `^`
45457
+ // I'm not sure if we have to escape all of these, but let's do it anyway
45458
+ function escapeCmdArgs (cmdArgs) {
45459
+ return cmdArgs.replace(/([&|<>,;=^])/g, '^$1')
45460
+ }
45461
+
45462
+ // Need to double quote the editor path in case it contains spaces;
45463
+ // If the fileName contains spaces, we also need to double quote it in the arguments
45464
+ // However, there's a case that it's concatenated with line number and column number
45465
+ // which is separated by `:`. We need to double quote the whole string in this case.
45466
+ // Also, if the string contains the escape character `^`, it needs to be quoted, too.
45467
+ function doubleQuoteIfNeeded(str) {
45468
+ if (str.includes('^')) {
45469
+ // If a string includes an escaped character, not only does it need to be quoted,
45470
+ // but the quotes need to be escaped too.
45471
+ return `^"${str}^"`
45472
+ } else if (str.includes(' ')) {
45473
+ return `"${str}"`
45474
+ }
45475
+ return str
45476
+ }
45477
+ const launchCommand = [editor, ...args.map(escapeCmdArgs)]
45478
+ .map(doubleQuoteIfNeeded)
45479
+ .join(' ');
45480
+
45481
+ _childProcess = childProcess$1.exec(launchCommand, {
45482
+ stdio: 'inherit',
45483
+ shell: true
45484
+ });
45433
45485
  } else {
45434
45486
  _childProcess = childProcess$1.spawn(editor, args, { stdio: 'inherit' });
45435
45487
  }
@@ -45553,7 +45605,7 @@ function setClientErrorHandler(server, logger) {
45553
45605
  msg = "431 Request Header Fields Too Large";
45554
45606
  logger.warn(
45555
45607
  colors$1.yellow(
45556
- "Server responded with status code 431. See https://vitejs.dev/guide/troubleshooting.html#_431-request-header-fields-too-large."
45608
+ "Server responded with status code 431. See https://vite.dev/guide/troubleshooting.html#_431-request-header-fields-too-large."
45557
45609
  )
45558
45610
  );
45559
45611
  }
@@ -46168,7 +46220,7 @@ function resolvePlugin(resolveOptions) {
46168
46220
  );
46169
46221
  } else if (isProduction) {
46170
46222
  this.warn(
46171
- `Module "${id}" has been externalized for browser compatibility, imported by "${importer}". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`
46223
+ `Module "${id}" has been externalized for browser compatibility, imported by "${importer}". See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`
46172
46224
  );
46173
46225
  }
46174
46226
  return isProduction ? browserExternalId : `${browserExternalId}:${id}`;
@@ -46185,7 +46237,7 @@ function resolvePlugin(resolveOptions) {
46185
46237
  id = id.slice(browserExternalId.length + 1);
46186
46238
  return `export default new Proxy({}, {
46187
46239
  get(_, key) {
46188
- throw new Error(\`Module "${id}" has been externalized for browser compatibility. Cannot access "${id}.\${key}" in client code. See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.\`)
46240
+ throw new Error(\`Module "${id}" has been externalized for browser compatibility. Cannot access "${id}.\${key}" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.\`)
46189
46241
  }
46190
46242
  })`;
46191
46243
  }
@@ -46924,7 +46976,7 @@ function esbuildDepPlugin(qualified, external, config, ssr) {
46924
46976
  key !== 'constructor' &&
46925
46977
  key !== 'splice'
46926
46978
  ) {
46927
- console.warn(\`Module "${path2}" has been externalized for browser compatibility. Cannot access "${path2}.\${key}" in client code. See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.\`)
46979
+ console.warn(\`Module "${path2}" has been externalized for browser compatibility. Cannot access "${path2}.\${key}" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.\`)
46928
46980
  }
46929
46981
  }
46930
46982
  }))`
@@ -47525,7 +47577,7 @@ const wasmFallbackPlugin = () => {
47525
47577
  return;
47526
47578
  }
47527
47579
  throw new Error(
47528
- '"ESM integration proposal for Wasm" is not supported currently. Use vite-plugin-wasm or other community plugins to handle this. Alternatively, you can use `.wasm?init` or `.wasm?url`. See https://vitejs.dev/guide/features.html#webassembly for more details.'
47580
+ '"ESM integration proposal for Wasm" is not supported currently. Use vite-plugin-wasm or other community plugins to handle this. Alternatively, you can use `.wasm?init` or `.wasm?url`. See https://vite.dev/guide/features.html#webassembly for more details.'
47529
47581
  );
47530
47582
  }
47531
47583
  };
@@ -51671,7 +51723,7 @@ function ensureServingAccess(url, server, res, next) {
51671
51723
  const hintMessage = `
51672
51724
  ${server.config.server.fs.allow.map((i) => `- ${i}`).join("\n")}
51673
51725
 
51674
- Refer to docs https://vitejs.dev/config/server-options.html#server-fs-allow for configurations and more details.`;
51726
+ Refer to docs https://vite.dev/config/server-options.html#server-fs-allow for configurations and more details.`;
51675
51727
  server.config.logger.error(urlMessage);
51676
51728
  server.config.logger.warnOnce(hintMessage + "\n");
51677
51729
  res.statusCode = 403;
@@ -52512,18 +52564,13 @@ Object.defineProperty(${ssrModuleExportsKey}, "default", { enumerable: true, con
52512
52564
  }
52513
52565
  });
52514
52566
  let map = s.generateMap({ hires: "boundary" });
52567
+ map.sources = [path$n.basename(url)];
52568
+ map.sourcesContent = [originalCode];
52515
52569
  if (inMap && inMap.mappings && "sources" in inMap && inMap.sources.length > 0) {
52516
52570
  map = combineSourcemaps(url, [
52517
- {
52518
- ...map,
52519
- sources: inMap.sources,
52520
- sourcesContent: inMap.sourcesContent
52521
- },
52571
+ map,
52522
52572
  inMap
52523
52573
  ]);
52524
- } else {
52525
- map.sources = [path$n.basename(url)];
52526
- map.sourcesContent = [originalCode];
52527
52574
  }
52528
52575
  return {
52529
52576
  code: s.toString(),
@@ -62374,7 +62421,7 @@ class ModuleGraph {
62374
62421
  mod.ssrError = null;
62375
62422
  mod.importers.forEach((importer) => {
62376
62423
  if (!importer.acceptedHmrDeps.has(mod)) {
62377
- const shouldSoftInvalidateImporter = importer.staticImportedUrls?.has(mod.url) || softInvalidate;
62424
+ const shouldSoftInvalidateImporter = (importer.staticImportedUrls?.has(mod.url) || softInvalidate) && importer.type !== "css";
62378
62425
  this.invalidateModule(
62379
62426
  importer,
62380
62427
  seen,
@@ -64450,7 +64497,7 @@ function __vite__injectQuery(url, queryToInject) {
64450
64497
  return url;
64451
64498
  }
64452
64499
  const pathname = url.replace(/[?#].*$/, "");
64453
- const { search, hash } = new URL(url, "http://vitejs.dev");
64500
+ const { search, hash } = new URL(url, "http://vite.dev");
64454
64501
  return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ""}${hash || ""}`;
64455
64502
  }
64456
64503
 
@@ -66430,7 +66477,7 @@ function resolveBaseUrl(base = "/", isBuild, logger) {
66430
66477
  );
66431
66478
  }
66432
66479
  if (!isBuild || !isExternal) {
66433
- base = new URL(base, "http://vitejs.dev").pathname;
66480
+ base = new URL(base, "http://vite.dev").pathname;
66434
66481
  if (base[0] !== "/") {
66435
66482
  base = "/" + base;
66436
66483
  }
@@ -66573,7 +66620,7 @@ async function bundleConfigFile(fileName, isESM) {
66573
66620
  throw new Error(
66574
66621
  `Failed to resolve ${JSON.stringify(
66575
66622
  id
66576
- )}. This package is ESM only but it was tried to load by \`require\`. See https://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only for more details.`
66623
+ )}. This package is ESM only but it was tried to load by \`require\`. See https://vite.dev/guide/troubleshooting.html#this-package-is-esm-only for more details.`
66577
66624
  );
66578
66625
  }
66579
66626
  }
@@ -66586,7 +66633,7 @@ async function bundleConfigFile(fileName, isESM) {
66586
66633
  throw new Error(
66587
66634
  `${JSON.stringify(
66588
66635
  id
66589
- )} resolved to an ESM file. ESM file cannot be loaded by \`require\`. See https://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only for more details.`
66636
+ )} resolved to an ESM file. ESM file cannot be loaded by \`require\`. See https://vite.dev/guide/troubleshooting.html#this-package-is-esm-only for more details.`
66590
66637
  );
66591
66638
  }
66592
66639
  return {
@@ -1,4 +1,4 @@
1
- import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-DG6Lorbi.js';
1
+ import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-Cyk9bIUq.js';
2
2
  import require$$0__default from 'fs';
3
3
  import require$$0 from 'postcss';
4
4
  import require$$0$1 from 'path';
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 { A as colors, v as createLogger, r as resolveConfig } from './chunks/dep-DG6Lorbi.js';
5
+ import { A as colors, v as createLogger, r as resolveConfig } from './chunks/dep-Cyk9bIUq.js';
6
6
  import { VERSION } from './constants.js';
7
7
  import 'node:fs/promises';
8
8
  import 'node:url';
@@ -730,7 +730,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
730
730
  `[boolean] force the optimizer to ignore the cache and re-bundle`
731
731
  ).action(async (root, options) => {
732
732
  filterDuplicateOptions(options);
733
- const { createServer } = await import('./chunks/dep-DG6Lorbi.js').then(function (n) { return n.E; });
733
+ const { createServer } = await import('./chunks/dep-Cyk9bIUq.js').then(function (n) { return n.E; });
734
734
  try {
735
735
  const server = await createServer({
736
736
  root,
@@ -822,7 +822,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
822
822
  `[boolean] force empty outDir when it's outside of root`
823
823
  ).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).action(async (root, options) => {
824
824
  filterDuplicateOptions(options);
825
- const { build } = await import('./chunks/dep-DG6Lorbi.js').then(function (n) { return n.F; });
825
+ const { build } = await import('./chunks/dep-Cyk9bIUq.js').then(function (n) { return n.F; });
826
826
  const buildOptions = cleanOptions(options);
827
827
  try {
828
828
  await build({
@@ -851,7 +851,7 @@ cli.command("optimize [root]", "pre-bundle dependencies").option(
851
851
  ).action(
852
852
  async (root, options) => {
853
853
  filterDuplicateOptions(options);
854
- const { optimizeDeps } = await import('./chunks/dep-DG6Lorbi.js').then(function (n) { return n.D; });
854
+ const { optimizeDeps } = await import('./chunks/dep-Cyk9bIUq.js').then(function (n) { return n.D; });
855
855
  try {
856
856
  const config = await resolveConfig(
857
857
  {
@@ -877,7 +877,7 @@ ${e.stack}`),
877
877
  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(
878
878
  async (root, options) => {
879
879
  filterDuplicateOptions(options);
880
- const { preview } = await import('./chunks/dep-DG6Lorbi.js').then(function (n) { return n.G; });
880
+ const { preview } = await import('./chunks/dep-Cyk9bIUq.js').then(function (n) { return n.G; });
881
881
  try {
882
882
  const server = await preview({
883
883
  root,
@@ -1,6 +1,6 @@
1
1
  export { parseAst, parseAstAsync } from 'rollup/parseAst';
2
- import { i as isInNodeModules, a as arraify } from './chunks/dep-DG6Lorbi.js';
3
- export { b as build, g as buildErrorMessage, k as createFilter, v as createLogger, c as createServer, d as defineConfig, h as fetchModule, f as formatPostcssSourceMap, x as isFileServingAllowed, l as loadConfigFromFile, y as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, z as resolveEnvPrefix, q as rollupVersion, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-DG6Lorbi.js';
2
+ import { i as isInNodeModules, a as arraify } from './chunks/dep-Cyk9bIUq.js';
3
+ export { b as build, g as buildErrorMessage, k as createFilter, v as createLogger, c as createServer, d as defineConfig, h as fetchModule, f as formatPostcssSourceMap, x as isFileServingAllowed, l as loadConfigFromFile, y as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, z as resolveEnvPrefix, q as rollupVersion, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-Cyk9bIUq.js';
4
4
  export { VERSION as version } from './constants.js';
5
5
  export { version as esbuildVersion } from 'esbuild';
6
6
  import { existsSync, readFileSync } from 'node:fs';
package/index.cjs CHANGED
@@ -40,7 +40,7 @@ function warnCjsUsage() {
40
40
  const yellow = (str) => `\u001b[33m${str}\u001b[39m`
41
41
  console.warn(
42
42
  yellow(
43
- `The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.`,
43
+ `The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.`,
44
44
  ),
45
45
  )
46
46
  if (process.env.VITE_CJS_TRACE) {
package/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @deprecated The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
2
+ * @deprecated The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
3
3
  */
4
4
  declare const module: any
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "5.4.7",
3
+ "version": "5.4.9",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -68,7 +68,7 @@
68
68
  "bugs": {
69
69
  "url": "https://github.com/vitejs/vite/issues"
70
70
  },
71
- "homepage": "https://vitejs.dev",
71
+ "homepage": "https://vite.dev",
72
72
  "funding": "https://github.com/vitejs/vite?sponsor=1",
73
73
  "//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
74
74
  "dependencies": {
@@ -109,7 +109,7 @@
109
109
  "etag": "^1.8.1",
110
110
  "fast-glob": "^3.3.2",
111
111
  "http-proxy": "^1.18.1",
112
- "launch-editor-middleware": "^2.8.1",
112
+ "launch-editor-middleware": "^2.9.1",
113
113
  "lightningcss": "^1.26.0",
114
114
  "magic-string": "^0.30.11",
115
115
  "micromatch": "^4.0.8",
@@ -134,7 +134,7 @@
134
134
  "source-map-support": "^0.5.21",
135
135
  "strip-ansi": "^7.1.0",
136
136
  "strip-literal": "^2.1.0",
137
- "tsconfck": "^3.1.3",
137
+ "tsconfck": "^3.1.4",
138
138
  "tslib": "^2.7.0",
139
139
  "types": "link:./types",
140
140
  "ufo": "^1.5.4",