vite 5.4.8 → 5.4.10

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 { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-CDnG8rE7.js';
1
+ import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-BWSbWtLw.js';
2
2
  import require$$0__default from 'fs';
3
3
  import require$$0 from 'postcss';
4
4
  import require$$0$1 from 'path';
@@ -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);
@@ -36564,6 +36593,14 @@ function cssPostPlugin(config) {
36564
36593
  delete bundle[`${fileName}.map`];
36565
36594
  });
36566
36595
  }
36596
+ const cssAssets = Object.values(bundle).filter(
36597
+ (asset) => asset.type === "asset" && asset.fileName.endsWith(".css")
36598
+ );
36599
+ for (const cssAsset of cssAssets) {
36600
+ if (typeof cssAsset.source === "string") {
36601
+ cssAsset.source = cssAsset.source.replace(viteHashUpdateMarkerRE, "");
36602
+ }
36603
+ }
36567
36604
  }
36568
36605
  };
36569
36606
  }
@@ -36953,8 +36990,8 @@ function createCachedImport(imp) {
36953
36990
  return cached;
36954
36991
  };
36955
36992
  }
36956
- const importPostcssImport = createCachedImport(() => import('./dep-B7_zXWZq.js').then(function (n) { return n.i; }));
36957
- const importPostcssModules = createCachedImport(() => import('./dep-BaJt-LTH.js').then(function (n) { return n.i; }));
36993
+ const importPostcssImport = createCachedImport(() => import('./dep-GkhNNjoY.js').then(function (n) { return n.i; }));
36994
+ const importPostcssModules = createCachedImport(() => import('./dep-BASfdaBA.js').then(function (n) { return n.i; }));
36958
36995
  const importPostcss = createCachedImport(() => import('postcss'));
36959
36996
  const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
36960
36997
  let alwaysFakeWorkerWorkerControllerCache;
@@ -36992,6 +37029,8 @@ function combineSourcemapsIfExists(filename, map1, map2) {
36992
37029
  map2
36993
37030
  ]) : map1;
36994
37031
  }
37032
+ const viteHashUpdateMarker = "/*$vite$:1*/";
37033
+ const viteHashUpdateMarkerRE = /\/\*\$vite\$:\d+\*\//;
36995
37034
  async function finalizeCss(css, minify, config) {
36996
37035
  if (css.includes("@import") || css.includes("@charset")) {
36997
37036
  css = await hoistAtRules(css);
@@ -36999,6 +37038,7 @@ async function finalizeCss(css, minify, config) {
36999
37038
  if (config.build.cssMinify) {
37000
37039
  css = await minifyCSS(css, config, false);
37001
37040
  }
37041
+ css += viteHashUpdateMarker;
37002
37042
  return css;
37003
37043
  }
37004
37044
  async function resolvePostcssConfig(config) {
@@ -37963,7 +38003,10 @@ async function compileLightningCSS(id, src, config, urlReplacer) {
37963
38003
  }
37964
38004
  deps.add(dep.url);
37965
38005
  if (urlReplacer) {
37966
- const replaceUrl = await urlReplacer(dep.url, dep.loc.filePath);
38006
+ const replaceUrl = await urlReplacer(
38007
+ dep.url,
38008
+ toAbsolute(dep.loc.filePath)
38009
+ );
37967
38010
  css = css.replace(dep.placeholder, () => replaceUrl);
37968
38011
  } else {
37969
38012
  css = css.replace(dep.placeholder, () => dep.url);
@@ -45062,14 +45105,21 @@ var linux = {
45062
45105
  codium: 'codium',
45063
45106
  emacs: 'emacs',
45064
45107
  gvim: 'gvim',
45108
+ idea: 'idea',
45065
45109
  'idea.sh': 'idea',
45110
+ phpstorm: 'phpstorm',
45066
45111
  'phpstorm.sh': 'phpstorm',
45112
+ pycharm: 'pycharm',
45067
45113
  'pycharm.sh': 'pycharm',
45114
+ rubymine: 'rubymine',
45068
45115
  'rubymine.sh': 'rubymine',
45069
45116
  sublime_text: 'subl',
45070
45117
  vim: 'vim',
45118
+ webstorm: 'webstorm',
45071
45119
  'webstorm.sh': 'webstorm',
45120
+ goland: 'goland',
45072
45121
  'goland.sh': 'goland',
45122
+ rider: 'rider',
45073
45123
  'rider.sh': 'rider'
45074
45124
  };
45075
45125
 
@@ -45379,36 +45429,6 @@ function launchEditor (file, specifiedEditor, onErrorCallback) {
45379
45429
  fileName = path$5.relative('', fileName);
45380
45430
  }
45381
45431
 
45382
- // cmd.exe on Windows is vulnerable to RCE attacks given a file name of the
45383
- // form "C:\Users\myusername\Downloads\& curl 172.21.93.52". Use a safe file
45384
- // name pattern to validate user-provided file names. This doesn't cover the
45385
- // entire range of valid file names but should cover almost all of them in practice.
45386
- // (Backport of
45387
- // https://github.com/facebook/create-react-app/pull/4866
45388
- // and
45389
- // https://github.com/facebook/create-react-app/pull/5431)
45390
-
45391
- // Allows alphanumeric characters, periods, dashes, slashes, underscores, plus and space.
45392
- const WINDOWS_CMD_SAFE_FILE_NAME_PATTERN = /^([A-Za-z]:[/\\])?[\p{L}0-9/.\-\\_+ ]+$/u;
45393
- if (
45394
- process.platform === 'win32' &&
45395
- !WINDOWS_CMD_SAFE_FILE_NAME_PATTERN.test(fileName.trim())
45396
- ) {
45397
- console.log();
45398
- console.log(
45399
- colors.red('Could not open ' + path$5.basename(fileName) + ' in the editor.')
45400
- );
45401
- console.log();
45402
- console.log(
45403
- 'When running on Windows, file names are checked against a safe file name ' +
45404
- 'pattern to protect against remote code execution attacks. File names ' +
45405
- 'may consist only of alphanumeric characters (all languages), periods, ' +
45406
- 'dashes, slashes, and underscores.'
45407
- );
45408
- console.log();
45409
- return
45410
- }
45411
-
45412
45432
  if (lineNumber) {
45413
45433
  const extraArgs = getArgumentsForPosition(editor, fileName, lineNumber, columnNumber);
45414
45434
  args.push.apply(args, extraArgs);
@@ -45424,13 +45444,55 @@ function launchEditor (file, specifiedEditor, onErrorCallback) {
45424
45444
  }
45425
45445
 
45426
45446
  if (process.platform === 'win32') {
45427
- // On Windows, launch the editor in a shell because spawn can only
45428
- // launch .exe files.
45429
- _childProcess = childProcess$1.spawn(
45430
- 'cmd.exe',
45431
- ['/C', editor].concat(args),
45432
- { stdio: 'inherit' }
45433
- );
45447
+ // On Windows, we need to use `exec` with the `shell: true` option,
45448
+ // and some more sanitization is required.
45449
+
45450
+ // However, CMD.exe on Windows is vulnerable to RCE attacks given a file name of the
45451
+ // form "C:\Users\myusername\Downloads\& curl 172.21.93.52".
45452
+ // `create-react-app` used a safe file name pattern to validate user-provided file names:
45453
+ // - https://github.com/facebook/create-react-app/pull/4866
45454
+ // - https://github.com/facebook/create-react-app/pull/5431
45455
+ // But that's not a viable solution for this package because
45456
+ // it's depended on by so many meta frameworks that heavily rely on
45457
+ // special characters in file names for filesystem-based routing.
45458
+ // We need to at least:
45459
+ // - Support `+` because it's used in SvelteKit and Vike
45460
+ // - Support `$` because it's used in Remix
45461
+ // - Support `(` and `)` because they are used in Analog, SolidStart, and Vike
45462
+ // - Support `@` because it's used in Vike
45463
+ // - Support `[` and `]` because they are widely used for [slug]
45464
+ // So here we choose to use `^` to escape special characters instead.
45465
+
45466
+ // According to https://ss64.com/nt/syntax-esc.html,
45467
+ // we can use `^` to escape `&`, `<`, `>`, `|`, `%`, and `^`
45468
+ // I'm not sure if we have to escape all of these, but let's do it anyway
45469
+ function escapeCmdArgs (cmdArgs) {
45470
+ return cmdArgs.replace(/([&|<>,;=^])/g, '^$1')
45471
+ }
45472
+
45473
+ // Need to double quote the editor path in case it contains spaces;
45474
+ // If the fileName contains spaces, we also need to double quote it in the arguments
45475
+ // However, there's a case that it's concatenated with line number and column number
45476
+ // which is separated by `:`. We need to double quote the whole string in this case.
45477
+ // Also, if the string contains the escape character `^`, it needs to be quoted, too.
45478
+ function doubleQuoteIfNeeded(str) {
45479
+ if (str.includes('^')) {
45480
+ // If a string includes an escaped character, not only does it need to be quoted,
45481
+ // but the quotes need to be escaped too.
45482
+ return `^"${str}^"`
45483
+ } else if (str.includes(' ')) {
45484
+ return `"${str}"`
45485
+ }
45486
+ return str
45487
+ }
45488
+ const launchCommand = [editor, ...args.map(escapeCmdArgs)]
45489
+ .map(doubleQuoteIfNeeded)
45490
+ .join(' ');
45491
+
45492
+ _childProcess = childProcess$1.exec(launchCommand, {
45493
+ stdio: 'inherit',
45494
+ shell: true
45495
+ });
45434
45496
  } else {
45435
45497
  _childProcess = childProcess$1.spawn(editor, args, { stdio: 'inherit' });
45436
45498
  }
@@ -45554,7 +45616,7 @@ function setClientErrorHandler(server, logger) {
45554
45616
  msg = "431 Request Header Fields Too Large";
45555
45617
  logger.warn(
45556
45618
  colors$1.yellow(
45557
- "Server responded with status code 431. See https://vitejs.dev/guide/troubleshooting.html#_431-request-header-fields-too-large."
45619
+ "Server responded with status code 431. See https://vite.dev/guide/troubleshooting.html#_431-request-header-fields-too-large."
45558
45620
  )
45559
45621
  );
45560
45622
  }
@@ -46169,7 +46231,7 @@ function resolvePlugin(resolveOptions) {
46169
46231
  );
46170
46232
  } else if (isProduction) {
46171
46233
  this.warn(
46172
- `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.`
46234
+ `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.`
46173
46235
  );
46174
46236
  }
46175
46237
  return isProduction ? browserExternalId : `${browserExternalId}:${id}`;
@@ -46186,7 +46248,7 @@ function resolvePlugin(resolveOptions) {
46186
46248
  id = id.slice(browserExternalId.length + 1);
46187
46249
  return `export default new Proxy({}, {
46188
46250
  get(_, key) {
46189
- 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.\`)
46251
+ 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.\`)
46190
46252
  }
46191
46253
  })`;
46192
46254
  }
@@ -46925,7 +46987,7 @@ function esbuildDepPlugin(qualified, external, config, ssr) {
46925
46987
  key !== 'constructor' &&
46926
46988
  key !== 'splice'
46927
46989
  ) {
46928
- 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.\`)
46990
+ 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.\`)
46929
46991
  }
46930
46992
  }
46931
46993
  }))`
@@ -47526,7 +47588,7 @@ const wasmFallbackPlugin = () => {
47526
47588
  return;
47527
47589
  }
47528
47590
  throw new Error(
47529
- '"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.'
47591
+ '"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.'
47530
47592
  );
47531
47593
  }
47532
47594
  };
@@ -51672,7 +51734,7 @@ function ensureServingAccess(url, server, res, next) {
51672
51734
  const hintMessage = `
51673
51735
  ${server.config.server.fs.allow.map((i) => `- ${i}`).join("\n")}
51674
51736
 
51675
- Refer to docs https://vitejs.dev/config/server-options.html#server-fs-allow for configurations and more details.`;
51737
+ Refer to docs https://vite.dev/config/server-options.html#server-fs-allow for configurations and more details.`;
51676
51738
  server.config.logger.error(urlMessage);
51677
51739
  server.config.logger.warnOnce(hintMessage + "\n");
51678
51740
  res.statusCode = 403;
@@ -52513,18 +52575,13 @@ Object.defineProperty(${ssrModuleExportsKey}, "default", { enumerable: true, con
52513
52575
  }
52514
52576
  });
52515
52577
  let map = s.generateMap({ hires: "boundary" });
52578
+ map.sources = [path$n.basename(url)];
52579
+ map.sourcesContent = [originalCode];
52516
52580
  if (inMap && inMap.mappings && "sources" in inMap && inMap.sources.length > 0) {
52517
52581
  map = combineSourcemaps(url, [
52518
- {
52519
- ...map,
52520
- sources: inMap.sources,
52521
- sourcesContent: inMap.sourcesContent
52522
- },
52582
+ map,
52523
52583
  inMap
52524
52584
  ]);
52525
- } else {
52526
- map.sources = [path$n.basename(url)];
52527
- map.sourcesContent = [originalCode];
52528
52585
  }
52529
52586
  return {
52530
52587
  code: s.toString(),
@@ -62375,7 +62432,7 @@ class ModuleGraph {
62375
62432
  mod.ssrError = null;
62376
62433
  mod.importers.forEach((importer) => {
62377
62434
  if (!importer.acceptedHmrDeps.has(mod)) {
62378
- const shouldSoftInvalidateImporter = importer.staticImportedUrls?.has(mod.url) || softInvalidate;
62435
+ const shouldSoftInvalidateImporter = (importer.staticImportedUrls?.has(mod.url) || softInvalidate) && importer.type !== "css";
62379
62436
  this.invalidateModule(
62380
62437
  importer,
62381
62438
  seen,
@@ -64451,7 +64508,7 @@ function __vite__injectQuery(url, queryToInject) {
64451
64508
  return url;
64452
64509
  }
64453
64510
  const pathname = url.replace(/[?#].*$/, "");
64454
- const { search, hash } = new URL(url, "http://vitejs.dev");
64511
+ const { search, hash } = new URL(url, "http://vite.dev");
64455
64512
  return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ""}${hash || ""}`;
64456
64513
  }
64457
64514
 
@@ -66431,7 +66488,7 @@ function resolveBaseUrl(base = "/", isBuild, logger) {
66431
66488
  );
66432
66489
  }
66433
66490
  if (!isBuild || !isExternal) {
66434
- base = new URL(base, "http://vitejs.dev").pathname;
66491
+ base = new URL(base, "http://vite.dev").pathname;
66435
66492
  if (base[0] !== "/") {
66436
66493
  base = "/" + base;
66437
66494
  }
@@ -66574,7 +66631,7 @@ async function bundleConfigFile(fileName, isESM) {
66574
66631
  throw new Error(
66575
66632
  `Failed to resolve ${JSON.stringify(
66576
66633
  id
66577
- )}. 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.`
66634
+ )}. 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.`
66578
66635
  );
66579
66636
  }
66580
66637
  }
@@ -66587,7 +66644,7 @@ async function bundleConfigFile(fileName, isESM) {
66587
66644
  throw new Error(
66588
66645
  `${JSON.stringify(
66589
66646
  id
66590
- )} 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.`
66647
+ )} 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.`
66591
66648
  );
66592
66649
  }
66593
66650
  return {
@@ -1,4 +1,4 @@
1
- import { B as getDefaultExportFromCjs } from './dep-CDnG8rE7.js';
1
+ import { B as getDefaultExportFromCjs } from './dep-BWSbWtLw.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';
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-CDnG8rE7.js';
5
+ import { A as colors, v as createLogger, r as resolveConfig } from './chunks/dep-BWSbWtLw.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-CDnG8rE7.js').then(function (n) { return n.E; });
733
+ const { createServer } = await import('./chunks/dep-BWSbWtLw.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-CDnG8rE7.js').then(function (n) { return n.F; });
825
+ const { build } = await import('./chunks/dep-BWSbWtLw.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-CDnG8rE7.js').then(function (n) { return n.D; });
854
+ const { optimizeDeps } = await import('./chunks/dep-BWSbWtLw.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-CDnG8rE7.js').then(function (n) { return n.G; });
880
+ const { preview } = await import('./chunks/dep-BWSbWtLw.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-CDnG8rE7.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-CDnG8rE7.js';
2
+ import { i as isInNodeModules, a as arraify } from './chunks/dep-BWSbWtLw.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-BWSbWtLw.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.8",
3
+ "version": "5.4.10",
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",