vite 7.2.4 → 8.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  import "./logger.js";
2
- import { $ as runOptimizeDeps, B as depsLogString, F as addOptimizedDepInfo, G as initDepsOptimizerMetadata, H as extractExportsData, I as cleanupDepsCacheStaleDirs, J as optimizeDeps, K as isDepOptimizationDisabled, L as createIsOptimizedDepFile, P as addManuallyIncludedOptimizeDeps, Q as optimizedDepNeedsInterop, R as createIsOptimizedDepUrl, U as getDepsCacheDir, V as discoverProjectDependencies, W as getOptimizedDepPath, X as optimizedDepInfoFromFile, Y as optimizeExplicitEnvironmentDeps, Z as optimizedDepInfoFromId, et as toDiscoveredDependencies, q as loadCachedDepOptimizationMetadata, z as depsFromOptimizedDepInfo } from "./config.js";
2
+ import { $ as extractExportsData, G as addManuallyIncludedOptimizeDeps, J as createIsOptimizedDepFile, K as addOptimizedDepInfo, Q as discoverProjectDependencies, X as depsFromOptimizedDepInfo, Y as createIsOptimizedDepUrl, Z as depsLogString, at as optimizeDeps, ct as optimizedDepInfoFromId, dt as toDiscoveredDependencies, et as getDepsCacheDir, it as loadCachedDepOptimizationMetadata, lt as optimizedDepNeedsInterop, nt as initDepsOptimizerMetadata, ot as optimizeExplicitEnvironmentDeps, q as cleanupDepsCacheStaleDirs, rt as isDepOptimizationDisabled, st as optimizedDepInfoFromFile, tt as getOptimizedDepPath, ut as runOptimizeDeps } from "./node.js";
3
3
 
4
4
  export { optimizeDeps };
@@ -1,8 +1,8 @@
1
- import { n as __require, t as __commonJS } from "./chunk.js";
1
+ import { i as __require, t as __commonJSMin } from "./chunk.js";
2
2
  import { t as require_lib } from "./lib.js";
3
3
 
4
4
  //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/format-import-prelude.js
5
- var require_format_import_prelude = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/format-import-prelude.js": ((exports, module) => {
5
+ var require_format_import_prelude = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6
6
  module.exports = function formatImportPrelude$2(layer, media, supports) {
7
7
  const parts = [];
8
8
  if (typeof layer !== "undefined") {
@@ -14,11 +14,11 @@ var require_format_import_prelude = /* @__PURE__ */ __commonJS({ "../../node_mod
14
14
  if (typeof media !== "undefined") parts.push(media);
15
15
  return parts.join(" ");
16
16
  };
17
- }) });
17
+ }));
18
18
 
19
19
  //#endregion
20
20
  //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/base64-encoded-import.js
21
- var require_base64_encoded_import = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/base64-encoded-import.js": ((exports, module) => {
21
+ var require_base64_encoded_import = /* @__PURE__ */ __commonJSMin(((exports, module) => {
22
22
  const formatImportPrelude$1 = require_format_import_prelude();
23
23
  module.exports = function base64EncodedConditionalImport$1(prelude, conditions) {
24
24
  if (!conditions?.length) return prelude;
@@ -28,11 +28,11 @@ var require_base64_encoded_import = /* @__PURE__ */ __commonJS({ "../../node_mod
28
28
  for (const condition of conditions) params = `'data:text/css;base64,${Buffer.from(`@import ${params}`).toString("base64")}' ${formatImportPrelude$1(condition.layer, condition.media, condition.supports)}`;
29
29
  return params;
30
30
  };
31
- }) });
31
+ }));
32
32
 
33
33
  //#endregion
34
34
  //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-conditions.js
35
- var require_apply_conditions = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-conditions.js": ((exports, module) => {
35
+ var require_apply_conditions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
36
36
  const base64EncodedConditionalImport = require_base64_encoded_import();
37
37
  module.exports = function applyConditions$1(bundle, atRule) {
38
38
  const firstImportStatementIndex = bundle.findIndex((stmt) => stmt.type === "import");
@@ -104,11 +104,11 @@ var require_apply_conditions = /* @__PURE__ */ __commonJS({ "../../node_modules/
104
104
  delete stmt.node;
105
105
  });
106
106
  };
107
- }) });
107
+ }));
108
108
 
109
109
  //#endregion
110
110
  //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-raws.js
111
- var require_apply_raws = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-raws.js": ((exports, module) => {
111
+ var require_apply_raws = /* @__PURE__ */ __commonJSMin(((exports, module) => {
112
112
  module.exports = function applyRaws$1(bundle) {
113
113
  bundle.forEach((stmt, index) => {
114
114
  if (index === 0) return;
@@ -119,11 +119,11 @@ var require_apply_raws = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
119
119
  } else if (stmt.type === "nodes") stmt.nodes[0].raws.before = stmt.nodes[0].raws.before || "\n";
120
120
  });
121
121
  };
122
- }) });
122
+ }));
123
123
 
124
124
  //#endregion
125
125
  //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-styles.js
126
- var require_apply_styles = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-styles.js": ((exports, module) => {
126
+ var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
127
127
  module.exports = function applyStyles$1(bundle, styles) {
128
128
  styles.nodes = [];
129
129
  bundle.forEach((stmt) => {
@@ -140,11 +140,11 @@ var require_apply_styles = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
140
140
  });
141
141
  });
142
142
  };
143
- }) });
143
+ }));
144
144
 
145
145
  //#endregion
146
146
  //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/data-url.js
147
- var require_data_url = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/data-url.js": ((exports, module) => {
147
+ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
148
148
  const anyDataURLRegexp = /^data:text\/css(?:;(base64|plain))?,/i;
149
149
  const base64DataURLRegexp = /^data:text\/css;base64,/i;
150
150
  const plainDataURLRegexp = /^data:text\/css;plain,/i;
@@ -160,11 +160,11 @@ var require_data_url = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/po
160
160
  isValid,
161
161
  contents
162
162
  };
163
- }) });
163
+ }));
164
164
 
165
165
  //#endregion
166
166
  //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/parse-statements.js
167
- var require_parse_statements = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/parse-statements.js": ((exports, module) => {
167
+ var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module) => {
168
168
  const valueParser = require_lib();
169
169
  const { stringify } = valueParser;
170
170
  module.exports = function parseStatements$1(result, styles, conditions, from) {
@@ -286,11 +286,11 @@ var require_parse_statements = /* @__PURE__ */ __commonJS({ "../../node_modules/
286
286
  from
287
287
  };
288
288
  }
289
- }) });
289
+ }));
290
290
 
291
291
  //#endregion
292
292
  //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/process-content.js
293
- var require_process_content = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/process-content.js": ((exports, module) => {
293
+ var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) => {
294
294
  const path$2 = __require("path");
295
295
  let sugarss;
296
296
  module.exports = function processContent$1(result, content, filename, options, postcss) {
@@ -321,11 +321,11 @@ var require_process_content = /* @__PURE__ */ __commonJS({ "../../node_modules/.
321
321
  return runPostcss(postcss, content, filename, plugins, parsers, index);
322
322
  });
323
323
  }
324
- }) });
324
+ }));
325
325
 
326
326
  //#endregion
327
327
  //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/parse-styles.js
328
- var require_parse_styles = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/parse-styles.js": ((exports, module) => {
328
+ var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
329
329
  const path$1 = __require("path");
330
330
  const dataURL = require_data_url();
331
331
  const parseStatements = require_parse_statements();
@@ -425,11 +425,11 @@ var require_parse_styles = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
425
425
  return true;
426
426
  }
427
427
  module.exports = parseStyles$1;
428
- }) });
428
+ }));
429
429
 
430
430
  //#endregion
431
431
  //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/index.js
432
- var require_postcss_import = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/index.js": ((exports, module) => {
432
+ var require_postcss_import = /* @__PURE__ */ __commonJSMin(((exports, module) => {
433
433
  const path = __require("path");
434
434
  const applyConditions = require_apply_conditions();
435
435
  const applyRaws = require_apply_raws();
@@ -471,7 +471,7 @@ var require_postcss_import = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
471
471
  }
472
472
  AtImport.postcss = true;
473
473
  module.exports = AtImport;
474
- }) });
474
+ }));
475
475
 
476
476
  //#endregion
477
477
  export default require_postcss_import();
@@ -1,4 +1,4 @@
1
1
  import "./logger.js";
2
- import { d as resolvePreviewOptions, u as preview } from "./config.js";
2
+ import { b as preview, x as resolvePreviewOptions } from "./node.js";
3
3
 
4
4
  export { preview };
@@ -1,4 +1,4 @@
1
1
  import "./logger.js";
2
- import { at as _createServer, ct as resolveServerOptions, lt as restartServerWithUrls, ot as createServer, st as createServerCloseFn, ut as serverConfigDefaults } from "./config.js";
2
+ import { _t as restartServerWithUrls, gt as resolveServerOptions, ht as createServerCloseFn, mt as createServer, pt as _createServer, vt as serverConfigDefaults } from "./node.js";
3
3
 
4
4
  export { createServer };
package/dist/node/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as __toESM } from "./chunks/chunk.js";
1
+ import { s as __toESM } from "./chunks/chunk.js";
2
2
  import { N as VERSION, R as require_picocolors, n as createLogger } from "./chunks/logger.js";
3
3
  import fs from "node:fs";
4
4
  import path from "node:path";
@@ -564,7 +564,7 @@ const convertBase = (v) => {
564
564
  if (v === 0) return "";
565
565
  return v;
566
566
  };
567
- cli.option("-c, --config <file>", `[string] use specified config file`).option("--base <path>", `[string] public base path (default: /)`, { type: [convertBase] }).option("-l, --logLevel <level>", `[string] info | warn | error | silent`).option("--clearScreen", `[boolean] allow/disable clear screen when logging`).option("--configLoader <loader>", `[string] use 'bundle' to bundle the config with esbuild, or 'runner' (experimental) to process it on the fly, or 'native' (experimental) to load using the native runtime (default: bundle)`).option("-d, --debug [feat]", `[string | boolean] show debug logs`).option("-f, --filter <filter>", `[string] filter debug logs`).option("-m, --mode <mode>", `[string] set env mode`);
567
+ cli.option("-c, --config <file>", `[string] use specified config file`).option("--base <path>", `[string] public base path (default: /)`, { type: [convertBase] }).option("-l, --logLevel <level>", `[string] info | warn | error | silent`).option("--clearScreen", `[boolean] allow/disable clear screen when logging`).option("--configLoader <loader>", `[string] use 'bundle' to bundle the config with Rolldown, or 'runner' (experimental) to process it on the fly, or 'native' (experimental) to load using the native runtime (default: bundle)`).option("-d, --debug [feat]", `[string | boolean] show debug logs`).option("-f, --filter <filter>", `[string] filter debug logs`).option("-m, --mode <mode>", `[string] set env mode`);
568
568
  cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--host [host]", `[string] specify hostname`, { type: [convertHost] }).option("--port <port>", `[number] specify port`).option("--open [path]", `[boolean | string] open browser on startup`).option("--cors", `[boolean] enable CORS`).option("--strictPort", `[boolean] exit if specified port is already in use`).option("--force", `[boolean] force the optimizer to ignore the cache and re-bundle`).action(async (root, options) => {
569
569
  filterDuplicateOptions(options);
570
570
  const { createServer } = await import("./chunks/server.js");
@@ -646,7 +646,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
646
646
  });
647
647
  cli.command("optimize [root]", "pre-bundle dependencies (deprecated, the pre-bundle process runs automatically and does not need to be called)").option("--force", `[boolean] force the optimizer to ignore the cache and re-bundle`).action(async (root, options) => {
648
648
  filterDuplicateOptions(options);
649
- const { resolveConfig } = await import("./chunks/config2.js");
649
+ const { resolveConfig } = await import("./chunks/config.js");
650
650
  const { optimizeDeps } = await import("./chunks/optimizer.js");
651
651
  try {
652
652
  await optimizeDeps(await resolveConfig({