vite 5.3.0 → 5.3.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.
@@ -36575,8 +36575,8 @@ function createCachedImport(imp) {
36575
36575
  return cached;
36576
36576
  };
36577
36577
  }
36578
- const importPostcssImport = createCachedImport(() => import('./dep-DfBmsS12.js').then(function (n) { return n.i; }));
36579
- const importPostcssModules = createCachedImport(() => import('./dep-C-hCBY92.js').then(function (n) { return n.i; }));
36578
+ const importPostcssImport = createCachedImport(() => import('./dep-Cde5FfFr.js').then(function (n) { return n.i; }));
36579
+ const importPostcssModules = createCachedImport(() => import('./dep-Bn1HdZAl.js').then(function (n) { return n.i; }));
36580
36580
  const importPostcss = createCachedImport(() => import('postcss'));
36581
36581
  const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
36582
36582
  let alwaysFakeWorkerWorkerControllerCache;
@@ -64737,7 +64737,7 @@ const preloadMarker = `__VITE_PRELOAD__`;
64737
64737
  const preloadHelperId = "\0vite/preload-helper.js";
64738
64738
  const preloadMarkerRE = new RegExp(preloadMarker, "g");
64739
64739
  const dynamicImportPrefixRE = /import\s*\(/;
64740
- const dynamicImportTreeshakenRE = /(\b(const|let|var)\s+(\{[^}.]+\})\s*=\s*await\s+import\([^)]+\))|(\(\s*await\s+import\([^)]+\)\s*\)(\??\.[^;[\s]+)+)|\bimport\([^)]+\)(\s*\.then\([^{]*?\(\s*\{([^}.]+)\})/g;
64740
+ const dynamicImportTreeshakenRE = /((?:\bconst\s+|\blet\s+|\bvar\s+|,\s*)(\{[^}.=]+\})\s*=\s*await\s+import\([^)]+\))|(\(\s*await\s+import\([^)]+\)\s*\)(\??\.[\w$]+))|\bimport\([^)]+\)(\s*\.then\(\s*(?:function\s*)?\(\s*\{([^}.=]+)\}\))/g;
64741
64741
  function toRelativePath(filename, importer) {
64742
64742
  const relPath = path$m.posix.relative(path$m.posix.dirname(importer), filename);
64743
64743
  return relPath[0] === "." ? relPath : `./${relPath}`;
@@ -64873,21 +64873,21 @@ function buildImportAnalysisPlugin(config) {
64873
64873
  while (match = dynamicImportTreeshakenRE.exec(source)) {
64874
64874
  if (match[1]) {
64875
64875
  dynamicImports[dynamicImportTreeshakenRE.lastIndex] = {
64876
- declaration: `${match[2]} ${match[3]}`,
64877
- names: match[3]?.trim()
64876
+ declaration: `const ${match[2]}`,
64877
+ names: match[2]?.trim()
64878
64878
  };
64879
64879
  continue;
64880
64880
  }
64881
- if (match[4]) {
64882
- let names2 = match[5].match(/\.([^.?]+)/)?.[1] || "";
64881
+ if (match[3]) {
64882
+ let names2 = match[4].match(/\.([^.?]+)/)?.[1] || "";
64883
64883
  if (names2 === "default") {
64884
64884
  names2 = "default: __vite_default__";
64885
64885
  }
64886
- dynamicImports[dynamicImportTreeshakenRE.lastIndex - match[5]?.length - 1] = { declaration: `const {${names2}}`, names: `{ ${names2} }` };
64886
+ dynamicImports[dynamicImportTreeshakenRE.lastIndex - match[4]?.length - 1] = { declaration: `const {${names2}}`, names: `{ ${names2} }` };
64887
64887
  continue;
64888
64888
  }
64889
- const names = match[7]?.trim();
64890
- dynamicImports[dynamicImportTreeshakenRE.lastIndex - match[6]?.length] = { declaration: `const {${names}}`, names: `{ ${names} }` };
64889
+ const names = match[6]?.trim();
64890
+ dynamicImports[dynamicImportTreeshakenRE.lastIndex - match[5]?.length] = { declaration: `const {${names}}`, names: `{ ${names} }` };
64891
64891
  }
64892
64892
  }
64893
64893
  let s;
@@ -1,4 +1,4 @@
1
- import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-h78lQ5BT.js';
1
+ import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-BcXSligG.js';
2
2
  import require$$0__default from 'fs';
3
3
  import require$$0 from 'postcss';
4
4
  import require$$0$1 from 'path';
@@ -1,4 +1,4 @@
1
- import { B as getDefaultExportFromCjs } from './dep-h78lQ5BT.js';
1
+ import { B as getDefaultExportFromCjs } from './dep-BcXSligG.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-h78lQ5BT.js';
5
+ import { A as colors, v as createLogger, r as resolveConfig } from './chunks/dep-BcXSligG.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-h78lQ5BT.js').then(function (n) { return n.E; });
733
+ const { createServer } = await import('./chunks/dep-BcXSligG.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-h78lQ5BT.js').then(function (n) { return n.F; });
825
+ const { build } = await import('./chunks/dep-BcXSligG.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-h78lQ5BT.js').then(function (n) { return n.D; });
854
+ const { optimizeDeps } = await import('./chunks/dep-BcXSligG.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-h78lQ5BT.js').then(function (n) { return n.G; });
880
+ const { preview } = await import('./chunks/dep-BcXSligG.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-h78lQ5BT.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-h78lQ5BT.js';
2
+ import { i as isInNodeModules, a as arraify } from './chunks/dep-BcXSligG.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-BcXSligG.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "5.3.0",
3
+ "version": "5.3.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",