vite 8.3.0-beta.0 → 8.3.0-beta.1

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.
@@ -632,14 +632,14 @@ var BundledDevHMRClient = class extends HMRClient {
632
632
  if (importerIndex > -1) {
633
633
  const importChain = [
634
634
  importer,
635
- ...[...currentChain].reverse(),
635
+ ...currentChain.toReversed(),
636
636
  ...nodeChain.slice(importerIndex, -1).reverse()
637
637
  ];
638
638
  this.logger.debug(`circular imports detected: ${importChain.join(" -> ")}`);
639
639
  return true;
640
640
  }
641
641
  if (!currentChain.includes(importer)) {
642
- const result = this.isNodeWithinCircularImports(importer, nodeChain, currentChain.concat(importer), traversedModules);
642
+ const result = this.isNodeWithinCircularImports(importer, nodeChain, [...currentChain, importer], traversedModules);
643
643
  if (result) return result;
644
644
  }
645
645
  }
@@ -1824,6 +1824,13 @@ function injectQuery(url, queryToInject) {
1824
1824
  if (typeof DevRuntime !== "undefined") {
1825
1825
  var _ref;
1826
1826
  class ViteDevRuntime extends DevRuntime {
1827
+ payloadDelivered(filename) {
1828
+ transport.send({
1829
+ type: "custom",
1830
+ event: "vite:bundled-dev:payload-delivered",
1831
+ data: { filename }
1832
+ });
1833
+ }
1827
1834
  createModuleHotContext(moduleId) {
1828
1835
  const ctx = new BundledDevHMRContext(bundledDevHmrClient, moduleId);
1829
1836
  ctx._internal = {
@@ -1,6 +1,6 @@
1
1
  import { ft as __commonJSMin, pt as __require } from "./node.js";
2
2
  import { t as require_lib } from "./lib.js";
3
- //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.26/node_modules/postcss-modules/build/fs.js
3
+ //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.28/node_modules/postcss-modules/build/fs.js
4
4
  var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  function _export(target, all) {
@@ -34,7 +34,7 @@ var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
34
34
  }
35
35
  }));
36
36
  //#endregion
37
- //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.26/node_modules/postcss-modules/build/unquote.js
37
+ //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.28/node_modules/postcss-modules/build/unquote.js
38
38
  var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
39
39
  Object.defineProperty(exports, "__esModule", { value: true });
40
40
  Object.defineProperty(exports, "default", {
@@ -52,7 +52,7 @@ var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
52
52
  }
53
53
  }));
54
54
  //#endregion
55
- //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.26/node_modules/icss-utils/src/replaceValueSymbols.js
55
+ //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.28/node_modules/icss-utils/src/replaceValueSymbols.js
56
56
  var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
57
57
  const matchValueName = /[$]?[\w-]+/g;
58
58
  const replaceValueSymbols = (value, replacements) => {
@@ -69,7 +69,7 @@ var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, modul
69
69
  module.exports = replaceValueSymbols;
70
70
  }));
71
71
  //#endregion
72
- //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.26/node_modules/icss-utils/src/replaceSymbols.js
72
+ //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.28/node_modules/icss-utils/src/replaceSymbols.js
73
73
  var require_replaceSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
74
74
  const replaceValueSymbols = require_replaceValueSymbols();
75
75
  const replaceSymbols = (css, replacements) => {
@@ -82,7 +82,7 @@ var require_replaceSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) =>
82
82
  module.exports = replaceSymbols;
83
83
  }));
84
84
  //#endregion
85
- //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.26/node_modules/icss-utils/src/extractICSS.js
85
+ //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.28/node_modules/icss-utils/src/extractICSS.js
86
86
  var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => {
87
87
  const importPattern = /^:import\(("[^"]*"|'[^']*'|[^"']+)\)$/;
88
88
  const balancedQuotes = /^("[^"]*"|'[^']*'|[^"']+)$/;
@@ -136,7 +136,7 @@ var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => {
136
136
  module.exports = extractICSS;
137
137
  }));
138
138
  //#endregion
139
- //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.26/node_modules/icss-utils/src/createICSSRules.js
139
+ //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.28/node_modules/icss-utils/src/createICSSRules.js
140
140
  var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
141
141
  const createImports = (imports, postcss, mode = "rule") => {
142
142
  return Object.keys(imports).map((path) => {
@@ -180,7 +180,7 @@ var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) =
180
180
  module.exports = createICSSRules;
181
181
  }));
182
182
  //#endregion
183
- //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.26/node_modules/icss-utils/src/index.js
183
+ //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.28/node_modules/icss-utils/src/index.js
184
184
  var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
185
185
  module.exports = {
186
186
  replaceValueSymbols: require_replaceValueSymbols(),
@@ -190,7 +190,7 @@ var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
190
190
  };
191
191
  }));
192
192
  //#endregion
193
- //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.26/node_modules/postcss-modules/build/Parser.js
193
+ //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.28/node_modules/postcss-modules/build/Parser.js
194
194
  var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
195
195
  Object.defineProperty(exports, "__esModule", { value: true });
196
196
  Object.defineProperty(exports, "default", {
@@ -262,7 +262,7 @@ var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
262
262
  };
263
263
  }));
264
264
  //#endregion
265
- //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.26/node_modules/postcss-modules/build/saveJSON.js
265
+ //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.28/node_modules/postcss-modules/build/saveJSON.js
266
266
  var require_saveJSON = /* @__PURE__ */ __commonJSMin(((exports) => {
267
267
  Object.defineProperty(exports, "__esModule", { value: true });
268
268
  Object.defineProperty(exports, "default", {
@@ -944,7 +944,7 @@ var require_lodash_camelcase = /* @__PURE__ */ __commonJSMin(((exports, module)
944
944
  module.exports = camelCase;
945
945
  }));
946
946
  //#endregion
947
- //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.26/node_modules/postcss-modules/build/localsConvention.js
947
+ //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.28/node_modules/postcss-modules/build/localsConvention.js
948
948
  var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
949
949
  Object.defineProperty(exports, "__esModule", { value: true });
950
950
  Object.defineProperty(exports, "makeLocalsConventionReducer", {
@@ -999,7 +999,7 @@ var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
999
999
  }
1000
1000
  }));
1001
1001
  //#endregion
1002
- //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.26/node_modules/postcss-modules/build/FileSystemLoader.js
1002
+ //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.28/node_modules/postcss-modules/build/FileSystemLoader.js
1003
1003
  var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
1004
1004
  Object.defineProperty(exports, "__esModule", { value: true });
1005
1005
  Object.defineProperty(exports, "default", {
@@ -1088,7 +1088,7 @@ var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
1088
1088
  };
1089
1089
  }));
1090
1090
  //#endregion
1091
- //#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.26/node_modules/postcss-modules-extract-imports/src/topologicalSort.js
1091
+ //#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.28/node_modules/postcss-modules-extract-imports/src/topologicalSort.js
1092
1092
  var require_topologicalSort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1093
1093
  const PERMANENT_MARKER = 2;
1094
1094
  const TEMPORARY_MARKER = 1;
@@ -1127,7 +1127,7 @@ var require_topologicalSort = /* @__PURE__ */ __commonJSMin(((exports, module) =
1127
1127
  module.exports = topologicalSort;
1128
1128
  }));
1129
1129
  //#endregion
1130
- //#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.26/node_modules/postcss-modules-extract-imports/src/index.js
1130
+ //#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.28/node_modules/postcss-modules-extract-imports/src/index.js
1131
1131
  var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1132
1132
  const topologicalSort = require_topologicalSort();
1133
1133
  const matchImports = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/;
@@ -4654,7 +4654,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4654
4654
  module.exports = exports.default;
4655
4655
  }));
4656
4656
  //#endregion
4657
- //#region ../../node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.26/node_modules/postcss-modules-local-by-default/src/index.js
4657
+ //#region ../../node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.28/node_modules/postcss-modules-local-by-default/src/index.js
4658
4658
  var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4659
4659
  const selectorParser = require_dist();
4660
4660
  const valueParser = require_lib();
@@ -5050,7 +5050,7 @@ var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5050
5050
  module.exports.postcss = true;
5051
5051
  }));
5052
5052
  //#endregion
5053
- //#region ../../node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.26/node_modules/postcss-modules-scope/src/index.js
5053
+ //#region ../../node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.28/node_modules/postcss-modules-scope/src/index.js
5054
5054
  var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5055
5055
  const selectorParser = require_dist();
5056
5056
  const hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -5228,7 +5228,7 @@ var require_string_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5228
5228
  module.exports = hash;
5229
5229
  }));
5230
5230
  //#endregion
5231
- //#region ../../node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.26/node_modules/postcss-modules-values/src/index.js
5231
+ //#region ../../node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.28/node_modules/postcss-modules-values/src/index.js
5232
5232
  var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5233
5233
  const ICSSUtils = require_src$4();
5234
5234
  const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/;
@@ -5315,7 +5315,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5315
5315
  module.exports.postcss = true;
5316
5316
  }));
5317
5317
  //#endregion
5318
- //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.26/node_modules/postcss-modules/build/scoping.js
5318
+ //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.28/node_modules/postcss-modules/build/scoping.js
5319
5319
  var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
5320
5320
  Object.defineProperty(exports, "__esModule", { value: true });
5321
5321
  function _export(target, all) {
@@ -5394,7 +5394,7 @@ var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
5394
5394
  }
5395
5395
  }));
5396
5396
  //#endregion
5397
- //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.26/node_modules/postcss-modules/build/pluginFactory.js
5397
+ //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.28/node_modules/postcss-modules/build/pluginFactory.js
5398
5398
  var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
5399
5399
  Object.defineProperty(exports, "__esModule", { value: true });
5400
5400
  Object.defineProperty(exports, "makePlugin", {
@@ -5476,7 +5476,7 @@ var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
5476
5476
  }
5477
5477
  }));
5478
5478
  //#endregion
5479
- //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.26/node_modules/postcss-modules/build/index.js
5479
+ //#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.28/node_modules/postcss-modules/build/index.js
5480
5480
  var require_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5481
5481
  Object.defineProperty(exports, "__esModule", { value: true });
5482
5482
  const _fs = __require("fs");
@@ -9,7 +9,7 @@ import fsp, { constants } from "node:fs/promises";
9
9
  import path, { basename, dirname, extname, isAbsolute, join, normalize, posix, relative, resolve, sep } from "node:path";
10
10
  import { performance as performance$1 } from "node:perf_hooks";
11
11
  import { URL as URL$1, fileURLToPath, pathToFileURL } from "node:url";
12
- import { format, formatWithOptions, inspect, parseEnv, promisify, stripVTControlCharacters } from "node:util";
12
+ import { format, formatWithOptions, inspect, isDeepStrictEqual, parseEnv, promisify, stripVTControlCharacters } from "node:util";
13
13
  import { MessageChannel, Worker } from "node:worker_threads";
14
14
  import pm from "picomatch";
15
15
  import { VERSION as rolldownVersion, rolldown } from "rolldown";
@@ -525,7 +525,7 @@ function splitFileAndPostfix(path) {
525
525
  };
526
526
  }
527
527
  function withTrailingSlash(path) {
528
- if (path[path.length - 1] !== "/") return `${path}/`;
528
+ if (path.at(-1) !== "/") return `${path}/`;
529
529
  return path;
530
530
  }
531
531
  function promiseWithResolvers() {
@@ -628,7 +628,7 @@ var BaseEnvironment = class extends PartialEnvironment {
628
628
  };
629
629
  //#endregion
630
630
  //#region package.json
631
- var version = "8.3.0-beta.0";
631
+ var version = "8.3.0-beta.1";
632
632
  //#endregion
633
633
  //#region src/node/constants.ts
634
634
  const ROLLUP_HOOKS = [
@@ -1752,11 +1752,11 @@ function getDate() {
1752
1752
  function init$1(debug) {
1753
1753
  debug.inspectOpts = Object.assign({}, inspectOpts);
1754
1754
  }
1755
- var require$1, colors$38, inspectOpts, humanize$1, createDebug, node_default;
1755
+ var require$1, colors$37, inspectOpts, humanize$1, createDebug, node_default;
1756
1756
  var init_node = __esmMin((() => {
1757
1757
  init_core();
1758
1758
  require$1 = createRequire(import.meta.url);
1759
- colors$38 = process.stderr.getColorDepth && process.stderr.getColorDepth() > 2 ? [
1759
+ colors$37 = process.stderr.getColorDepth && process.stderr.getColorDepth() > 2 ? [
1760
1760
  20,
1761
1761
  21,
1762
1762
  26,
@@ -1858,7 +1858,7 @@ var init_node = __esmMin((() => {
1858
1858
  } catch (_unused) {
1859
1859
  humanize$1 = humanize;
1860
1860
  }
1861
- createDebug = setup(useColors(), colors$38, log, load, save, formatArgs, init$1);
1861
+ createDebug = setup(useColors(), colors$37, log, load, save, formatArgs, init$1);
1862
1862
  createDebug.inspectOpts = inspectOpts;
1863
1863
  createDebug.formatters.o = function(v) {
1864
1864
  this.inspectOpts.colors = this.useColors;
@@ -2138,7 +2138,7 @@ const knownJsSrcRE = /\.(?:[jt]sx?|m[jt]s|vue|marko|svelte|astro|imba|mdx)(?:$|\
2138
2138
  const isJSRequest = (url) => {
2139
2139
  url = cleanUrl(url);
2140
2140
  if (knownJsSrcRE.test(url)) return true;
2141
- if (!path.extname(url) && url[url.length - 1] !== "/") return true;
2141
+ if (!path.extname(url) && url.at(-1) !== "/") return true;
2142
2142
  return false;
2143
2143
  };
2144
2144
  const isCSSRequest = (request) => CSS_LANGS_RE.test(request);
@@ -2270,7 +2270,7 @@ function numberToPos(source, offset) {
2270
2270
  const lines = source.slice(0, offset).split(splitRE);
2271
2271
  return {
2272
2272
  line: lines.length,
2273
- column: lines[lines.length - 1].length
2273
+ column: lines.at(-1).length
2274
2274
  };
2275
2275
  }
2276
2276
  const MAX_DISPLAY_LEN = 120;
@@ -2527,7 +2527,7 @@ function combineSourcemaps(filename, sourcemapList) {
2527
2527
  return map;
2528
2528
  }
2529
2529
  function unique(arr) {
2530
- return Array.from(new Set(arr));
2530
+ return [...new Set(arr)];
2531
2531
  }
2532
2532
  /**
2533
2533
  * Returns resolved localhost address when `dns.lookup` result differs from DNS
@@ -3175,9 +3175,17 @@ function findNearestPackageData(basedir, packageCache) {
3175
3175
  }
3176
3176
  return null;
3177
3177
  }
3178
+ function isNodeModulesPackageRoot(pkgDir) {
3179
+ const parent = path.dirname(pkgDir);
3180
+ if (path.basename(parent) === "node_modules") return !path.basename(pkgDir).startsWith("@");
3181
+ return path.basename(parent).startsWith("@") && path.basename(path.dirname(parent)) === "node_modules";
3182
+ }
3178
3183
  function findNearestMainPackageData(basedir, packageCache) {
3179
3184
  const nearestPackage = findNearestPackageData(basedir, packageCache);
3180
- return nearestPackage && (nearestPackage.data.name ? nearestPackage : findNearestMainPackageData(path.dirname(nearestPackage.dir), packageCache));
3185
+ if (!nearestPackage) return null;
3186
+ if (isInNodeModules(nearestPackage.dir) && !isNodeModulesPackageRoot(nearestPackage.dir)) return findNearestMainPackageData(path.dirname(nearestPackage.dir), packageCache);
3187
+ if (nearestPackage.data.name) return nearestPackage;
3188
+ return findNearestMainPackageData(path.dirname(nearestPackage.dir), packageCache);
3181
3189
  }
3182
3190
  function loadPackageData(pkgPath) {
3183
3191
  const data = JSON.parse(stripBomTag(fs.readFileSync(pkgPath, "utf-8")));
@@ -6422,7 +6430,7 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6422
6430
  };
6423
6431
  }));
6424
6432
  //#endregion
6425
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/req.js
6433
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/req.js
6426
6434
  var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6427
6435
  const { createRequire: createRequire$1 } = __require("node:module");
6428
6436
  const { fileURLToPath: fileURLToPath$1, pathToFileURL: pathToFileURL$1 } = __require("node:url");
@@ -6464,7 +6472,7 @@ var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6464
6472
  module.exports = req;
6465
6473
  }));
6466
6474
  //#endregion
6467
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/options.js
6475
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/options.js
6468
6476
  var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6469
6477
  const req = require_req();
6470
6478
  /**
@@ -6498,7 +6506,7 @@ var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6498
6506
  module.exports = options;
6499
6507
  }));
6500
6508
  //#endregion
6501
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/plugins.js
6509
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/plugins.js
6502
6510
  var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6503
6511
  const req = require_req();
6504
6512
  /**
@@ -6552,7 +6560,7 @@ var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6552
6560
  module.exports = plugins;
6553
6561
  }));
6554
6562
  //#endregion
6555
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/index.js
6563
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/index.js
6556
6564
  var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6557
6565
  const { resolve: resolve$3 } = __require("node:path");
6558
6566
  const config = require_src$1();
@@ -8181,7 +8189,7 @@ var EnvironmentPluginContainer = class {
8181
8189
  async close() {
8182
8190
  if (this._closed) return;
8183
8191
  this._closed = true;
8184
- await Promise.allSettled(Array.from(this._processesing));
8192
+ await Promise.allSettled([...this._processesing]);
8185
8193
  const config = this.environment.getTopLevelConfig();
8186
8194
  let buildEndError;
8187
8195
  try {
@@ -17431,7 +17439,7 @@ function serveStaticMiddleware(server) {
17431
17439
  }
17432
17440
  const resolvedPathname = redirectedPathname || pathname;
17433
17441
  let fileUrl = path.resolve(dir, removeLeadingSlash(resolvedPathname));
17434
- if (resolvedPathname.endsWith("/") && fileUrl[fileUrl.length - 1] !== "/") fileUrl = withTrailingSlash(fileUrl);
17442
+ if (resolvedPathname.endsWith("/") && fileUrl.at(-1) !== "/") fileUrl = withTrailingSlash(fileUrl);
17435
17443
  if (redirectedPathname) {
17436
17444
  url.pathname = encodeURI(redirectedPathname);
17437
17445
  req.url = url.href.slice(url.origin.length);
@@ -17656,7 +17664,7 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl
17656
17664
  if (processedUrl !== src.value) overwriteAttrValue(s, srcSourceCodeLocation, processedUrl);
17657
17665
  } else if (isModule && node.childNodes.length) addInlineModule(node, "js");
17658
17666
  else if (node.childNodes.length) {
17659
- const scriptNode = node.childNodes[node.childNodes.length - 1];
17667
+ const scriptNode = node.childNodes.at(-1);
17660
17668
  for (const { url, start, end } of extractImportExpressionFromClassicScript(scriptNode)) {
17661
17669
  const processedUrl = processNodeUrl(url, false, config, htmlPath, originalUrl);
17662
17670
  if (processedUrl !== url) s.update(start, end, processedUrl);
@@ -17877,7 +17885,6 @@ function memoryFilesMiddleware(server) {
17877
17885
  const mime = lookup(filePath);
17878
17886
  if (mime) res.setHeader("Content-Type", mime);
17879
17887
  for (const name in headers) res.setHeader(name, headers[name]);
17880
- res.on("finish", () => bundledDev.markPayloadDelivered(filePath));
17881
17888
  return res.end(file.source);
17882
17889
  }
17883
17890
  next();
@@ -19921,7 +19928,6 @@ function triggerLazyBundlingMiddleware(server) {
19921
19928
  }
19922
19929
  if (result == null) return next();
19923
19930
  res.setHeader("Content-Type", "application/javascript");
19924
- res.on("finish", () => bundledDev.markPayloadDelivered(result.filename));
19925
19931
  return res.end(result.code);
19926
19932
  };
19927
19933
  }
@@ -24190,7 +24196,7 @@ function createWebSocketServer(server, config, httpsOptions) {
24190
24196
  },
24191
24197
  [isWebSocketServer]: true,
24192
24198
  get clients() {
24193
- return new Set(Array.from(wss.clients).map(getSocketClient));
24199
+ return new Set([...wss.clients].map(getSocketClient));
24194
24200
  }
24195
24201
  };
24196
24202
  }
@@ -25082,7 +25088,7 @@ function propagateUpdate(node, traversedModules, boundaries, currentChain = [nod
25082
25088
  });
25083
25089
  } else if (!node.importers.size) return true;
25084
25090
  for (const importer of node.importers) {
25085
- const subChain = currentChain.concat(importer);
25091
+ const subChain = [...currentChain, importer];
25086
25092
  if (importer.acceptedHmrDeps.has(node)) {
25087
25093
  boundaries.push({
25088
25094
  boundary: importer,
@@ -25119,7 +25125,7 @@ function isNodeWithinCircularImports(node, nodeChain, currentChain = [node], tra
25119
25125
  if (debugHmr) {
25120
25126
  const importChain = [
25121
25127
  importer,
25122
- ...[...currentChain].reverse(),
25128
+ ...currentChain.toReversed(),
25123
25129
  ...nodeChain.slice(importerIndex, -1).reverse()
25124
25130
  ];
25125
25131
  debugHmr(import_picocolors.default.yellow(`circular imports detected: `) + importChain.map((m) => import_picocolors.default.dim(m.url)).join(" -> "));
@@ -25127,7 +25133,7 @@ function isNodeWithinCircularImports(node, nodeChain, currentChain = [node], tra
25127
25133
  return true;
25128
25134
  }
25129
25135
  if (!currentChain.includes(importer)) {
25130
- const result = isNodeWithinCircularImports(importer, nodeChain, currentChain.concat(importer), traversedModules);
25136
+ const result = isNodeWithinCircularImports(importer, nodeChain, [...currentChain, importer], traversedModules);
25131
25137
  if (result) return result;
25132
25138
  }
25133
25139
  }
@@ -26483,7 +26489,7 @@ function buildImportAnalysisPlugin(config) {
26483
26489
  let url = name;
26484
26490
  if (!url) {
26485
26491
  const rawUrl = code.slice(start, end);
26486
- if (rawUrl[0] === `"` && rawUrl[rawUrl.length - 1] === `"` || rawUrl[0] === "`" && rawUrl[rawUrl.length - 1] === "`") url = rawUrl.slice(1, -1);
26492
+ if (rawUrl[0] === `"` && rawUrl.at(-1) === `"` || rawUrl[0] === "`" && rawUrl.at(-1) === "`") url = rawUrl.slice(1, -1);
26487
26493
  }
26488
26494
  if (!url) continue;
26489
26495
  const normalizedFile = path.posix.join(path.posix.dirname(chunk.fileName), url);
@@ -26550,7 +26556,7 @@ function buildImportAnalysisPlugin(config) {
26550
26556
  let url = name;
26551
26557
  if (!url) {
26552
26558
  const rawUrl = code.slice(start, end);
26553
- if (rawUrl[0] === `"` && rawUrl[rawUrl.length - 1] === `"` || rawUrl[0] === "`" && rawUrl[rawUrl.length - 1] === "`") url = rawUrl.slice(1, -1);
26559
+ if (rawUrl[0] === `"` && rawUrl.at(-1) === `"` || rawUrl[0] === "`" && rawUrl.at(-1) === "`") url = rawUrl.slice(1, -1);
26554
26560
  }
26555
26561
  const deps = /* @__PURE__ */ new Set();
26556
26562
  let hasRemovedPureCssChunk = false;
@@ -27123,7 +27129,7 @@ async function parseImportGlob(code, importer, root, resolveId, logger) {
27123
27129
  } catch {
27124
27130
  return [];
27125
27131
  }
27126
- const tasks = Array.from(cleanCode.matchAll(importGlobRE)).map(async (match, index) => {
27132
+ const tasks = [...cleanCode.matchAll(importGlobRE)].map(async (match, index) => {
27127
27133
  const start = match.index;
27128
27134
  const err = (msg) => {
27129
27135
  const e = /* @__PURE__ */ new Error(`Invalid glob import syntax: ${msg}`);
@@ -28536,7 +28542,7 @@ function oxcResolvePlugin(resolveOptions, overrideEnvConfig, isJsPluginContainer
28536
28542
  isRequire: options.isRequire,
28537
28543
  root: options.root,
28538
28544
  scan: options.scan ?? false,
28539
- mainFields: options.skipMainField ? options.mainFields : options.mainFields.concat(["main"]),
28545
+ mainFields: options.skipMainField ? options.mainFields : [...options.mainFields, "main"],
28540
28546
  conditions: options.conditions,
28541
28547
  externalConditions: options.externalConditions,
28542
28548
  extensions: options.extensions,
@@ -30980,8 +30986,14 @@ const noInlineLinkRels = /* @__PURE__ */ new Set([
30980
30986
  "icon",
30981
30987
  "apple-touch-icon",
30982
30988
  "apple-touch-startup-image",
30983
- "manifest"
30989
+ "manifest",
30990
+ "modulepreload",
30991
+ "preload",
30992
+ "prefetch"
30984
30993
  ]);
30994
+ function getLinkShouldInline(node, attributes) {
30995
+ return node.nodeName === "link" && attributes.rel && parseRelAttr(attributes.rel).some((v) => noInlineLinkRels.has(v)) ? false : void 0;
30996
+ }
30985
30997
  const isAsyncScriptMap = /* @__PURE__ */ new WeakMap();
30986
30998
  function nodeIsElement(node) {
30987
30999
  return node.nodeName[0] !== "#";
@@ -31212,7 +31224,7 @@ function buildHtmlPlugin(config) {
31212
31224
  const processedEncodedUrl = await processSrcSet(attr.value, async ({ url }) => {
31213
31225
  const decodedUrl = decodeURIIfPossible(url);
31214
31226
  if (decodedUrl !== void 0 && !isExcludedUrl(decodedUrl)) {
31215
- const result = await processAssetUrl(url);
31227
+ const result = await processAssetUrl(url, getLinkShouldInline(node, attr.attributes));
31216
31228
  return result !== decodedUrl ? encodeURIPath(result) : url;
31217
31229
  }
31218
31230
  return url;
@@ -31231,13 +31243,10 @@ function buildHtmlPlugin(config) {
31231
31243
  end: node.sourceCodeLocation.endOffset
31232
31244
  });
31233
31245
  js += importExpression;
31234
- } else {
31235
- const shouldInline = node.nodeName === "link" && attr.attributes.rel && parseRelAttr(attr.attributes.rel).some((v) => noInlineLinkRels.has(v)) ? false : void 0;
31236
- assetUrlsPromises.push((async () => {
31237
- const processedUrl = await processAssetUrl(url, shouldInline);
31238
- if (processedUrl !== url) overwriteAttrValue(s, attr.location, partialEncodeURIPath(processedUrl));
31239
- })());
31240
- }
31246
+ } else assetUrlsPromises.push((async () => {
31247
+ const processedUrl = await processAssetUrl(url, getLinkShouldInline(node, attr.attributes));
31248
+ if (processedUrl !== url) overwriteAttrValue(s, attr.location, partialEncodeURIPath(processedUrl));
31249
+ })());
31241
31250
  }
31242
31251
  }
31243
31252
  const inlineStyle = findNeedTransformStyleAttribute(node);
@@ -31732,6 +31741,10 @@ function getImportMap(bundle, options) {
31732
31741
  //#endregion
31733
31742
  //#region src/node/plugins/asset.ts
31734
31743
  const assetUrlRE = /__VITE_ASSET__([\w$]+)__/g;
31744
+ const encodedHashPlaceholderRE = /!~%7B([\w$]{1,17})%7D~/g;
31745
+ function unescapeHashPlaceholders(uri) {
31746
+ return uri.replace(encodedHashPlaceholderRE, "!~{$1}~");
31747
+ }
31735
31748
  const fileUrlMetadata = /* @__PURE__ */ new WeakMap();
31736
31749
  const jsSourceMapRE = /\.[cm]?js\.map$/;
31737
31750
  const noInlineRE = /[?&]no-inline\b/;
@@ -31859,7 +31872,7 @@ function assetPlugin(config) {
31859
31872
  const toRelativeRuntime = createToImportMetaURLBasedRelativeRuntime(format, environment.config.isWorker);
31860
31873
  if ((urlId ? fileUrlMetadata.get(environment)?.get(urlId) : void 0)?.asFileUrl) return toRelativeRuntime(fileName, chunkId).runtime;
31861
31874
  const replacement = toOutputFilePathInJS(environment, fileName, "asset", chunkId, "js", toRelativeRuntime);
31862
- return typeof replacement === "string" ? JSON.stringify(encodeURIPath(replacement)) : replacement.runtime;
31875
+ return typeof replacement === "string" ? JSON.stringify(unescapeHashPlaceholders(encodeURIPath(replacement))) : replacement.runtime;
31863
31876
  },
31864
31877
  renderChunk(code, chunk, opts) {
31865
31878
  const importedFromFileUrl = importedAssetsFromFileUrl.get(this.environment)?.get(chunk.fileName);
@@ -33345,7 +33358,6 @@ async function resolvePlugins(config, prePlugins, normalPlugins, postPlugins) {
33345
33358
  pre: [],
33346
33359
  post: []
33347
33360
  };
33348
- const devtoolsIntegrationPlugin = config.devtools.enabled && !isWorker ? await loadDevToolsIntegrationPlugin(config) : null;
33349
33361
  const { modulePreload } = config.build;
33350
33362
  return [
33351
33363
  optimizedDepsPlugin(),
@@ -33412,21 +33424,11 @@ async function resolvePlugins(config, prePlugins, normalPlugins, postPlugins) {
33412
33424
  importGlobPlugin(config),
33413
33425
  ...postPlugins,
33414
33426
  ...buildPlugins.post,
33415
- devtoolsIntegrationPlugin,
33416
33427
  clientInjectionsPlugin(config),
33417
33428
  cssAnalysisPlugin(config),
33418
33429
  importAnalysisPlugin(config)
33419
33430
  ].filter(Boolean);
33420
33431
  }
33421
- async function loadDevToolsIntegrationPlugin(config) {
33422
- try {
33423
- const { DevToolsIntegration } = await import("@vitejs/devtools/integration");
33424
- return DevToolsIntegration({ config });
33425
- } catch (error) {
33426
- config.logger.error(import_picocolors.default.red(`Failed to load Vite DevTools integration: ${error?.message || error?.stack}`), { error });
33427
- return null;
33428
- }
33429
- }
33430
33432
  function createPluginHookUtils(plugins) {
33431
33433
  const sortedPluginsCache = /* @__PURE__ */ new Map();
33432
33434
  function getSortedPlugins(hookName) {
@@ -34480,7 +34482,7 @@ async function createBuilder(inlineConfig = {}, useLegacyBuilder = false) {
34480
34482
  return output;
34481
34483
  },
34482
34484
  async runDevTools() {
34483
- if (config.devtools.enabled) try {
34485
+ if (config.devtools) try {
34484
34486
  const { runDevTools } = await import("@vitejs/devtools/integration");
34485
34487
  await runDevTools(builder);
34486
34488
  } catch (e) {
@@ -35520,7 +35522,10 @@ function inlineSourceMap(mod, result, startOffset) {
35520
35522
  if (!map || !("version" in map) || code.includes("//# sourceMappingSource=vite-generated")) return result;
35521
35523
  OTHER_SOURCE_MAP_REGEXP.lastIndex = 0;
35522
35524
  if (OTHER_SOURCE_MAP_REGEXP.test(code)) code = code.replace(OTHER_SOURCE_MAP_REGEXP, "");
35523
- const sourceMap = startOffset ? Object.assign({}, map, { mappings: ";".repeat(startOffset) + map.mappings }) : map;
35525
+ const sourceMap = startOffset ? {
35526
+ ...map,
35527
+ mappings: ";".repeat(startOffset) + map.mappings
35528
+ } : map;
35524
35529
  result.code = `${code.trimEnd()}\n//# sourceURL=${mod.id}\n${MODULE_RUNNER_SOURCEMAPPING_SOURCE}\n//# ${SOURCEMAPPING_URL}=${genSourceMapUrl(sourceMap)}\n`;
35525
35530
  return result;
35526
35531
  }
@@ -35601,6 +35606,9 @@ var BundledDev = class {
35601
35606
  this.clients.setupIfNeeded(client, payload.clientId);
35602
35607
  this.devEngine.registerClient(payload.clientId);
35603
35608
  });
35609
+ this.environment.hot.on("vite:bundled-dev:payload-delivered", (payload) => {
35610
+ this.markPayloadDelivered(payload.filename);
35611
+ });
35604
35612
  this.environment.hot.on("vite:client:connect", (_payload, client) => {
35605
35613
  if (this.lastBuildError) {
35606
35614
  debug$1?.("REPLAY: replaying last build error to newly connected client");
@@ -35736,12 +35744,16 @@ var BundledDev = class {
35736
35744
  debug$1?.(`TRIGGER-LAZY: trigger lazy bundling for module ${moduleId} for client ${clientId}`);
35737
35745
  const result = await this.devEngine.compileEntry(moduleId, clientId);
35738
35746
  this.pendingPayloadFilenames.add(result.filename);
35739
- return result;
35747
+ return {
35748
+ filename: result.filename,
35749
+ code: result.code + payloadDeliveredAck(result.filename)
35750
+ };
35740
35751
  }
35741
35752
  /**
35742
- * Called by the serving middlewares when the response for a payload completed.
35743
- * Only delivered payloads are recorded on the server's per-client ship map, so
35744
- * later chunks may omit a module only if the payload carrying it was delivered.
35753
+ * Called when the client reports that it evaluated a payload (the line appended
35754
+ * by `payloadDeliveredAck`). Only then is the payload recorded on the server's
35755
+ * per-client ship map, so later chunks may omit a module only if the client
35756
+ * already registered it.
35745
35757
  *
35746
35758
  * Note: the payload filename is unique across all clients.
35747
35759
  */
@@ -35813,7 +35825,7 @@ var BundledDev = class {
35813
35825
  code: typeof hmrOutput.code === "string" ? "[code]" : hmrOutput.code
35814
35826
  });
35815
35827
  this.pendingPayloadFilenames.add(hmrOutput.filename);
35816
- this.memoryFiles.set(hmrOutput.filename, { source: hmrOutput.code + "\n; export {}" });
35828
+ this.memoryFiles.set(hmrOutput.filename, { source: hmrOutput.code + payloadDeliveredAck(hmrOutput.filename) + "\n; export {}" });
35817
35829
  if (hmrOutput.sourcemapFilename && hmrOutput.sourcemap) this.memoryFiles.set(hmrOutput.sourcemapFilename, { source: hmrOutput.sourcemap });
35818
35830
  client.send({
35819
35831
  type: "bundled-dev-update",
@@ -35845,7 +35857,7 @@ var Clients = class {
35845
35857
  return this.clientToId.get(client);
35846
35858
  }
35847
35859
  getAll() {
35848
- return Array.from(this.idToClient.values());
35860
+ return [...this.idToClient.values()];
35849
35861
  }
35850
35862
  delete(client) {
35851
35863
  const id = this.clientToId.get(client);
@@ -35866,6 +35878,15 @@ function debounce(time, cb) {
35866
35878
  timer = globalThis.setTimeout(cb, time);
35867
35879
  };
35868
35880
  }
35881
+ /**
35882
+ * The line appended to a lazy chunk or HMR patch so the client reports the
35883
+ * payload as delivered once its factories are registered. Placed after the
35884
+ * chunk's tail: if the tail throws, no report is sent and the next payload
35885
+ * simply re-ships those factories, which is safe (registration overwrites).
35886
+ */
35887
+ function payloadDeliveredAck(filename) {
35888
+ return `\n;__rolldown_runtime__.payloadDelivered(${JSON.stringify(filename)});`;
35889
+ }
35869
35890
  //#endregion
35870
35891
  //#region src/node/server/moduleGraph.ts
35871
35892
  var EnvironmentModuleNode = class {
@@ -36447,8 +36468,8 @@ function setupOnCrawlEnd() {
36447
36468
  //#endregion
36448
36469
  //#region src/node/server/environments/runnableEnvironment.ts
36449
36470
  function createRunnableDevEnvironment(name, config, context = {}) {
36450
- if (context.transport == null) context.transport = createServerHotChannel();
36451
- if (context.hot == null) context.hot = true;
36471
+ context.transport ??= createServerHotChannel();
36472
+ context.hot ??= true;
36452
36473
  return new RunnableDevEnvironment(name, config, context);
36453
36474
  }
36454
36475
  function isRunnableDevEnvironment(environment) {
@@ -36553,20 +36574,32 @@ function defaultCreateClientDevEnvironment(name, config, context) {
36553
36574
  function defaultCreateDevEnvironment(name, config) {
36554
36575
  return createRunnableDevEnvironment(name, config);
36555
36576
  }
36556
- async function resolveDevToolsConfig(config, host, logger) {
36557
- const isEnabled = config === true || !!(config && config.enabled);
36558
- const fallbackHostname = (await resolveHostname(host)).host ?? "localhost";
36559
- const fallbackConfig = {
36560
- config: { host: fallbackHostname },
36561
- enabled: false
36562
- };
36563
- if (!isEnabled) return fallbackConfig;
36577
+ function isDevToolsOptionEnabled(config) {
36578
+ return config === true || typeof config === "object" && config != null && config.enabled !== false;
36579
+ }
36580
+ async function resolveDevToolsConfig(config, command) {
36581
+ if (!isDevToolsOptionEnabled(config)) return false;
36582
+ const { isDevToolsEnabled, normalizeDevToolsConfig } = await import("@vitejs/devtools/config");
36583
+ const resolved = normalizeDevToolsConfig(config, void 0);
36584
+ return isDevToolsEnabled(resolved, command) ? resolved : false;
36585
+ }
36586
+ async function loadDevToolsIntegrationPlugins(config, command, options) {
36564
36587
  try {
36565
- const { normalizeDevToolsConfig } = await import("@vitejs/devtools/config");
36566
- return normalizeDevToolsConfig(config, fallbackHostname);
36567
- } catch (e) {
36568
- logger.error(import_picocolors.default.red(`Failed to load Vite DevTools config: ${e.message || e.stack}`), { error: e });
36569
- return fallbackConfig;
36588
+ const resolved = await resolveDevToolsConfig(options, command);
36589
+ if (!resolved) return;
36590
+ const { DevToolsIntegration } = await import("@vitejs/devtools/integration");
36591
+ return {
36592
+ plugins: await DevToolsIntegration({
36593
+ command,
36594
+ devtools: { options }
36595
+ }),
36596
+ resolvedConfig: resolved
36597
+ };
36598
+ } catch (error) {
36599
+ createLogger(config.logLevel, {
36600
+ allowClearScreen: config.clearScreen,
36601
+ customLogger: config.customLogger
36602
+ }).error(import_picocolors.default.red(`Failed to load Vite DevTools integration: ${error?.message || error?.stack}`), { error });
36570
36603
  }
36571
36604
  }
36572
36605
  const configDefaults = Object.freeze({
@@ -36865,7 +36898,9 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
36865
36898
  }, configEnv);
36866
36899
  else return p.apply === command;
36867
36900
  };
36868
- const [prePlugins, normalPlugins, postPlugins] = sortUserPlugins((await asyncFlatten(config.plugins || [])).filter(filterPlugin));
36901
+ const devtoolsOptions = typeof config.devtools === "object" && config.devtools != null ? deepClone(config.devtools) : config.devtools;
36902
+ const devtoolsIntegration = await loadDevToolsIntegrationPlugins(config, command, devtoolsOptions);
36903
+ const [prePlugins, normalPlugins, postPlugins] = sortUserPlugins((await asyncFlatten([...config.plugins || [], ...devtoolsIntegration?.plugins || []])).filter(filterPlugin));
36869
36904
  const isBuild = command === "build";
36870
36905
  const userPlugins = [
36871
36906
  ...prePlugins,
@@ -36873,6 +36908,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
36873
36908
  ...postPlugins
36874
36909
  ];
36875
36910
  config = await runConfigHook(config, userPlugins, configEnv);
36911
+ const devtoolsConfigChanged = !isDeepStrictEqual(config.devtools, devtoolsOptions);
36876
36912
  config.environments ??= {};
36877
36913
  if (!config.environments.ssr && (!isBuild || config.ssr || config.build?.ssr)) config.environments = {
36878
36914
  ssr: {},
@@ -36886,6 +36922,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
36886
36922
  allowClearScreen: config.clearScreen,
36887
36923
  customLogger: config.customLogger
36888
36924
  });
36925
+ if (devtoolsConfigChanged) logger.warn(import_picocolors.default.yellow(`The \`devtools\` option cannot be changed from a plugin's \`config\` hook. Set it in the user config instead.`));
36889
36926
  const tsconfigPathsPlugin = userPlugins.find((p) => p.name === "vite-tsconfig-paths" || p.name === "vite-plugin-tsconfig-paths");
36890
36927
  if (tsconfigPathsPlugin) logger.warnOnce(import_picocolors.default.yellow(`The plugin ${JSON.stringify(tsconfigPathsPlugin.name)} is detected. Vite now supports tsconfig paths resolution natively via the ${import_picocolors.default.bold("resolve.tsconfigPaths")} option. You can remove the plugin and set ${import_picocolors.default.bold("resolve.tsconfigPaths: true")} in your Vite config instead.`));
36891
36928
  if (process.versions.pnp) logger.warnOnce(import_picocolors.default.yellow(`Using Yarn PnP with Vite is discouraged and PnP-specific bugs will no longer be actively worked on. Please switch to a different ${import_picocolors.default.bold("nodeLinker")} mode or to a different package manager.`));
@@ -37048,7 +37085,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
37048
37085
  } else if (config.esbuild === false && config.oxc !== false) logger.warn(import_picocolors.default.yellow("`esbuild` option is set to false, but `oxc` option was not set to false. `esbuild: false` does not have effect any more. If you want to disable the default transformation, which is now handled by Oxc, please set `oxc: false` instead."));
37049
37086
  const experimental = mergeWithDefaults(configDefaults.experimental, config.experimental ?? {});
37050
37087
  if (command === "serve" && experimental.bundledDev) experimental.renderBuiltUrl = void 0;
37051
- const resolvedDevToolsConfig = await resolveDevToolsConfig(config.devtools, server.host, logger);
37088
+ const resolvedDevToolsConfig = devtoolsIntegration?.resolvedConfig ?? false;
37052
37089
  resolved = {
37053
37090
  configFile: configFile ? normalizePath(configFile) : void 0,
37054
37091
  configFileDependencies: configFileDependencies.map((name) => normalizePath(path.resolve(name))),
@@ -1,6 +1,6 @@
1
1
  import { ft as __commonJSMin, pt as __require } from "./node.js";
2
2
  import { t as require_lib } from "./lib.js";
3
- //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/format-import-prelude.js
3
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.28/node_modules/postcss-import/lib/format-import-prelude.js
4
4
  var require_format_import_prelude = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5
5
  module.exports = function formatImportPrelude(layer, media, supports) {
6
6
  const parts = [];
@@ -15,7 +15,7 @@ var require_format_import_prelude = /* @__PURE__ */ __commonJSMin(((exports, mod
15
15
  };
16
16
  }));
17
17
  //#endregion
18
- //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/base64-encoded-import.js
18
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.28/node_modules/postcss-import/lib/base64-encoded-import.js
19
19
  var require_base64_encoded_import = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20
20
  const formatImportPrelude = require_format_import_prelude();
21
21
  module.exports = function base64EncodedConditionalImport(prelude, conditions) {
@@ -28,7 +28,7 @@ var require_base64_encoded_import = /* @__PURE__ */ __commonJSMin(((exports, mod
28
28
  };
29
29
  }));
30
30
  //#endregion
31
- //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/apply-conditions.js
31
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.28/node_modules/postcss-import/lib/apply-conditions.js
32
32
  var require_apply_conditions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
33
33
  const base64EncodedConditionalImport = require_base64_encoded_import();
34
34
  module.exports = function applyConditions(bundle, atRule) {
@@ -103,7 +103,7 @@ var require_apply_conditions = /* @__PURE__ */ __commonJSMin(((exports, module)
103
103
  };
104
104
  }));
105
105
  //#endregion
106
- //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/apply-raws.js
106
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.28/node_modules/postcss-import/lib/apply-raws.js
107
107
  var require_apply_raws = /* @__PURE__ */ __commonJSMin(((exports, module) => {
108
108
  module.exports = function applyRaws(bundle) {
109
109
  bundle.forEach((stmt, index) => {
@@ -114,7 +114,7 @@ var require_apply_raws = /* @__PURE__ */ __commonJSMin(((exports, module) => {
114
114
  };
115
115
  }));
116
116
  //#endregion
117
- //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/apply-styles.js
117
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.28/node_modules/postcss-import/lib/apply-styles.js
118
118
  var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
119
119
  module.exports = function applyStyles(bundle, styles) {
120
120
  styles.nodes = [];
@@ -134,7 +134,7 @@ var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
134
134
  };
135
135
  }));
136
136
  //#endregion
137
- //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/data-url.js
137
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.28/node_modules/postcss-import/lib/data-url.js
138
138
  var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
139
139
  const anyDataURLRegexp = /^data:text\/css(?:;(base64|plain))?,/i;
140
140
  const base64DataURLRegexp = /^data:text\/css;base64,/i;
@@ -153,7 +153,7 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
153
153
  };
154
154
  }));
155
155
  //#endregion
156
- //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/parse-statements.js
156
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.28/node_modules/postcss-import/lib/parse-statements.js
157
157
  var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module) => {
158
158
  const valueParser = require_lib();
159
159
  const { stringify } = valueParser;
@@ -278,7 +278,7 @@ var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module)
278
278
  }
279
279
  }));
280
280
  //#endregion
281
- //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/process-content.js
281
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.28/node_modules/postcss-import/lib/process-content.js
282
282
  var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) => {
283
283
  const path$2 = __require("path");
284
284
  let sugarss;
@@ -312,7 +312,7 @@ var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) =
312
312
  }
313
313
  }));
314
314
  //#endregion
315
- //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/parse-styles.js
315
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.28/node_modules/postcss-import/lib/parse-styles.js
316
316
  var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
317
317
  const path$1 = __require("path");
318
318
  const dataURL = require_data_url();
@@ -416,7 +416,7 @@ var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
416
416
  module.exports = parseStyles;
417
417
  }));
418
418
  //#endregion
419
- //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/index.js
419
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.28/node_modules/postcss-import/index.js
420
420
  var require_postcss_import = /* @__PURE__ */ __commonJSMin(((exports, module) => {
421
421
  const path = __require("path");
422
422
  const applyConditions = require_apply_conditions();
package/dist/node/cli.js CHANGED
@@ -651,7 +651,7 @@ const stopProfiler = (log) => {
651
651
  });
652
652
  };
653
653
  const filterDuplicateOptions = (options) => {
654
- for (const [key, value] of Object.entries(options)) if (Array.isArray(value)) options[key] = value[value.length - 1];
654
+ for (const [key, value] of Object.entries(options)) if (Array.isArray(value)) options[key] = value.at(-1);
655
655
  };
656
656
  /**
657
657
  * removing global flags before passing as command specific sub-configs
@@ -8,6 +8,7 @@ import { parseAst as parseAst$1, parseAstAsync as parseAstAsync$1 } from "rolldo
8
8
  import * as Rollup from "#types/internal/rollupTypeCompat";
9
9
  import { esmExternalRequirePlugin } from "rolldown/plugins";
10
10
  import { ESTree, MinifyOptions, MinifyResult, ParseResult, ParserOptions, TransformOptions as rolldown_utils_TransformOptions, TransformResult as rolldown_utils_TransformResult, Visitor, VisitorObject, minify, minifySync, parse, parseSync } from "rolldown/utils";
11
+ import { DevToolsConfig, ResolvedDevToolsConfig } from "#types/internal/devtoolsOptions";
11
12
  import { DepsOptimizerEsbuildOptions, EsbuildTarget, EsbuildTransformOptions, EsbuildTransformOptions as esbuildOptions_EsbuildTransformOptions, EsbuildTransformResult } from "#types/internal/esbuildOptions";
12
13
  import { ChunkMetadata, CustomPluginOptionsVite } from "#types/metadata";
13
14
  import * as http from "node:http";
@@ -31,59 +32,6 @@ import { LightningCSSOptions, LightningCSSOptions as lightningcssOptions_Lightni
31
32
  import { withFilter } from "rolldown/filter";
32
33
  import { GeneralImportGlobOptions, ImportGlobFunction, ImportGlobOptions, KnownAsTypeMap, KnownQueryTypeMap } from "#types/importGlob";
33
34
  //#endregion
34
- //#region ../../node_modules/.pnpm/@vitejs+devtools@0.5.1_@devframes+json-render@0.9.7_srvx@0.12.7_vite@packages+vite/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
35
- //#region src/node/cli-commands.d.ts
36
- interface StartOptions {
37
- root?: string;
38
- config?: string;
39
- host: string;
40
- port?: string | number;
41
- open?: boolean;
42
- }
43
- //#endregion
44
- //#region ../../node_modules/.pnpm/@vitejs+devtools@0.5.1_@devframes+json-render@0.9.7_srvx@0.12.7_vite@packages+vite/node_modules/@vitejs/devtools/dist/config.d.ts
45
- //#region src/node/config.d.ts
46
- interface DevToolsConfig extends Partial<StartOptions> {
47
- enabled: boolean;
48
- /**
49
- * Vite environments to enable DevTools for. Defaults to all environments.
50
- */
51
- environments?: string[];
52
- /**
53
- * Disable client authentication.
54
- *
55
- * Beware that if you disable client authentication,
56
- * any browsers can connect to the devtools and access to your server and filesystem.
57
- * (including other devices, if you open server `host` option to LAN or WAN)
58
- *
59
- * @default true
60
- */
61
- clientAuth?: boolean;
62
- /**
63
- * Pre-configured auth tokens that are automatically trusted.
64
- *
65
- * Clients connecting with an auth token matching one of these
66
- * will be auto-approved without a terminal prompt.
67
- */
68
- clientAuthTokens?: string[];
69
- /**
70
- * Origins allowed to open the DevTools WebSocket connection, in addition to the built-in
71
- * loopback allowlist (`localhost`, `127.0.0.1`, etc).
72
- *
73
- * The loopback check is a plain string match against the `Origin` header, not a DNS/hosts-file
74
- * resolution — a custom dev hostname that resolves to loopback via `/etc/hosts` or a local DNS
75
- * override (e.g. `dev-my-app.example.com`) is invisible to it and gets rejected. List such
76
- * hostnames here explicitly.
77
- */
78
- allowedOrigins?: string[];
79
- }
80
- interface ResolvedDevToolsConfig {
81
- config: Omit<DevToolsConfig, 'enabled'> & {
82
- host: string;
83
- };
84
- enabled: boolean;
85
- }
86
- //#endregion
87
35
  //#region src/types/alias.d.ts
88
36
  interface Alias {
89
37
  find: string | RegExp;
@@ -1186,9 +1134,10 @@ declare class BundledDev {
1186
1134
  filename: string;
1187
1135
  } | undefined>;
1188
1136
  /**
1189
- * Called by the serving middlewares when the response for a payload completed.
1190
- * Only delivered payloads are recorded on the server's per-client ship map, so
1191
- * later chunks may omit a module only if the payload carrying it was delivered.
1137
+ * Called when the client reports that it evaluated a payload (the line appended
1138
+ * by `payloadDeliveredAck`). Only then is the payload recorded on the server's
1139
+ * per-client ship map, so later chunks may omit a module only if the client
1140
+ * already registered it.
1192
1141
  *
1193
1142
  * Note: the payload filename is unique across all clients.
1194
1143
  */
@@ -3180,7 +3129,7 @@ type ResolveIdFn = (environment: PartialEnvironment, id: string, importer?: stri
3180
3129
  */
3181
3130
  export declare function createIdResolver(config: ResolvedConfig, options?: Partial<InternalResolveOptions>): ResolveIdFn;
3182
3131
  //#endregion
3183
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/index.d.ts
3132
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/index.d.ts
3184
3133
  type ConfigPlugin = Transformer | PostCSS.Plugin | Processor;
3185
3134
  interface Config {
3186
3135
  parser?: string | ProcessOptions['parser'] | false;
@@ -3702,7 +3651,6 @@ interface UserConfig extends DefaultEnvironmentOptions {
3702
3651
  appType?: AppType;
3703
3652
  /**
3704
3653
  * Enable devtools integration. Ensure that `@vitejs/devtools` is installed as a dependency.
3705
- * This feature is currently supported only in build mode.
3706
3654
  * @experimental
3707
3655
  * @default false
3708
3656
  */
@@ -3857,7 +3805,7 @@ interface ResolvedConfig extends Readonly<Omit<UserConfig, "plugins" | "css" | "
3857
3805
  /** @experimental */
3858
3806
  builder: ResolvedBuilderOptions | undefined;
3859
3807
  build: ResolvedBuildOptions;
3860
- devtools: ResolvedDevToolsConfig;
3808
+ devtools: ResolvedDevToolsConfig | false;
3861
3809
  preview: ResolvedPreviewOptions;
3862
3810
  ssr: ResolvedSSROptions;
3863
3811
  assetsInclude: (file: string) => boolean;
@@ -4109,4 +4057,4 @@ export declare const parseAst: typeof parseAst$1;
4109
4057
  export declare const parseAstAsync: typeof parseAstAsync$1;
4110
4058
  export declare const esbuildVersion = "0.25.0";
4111
4059
  //#endregion
4112
- export { type Alias, type AliasOptions, type AnymatchFn, type AnymatchPattern, type AppType, type BindCLIShortcutsOptions, type BuildAppHook, type BuildEnvironmentOptions, type BuildOptions, type BuilderOptions, type CLIShortcut, type CSSModulesOptions, type CSSOptions, type ChunkMetadata, type CommonServerOptions, type ConfigEnv, type ConfigPluginContext, type Connect, type ConnectedPayload, type CorsOptions, type CorsOrigin, type CustomEventMap, type CustomPayload, type CustomPluginOptionsVite, type DepOptimizationConfig, type DepOptimizationMetadata, type DepOptimizationOptions, type DevEnvironmentContext, type DevEnvironmentOptions, type ESBuildOptions, type ESTree, type Environment, type EnvironmentModuleGraph, type EnvironmentModuleNode, type EnvironmentOptions, type ErrorPayload, type EsbuildTransformOptions, type ExperimentalOptions, type ExportsData, type FSWatcher, type FetchFunction, type FetchModuleOptions, type FetchResult, type FetchableDevEnvironment, type FetchableDevEnvironmentContext, type FileSystemServeOptions, type FilterPattern, type FullReloadPayload, type GeneralImportGlobOptions, type HMRPayload, type HTMLOptions, type HmrContext, type HmrOptions, type HookHandler, type HotChannel, type HotChannelClient, type HotChannelListener, type HotPayload, type HotUpdateOptions, type HtmlAssetSource, type HtmlTagDescriptor, type index_d_exports as HttpProxy, type HttpServer, type ImportGlobFunction, type ImportGlobOptions, type IndexHtmlTransform, type IndexHtmlTransformContext, type IndexHtmlTransformHook, type IndexHtmlTransformResult, type InferCustomEventPayload, type InlineConfig, type InternalResolveOptions, type InvalidatePayload, type JsonOptions, type KnownAsTypeMap, type KnownQueryTypeMap, type LegacyOptions, type LessPreprocessorOptions, type LibraryFormats, type LibraryOptions, type LightningCSSOptions, type LogErrorOptions, type LogLevel, type LogOptions, type LogType, type Logger, type LoggerOptions, type Manifest, type ManifestChunk, type MapToFunction, type AnymatchMatcher as Matcher, type MinifyOptions, type MinifyResult, type MinimalPluginContextWithoutEnvironment, type ModuleGraph, type ModuleNode, type ModulePreloadOptions, type ModuleRunnerTransformOptions, type NormalizedHotChannel, type NormalizedHotChannelClient, type NormalizedServerHotChannel, type OptimizedDepInfo, type OxcOptions, type ParseResult, type ParserOptions, type Plugin, type PluginContainer, type PluginHookUtils, type PluginOption, type Config as PostcssUserConfig, type PreprocessCSSResult, type PreviewOptions, type PreviewServer, type PreviewServerHook, type ProxyOptions, type PrunePayload, type RenderBuiltAssetUrl, type ResolveFn, type ResolveModulePreloadDependenciesFn, type ResolveOptions, type ResolvedBuildEnvironmentOptions, type ResolvedBuildOptions, type ResolvedCSSOptions, type ResolvedConfig, type ResolvedDevEnvironmentOptions, type ResolvedModulePreloadOptions, type ResolvedPreviewOptions, type ResolvedSSROptions, type ResolvedServerOptions, type ResolvedServerUrls, type ResolvedUrl, type ResolvedWorkerOptions, type ResolverFunction, type ResolverObject, type Rolldown, type Rollup, type RollupCommonJSOptions, type RollupDynamicImportVarsOptions, type RunnableDevEnvironment, type RunnableDevEnvironmentContext, type SSROptions, type SSRTarget, type SassPreprocessorOptions, type SendOptions, type ServerHook, type ServerHotChannel, type ServerModuleRunnerOptions, type ServerOptions$1 as ServerOptions, type ServerWatchOptions, type SkipInformation, type SsrDepOptimizationConfig, type StylusPreprocessorOptions, type Terser, type TerserOptions, type TransformOptions, type TransformResult, type Update, type UpdatePayload, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, Visitor, type VisitorObject, type ViteBuilder, type ViteDevServer, type WatchOptions, type WebSocket, type WebSocketAlias, type WebSocketClient, type WebSocketCustomListener, type WebSocketServer, type WsOptions, DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_EXTERNAL_CONDITIONS as defaultExternalConditions, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, esmExternalRequirePlugin, minify, minifySync, ssrTransform as moduleRunnerTransform, parse, parseSync, rolldownVersion, VERSION as version, withFilter };
4060
+ export { type Alias, type AliasOptions, type AnymatchFn, type AnymatchPattern, type AppType, type BindCLIShortcutsOptions, type BuildAppHook, type BuildEnvironmentOptions, type BuildOptions, type BuilderOptions, type CLIShortcut, type CSSModulesOptions, type CSSOptions, type ChunkMetadata, type CommonServerOptions, type ConfigEnv, type ConfigPluginContext, type Connect, type ConnectedPayload, type CorsOptions, type CorsOrigin, type CustomEventMap, type CustomPayload, type CustomPluginOptionsVite, type DepOptimizationConfig, type DepOptimizationMetadata, type DepOptimizationOptions, type DevEnvironmentContext, type DevEnvironmentOptions, type ESBuildOptions, type ESTree, type Environment, type EnvironmentModuleGraph, type EnvironmentModuleNode, type EnvironmentOptions, type ErrorPayload, type EsbuildTransformOptions, type ExperimentalOptions, type ExportsData, type FSWatcher, type FetchFunction, type FetchModuleOptions, type FetchResult, type FetchableDevEnvironment, type FetchableDevEnvironmentContext, type FileSystemServeOptions, type FilterPattern, type FullReloadPayload, type GeneralImportGlobOptions, type HMRPayload, type HTMLOptions, type HmrContext, type HmrOptions, type HookHandler, type HotChannel, type HotChannelClient, type HotChannelListener, type HotPayload, type HotUpdateOptions, type HtmlAssetSource, type HtmlTagDescriptor, type index_d_exports as HttpProxy, type HttpServer, type ImportGlobFunction, type ImportGlobOptions, type IndexHtmlTransform, type IndexHtmlTransformContext, type IndexHtmlTransformHook, type IndexHtmlTransformResult, type InferCustomEventPayload, type InlineConfig, type InternalResolveOptions, type InvalidatePayload, type JsonOptions, type KnownAsTypeMap, type KnownQueryTypeMap, type LegacyOptions, type LessPreprocessorOptions, type LibraryFormats, type LibraryOptions, type LightningCSSOptions, type LogErrorOptions, type LogLevel, type LogOptions, type LogType, type Logger, type LoggerOptions, type Manifest, type ManifestChunk, type MapToFunction, type AnymatchMatcher as Matcher, type MinifyOptions, type MinifyResult, type MinimalPluginContextWithoutEnvironment, type ModuleGraph, type ModuleNode, type ModulePreloadOptions, type ModuleRunnerTransformOptions, type NormalizedHotChannel, type NormalizedHotChannelClient, type NormalizedServerHotChannel, type OptimizedDepInfo, type OxcOptions, type ParseResult, type ParserOptions, type Plugin, type PluginContainer, type PluginHookUtils, type PluginOption, type Config as PostcssUserConfig, type PreprocessCSSResult, type PreviewOptions, type PreviewServer, type PreviewServerHook, type ProxyOptions, type PrunePayload, type RenderBuiltAssetUrl, type ResolveFn, type ResolveModulePreloadDependenciesFn, type ResolveOptions, type ResolvedBuildEnvironmentOptions, type ResolvedBuildOptions, type ResolvedCSSOptions, type ResolvedConfig, type ResolvedDevEnvironmentOptions, type ResolvedDevToolsConfig, type ResolvedModulePreloadOptions, type ResolvedPreviewOptions, type ResolvedSSROptions, type ResolvedServerOptions, type ResolvedServerUrls, type ResolvedUrl, type ResolvedWorkerOptions, type ResolverFunction, type ResolverObject, type Rolldown, type Rollup, type RollupCommonJSOptions, type RollupDynamicImportVarsOptions, type RunnableDevEnvironment, type RunnableDevEnvironmentContext, type SSROptions, type SSRTarget, type SassPreprocessorOptions, type SendOptions, type ServerHook, type ServerHotChannel, type ServerModuleRunnerOptions, type ServerOptions$1 as ServerOptions, type ServerWatchOptions, type SkipInformation, type SsrDepOptimizationConfig, type StylusPreprocessorOptions, type Terser, type TerserOptions, type TransformOptions, type TransformResult, type Update, type UpdatePayload, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, Visitor, type VisitorObject, type ViteBuilder, type ViteDevServer, type WatchOptions, type WebSocket, type WebSocketAlias, type WebSocketClient, type WebSocketCustomListener, type WebSocketServer, type WsOptions, DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_EXTERNAL_CONDITIONS as defaultExternalConditions, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, esmExternalRequirePlugin, minify, minifySync, ssrTransform as moduleRunnerTransform, parse, parseSync, rolldownVersion, VERSION as version, withFilter };
@@ -223,7 +223,7 @@ function encodePathChars(filepath) {
223
223
  const posixDirname = dirname, posixResolve = resolve;
224
224
  function posixPathToFileHref(posixPath) {
225
225
  let resolved = posixResolve(posixPath), filePathLast = posixPath.charCodeAt(posixPath.length - 1);
226
- return (filePathLast === 47 || isWindows && filePathLast === 92) && resolved[resolved.length - 1] !== "/" && (resolved += "/"), resolved = encodePathChars(resolved), resolved.includes("?") && (resolved = resolved.replace(questionRegex, "%3F")), resolved.includes("#") && (resolved = resolved.replace(hashRegex, "%23")), new URL(`file://${resolved}`).href;
226
+ return (filePathLast === 47 || isWindows && filePathLast === 92) && resolved.at(-1) !== "/" && (resolved += "/"), resolved = encodePathChars(resolved), resolved.includes("?") && (resolved = resolved.replace(questionRegex, "%3F")), resolved.includes("#") && (resolved = resolved.replace(hashRegex, "%23")), new URL(`file://${resolved}`).href;
227
227
  }
228
228
  function toWindowsPath(path) {
229
229
  return path.replace(/\//g, "\\");
@@ -709,7 +709,7 @@ function analyzeImportedModDifference(mod, rawId, moduleType, metadata) {
709
709
  if (!metadata?.isDynamicImport && metadata?.importedNames?.length) {
710
710
  let missingBindings = metadata.importedNames.filter((s) => !(s in mod));
711
711
  if (missingBindings.length) {
712
- let lastBinding = missingBindings[missingBindings.length - 1];
712
+ let lastBinding = missingBindings.at(-1);
713
713
  throw SyntaxError(moduleType === "module" ? `[vite] The requested module '${rawId}' does not provide an export named '${lastBinding}'` : `\
714
714
  [vite] Named export '${lastBinding}' not found. The requested module '${rawId}' is a CommonJS module, which may not support all module.exports as named exports.
715
715
  CommonJS modules can always be imported via the default export, for example using:
@@ -1165,7 +1165,7 @@ var ModuleRunner = class {
1165
1165
  return !1;
1166
1166
  }
1167
1167
  async cachedRequest(url, mod, callstack = [], metadata) {
1168
- let meta = mod.meta, moduleId = meta.id, importee = callstack[callstack.length - 1];
1168
+ let meta = mod.meta, moduleId = meta.id, importee = callstack.at(-1);
1169
1169
  if (importee && mod.importers.add(importee), mod.evaluated && mod.promise) return this.processImport(await mod.promise, meta, metadata);
1170
1170
  if (mod.promise) return mod.exports && (callstack.includes(moduleId) || this.isCircularRequest(mod, callstack)) ? this.processImport(mod.exports, meta, metadata) : this.processImport(await mod.promise, meta, metadata);
1171
1171
  let debugTimer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "8.3.0-beta.0",
3
+ "version": "8.3.0-beta.1",
4
4
  "description": "Native-ESM powered web dev build tool",
5
5
  "keywords": [
6
6
  "build-tool",
@@ -58,7 +58,7 @@
58
58
  "dependencies": {
59
59
  "lightningcss": "^1.33.0",
60
60
  "picomatch": "^4.0.7",
61
- "postcss": "^8.5.26",
61
+ "postcss": "^8.5.28",
62
62
  "rolldown": "~1.2.6",
63
63
  "tinyglobby": "^0.2.17"
64
64
  },
@@ -73,11 +73,11 @@
73
73
  "@types/escape-html": "^1.0.4",
74
74
  "@types/pnpapi": "^0.0.5",
75
75
  "@vercel/detect-agent": "^1.2.5",
76
- "@vitejs/devtools": "^0.5.1",
76
+ "@vitejs/devtools": "^0.7.1",
77
77
  "@vitest/utils": "4.1.11",
78
78
  "@voidzero-dev/vite-task-client": "^0.2.0",
79
79
  "artichokie": "^0.4.4",
80
- "baseline-browser-mapping": "^2.11.20",
80
+ "baseline-browser-mapping": "^2.11.21",
81
81
  "cac": "^7.0.0",
82
82
  "chokidar": "^3.6.0",
83
83
  "connect": "^3.7.0",
@@ -112,8 +112,8 @@
112
112
  "rolldown-plugin-dts": "^0.28.3",
113
113
  "rollup": "^4.59.0",
114
114
  "rollup-plugin-license": "^3.7.1",
115
- "sass": "^1.103.1",
116
- "sass-embedded": "^1.103.1",
115
+ "sass": "^1.104.0",
116
+ "sass-embedded": "^1.104.0",
117
117
  "sirv": "^3.0.2",
118
118
  "strip-literal": "^4.0.0",
119
119
  "terser": "^5.51.2",
@@ -122,7 +122,7 @@
122
122
  },
123
123
  "peerDependencies": {
124
124
  "@types/node": "^20.19.0 || >=22.12.0",
125
- "@vitejs/devtools": "^0.4.0 || ^0.5.0",
125
+ "@vitejs/devtools": "^0.7.1",
126
126
  "esbuild": "^0.27.0 || ^0.28.0",
127
127
  "jiti": ">=1.21.0",
128
128
  "less": "^4.0.0",
@@ -39,16 +39,10 @@ export interface WebSocketConnectionPayload {
39
39
  }
40
40
 
41
41
  export interface InvalidatePayload {
42
- /**
43
- * Module URL of the invalidated module.
44
- * @remarks This changed from a browser-safe URL to a module URL.
45
- */
42
+ /** Module URL of the invalidated module */
46
43
  path: string
47
44
  message: string | undefined
48
- /**
49
- * Module URL of the first module that invalidated the update.
50
- * @remarks This changed from a browser-safe URL to a module URL.
51
- */
45
+ /** Module URL of the first module that invalidated the update */
52
46
  firstInvalidatedBy: string
53
47
  }
54
48
 
@@ -38,15 +38,9 @@ export interface BundledDevUpdatePayload {
38
38
 
39
39
  export interface Update {
40
40
  type: 'js-update' | 'css-update'
41
- /**
42
- * Module URL of the HMR boundary.
43
- * @remarks This changed from a browser-safe URL to a module URL.
44
- */
41
+ /** Module URL of the HMR boundary */
45
42
  path: string
46
- /**
47
- * Module URL of the accepted module.
48
- * @remarks This changed from a browser-safe URL to a module URL.
49
- */
43
+ /** Module URL of the accepted module */
50
44
  acceptedPath: string
51
45
  timestamp: number
52
46
  /** @internal */
@@ -0,0 +1,9 @@
1
+ /* eslint-disable @typescript-eslint/ban-ts-comment */
2
+
3
+ // @ts-ignore `@vitejs/devtools` may not be installed
4
+ import type * as DevToolsConfig from '@vitejs/devtools/config'
5
+
6
+ /* eslint-enable @typescript-eslint/ban-ts-comment */
7
+
8
+ export type DevToolsConfig = DevToolsConfig.DevToolsConfig
9
+ export type ResolvedDevToolsConfig = DevToolsConfig.ResolvedDevToolsConfig