vite 6.1.0-beta.2 → 6.1.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.
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 { O as colors, I as createLogger, r as resolveConfig } from './chunks/dep-De0zV__s.js';
5
+ import { O as colors, I as createLogger, r as resolveConfig } from './chunks/dep-Cg8OuIew.js';
6
6
  import { VERSION } from './constants.js';
7
7
  import 'node:fs/promises';
8
8
  import 'node:url';
@@ -24,6 +24,7 @@ import 'stream';
24
24
  import 'os';
25
25
  import 'child_process';
26
26
  import 'node:os';
27
+ import 'node:net';
27
28
  import 'node:dns';
28
29
  import 'vite/module-runner';
29
30
  import 'rollup/parseAst';
@@ -40,7 +41,6 @@ import 'zlib';
40
41
  import 'buffer';
41
42
  import 'https';
42
43
  import 'tls';
43
- import 'node:net';
44
44
  import 'assert';
45
45
  import 'node:querystring';
46
46
  import 'node:zlib';
@@ -738,14 +738,14 @@ cli.option("-c, --config <file>", `[string] use specified config file`).option("
738
738
  type: [convertBase]
739
739
  }).option("-l, --logLevel <level>", `[string] info | warn | error | silent`).option("--clearScreen", `[boolean] allow/disable clear screen when logging`).option(
740
740
  "--configLoader <loader>",
741
- `[string] use 'bundle' to bundle the config with esbuild or 'runner' (experimental) to process it on the fly (default: bundle)`
741
+ `[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)`
742
742
  ).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`);
743
743
  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(
744
744
  "--force",
745
745
  `[boolean] force the optimizer to ignore the cache and re-bundle`
746
746
  ).action(async (root, options) => {
747
747
  filterDuplicateOptions(options);
748
- const { createServer } = await import('./chunks/dep-De0zV__s.js').then(function (n) { return n.S; });
748
+ const { createServer } = await import('./chunks/dep-Cg8OuIew.js').then(function (n) { return n.S; });
749
749
  try {
750
750
  const server = await createServer({
751
751
  root,
@@ -839,7 +839,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
839
839
  ).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--app", `[boolean] same as \`builder: {}\``).action(
840
840
  async (root, options) => {
841
841
  filterDuplicateOptions(options);
842
- const { createBuilder } = await import('./chunks/dep-De0zV__s.js').then(function (n) { return n.T; });
842
+ const { createBuilder } = await import('./chunks/dep-Cg8OuIew.js').then(function (n) { return n.T; });
843
843
  const buildOptions = cleanGlobalCLIOptions(
844
844
  cleanBuilderCLIOptions(options)
845
845
  );
@@ -869,13 +869,16 @@ ${e.stack}`),
869
869
  }
870
870
  }
871
871
  );
872
- cli.command("optimize [root]", "pre-bundle dependencies").option(
872
+ cli.command(
873
+ "optimize [root]",
874
+ "pre-bundle dependencies (deprecated, the pre-bundle process runs automatically and does not need to be called)"
875
+ ).option(
873
876
  "--force",
874
877
  `[boolean] force the optimizer to ignore the cache and re-bundle`
875
878
  ).action(
876
879
  async (root, options) => {
877
880
  filterDuplicateOptions(options);
878
- const { optimizeDeps } = await import('./chunks/dep-De0zV__s.js').then(function (n) { return n.R; });
881
+ const { optimizeDeps } = await import('./chunks/dep-Cg8OuIew.js').then(function (n) { return n.R; });
879
882
  try {
880
883
  const config = await resolveConfig(
881
884
  {
@@ -902,7 +905,7 @@ ${e.stack}`),
902
905
  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(
903
906
  async (root, options) => {
904
907
  filterDuplicateOptions(options);
905
- const { preview } = await import('./chunks/dep-De0zV__s.js').then(function (n) { return n.U; });
908
+ const { preview } = await import('./chunks/dep-Cg8OuIew.js').then(function (n) { return n.U; });
906
909
  try {
907
910
  const server = await preview({
908
911
  root,
@@ -1025,6 +1025,8 @@ interface DepOptimizationMetadata {
1025
1025
  /**
1026
1026
  * Scan and optimize dependencies within a project.
1027
1027
  * Used by Vite CLI when running `vite optimize`.
1028
+ *
1029
+ * @deprecated the optimization process runs automatically and does not need to be called
1028
1030
  */
1029
1031
  declare function optimizeDeps(config: ResolvedConfig, force?: boolean | undefined, asCommand?: boolean): Promise<DepOptimizationMetadata>;
1030
1032
 
@@ -3962,7 +3964,7 @@ interface ResolvedWorkerOptions {
3962
3964
  interface InlineConfig extends UserConfig {
3963
3965
  configFile?: string | false;
3964
3966
  /** @experimental */
3965
- configLoader?: 'bundle' | 'runner';
3967
+ configLoader?: 'bundle' | 'runner' | 'native';
3966
3968
  envFile?: false;
3967
3969
  forceOptimizeDeps?: boolean;
3968
3970
  }
@@ -4024,7 +4026,7 @@ declare function resolveConfig(inlineConfig: InlineConfig, command: 'build' | 's
4024
4026
 
4025
4027
  ): Promise<ResolvedConfig>;
4026
4028
  declare function sortUserPlugins(plugins: (Plugin | Plugin[])[] | undefined): [Plugin[], Plugin[], Plugin[]];
4027
- declare function loadConfigFromFile(configEnv: ConfigEnv, configFile?: string, configRoot?: string, logLevel?: LogLevel, customLogger?: Logger, configLoader?: 'bundle' | 'runner'): Promise<{
4029
+ declare function loadConfigFromFile(configEnv: ConfigEnv, configFile?: string, configRoot?: string, logLevel?: LogLevel, customLogger?: Logger, configLoader?: 'bundle' | 'runner' | 'native'): Promise<{
4028
4030
  path: string;
4029
4031
  config: UserConfig;
4030
4032
  dependencies: string[];
@@ -1,6 +1,6 @@
1
1
  export { parseAst, parseAstAsync } from 'rollup/parseAst';
2
- import { i as isInNodeModules, a as arraify } from './chunks/dep-De0zV__s.js';
3
- export { B as BuildEnvironment, D as DevEnvironment, f as build, m as buildErrorMessage, g as createBuilder, F as createFilter, h as createIdResolver, I as createLogger, n as createRunnableDevEnvironment, c as createServer, y as createServerHotChannel, w as createServerModuleRunner, x as createServerModuleRunnerTransport, d as defineConfig, v as fetchModule, j as formatPostcssSourceMap, L as isFileLoadingAllowed, K as isFileServingAllowed, q as isRunnableDevEnvironment, l as loadConfigFromFile, M as loadEnv, E as mergeAlias, C as mergeConfig, z as moduleRunnerTransform, A as normalizePath, o as optimizeDeps, p as perEnvironmentPlugin, b as perEnvironmentState, k as preprocessCSS, e as preview, r as resolveConfig, N as resolveEnvPrefix, G as rollupVersion, u as runnerImport, J as searchForWorkspaceRoot, H as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-De0zV__s.js';
2
+ import { i as isInNodeModules, a as arraify } from './chunks/dep-Cg8OuIew.js';
3
+ export { B as BuildEnvironment, D as DevEnvironment, f as build, m as buildErrorMessage, g as createBuilder, F as createFilter, h as createIdResolver, I as createLogger, n as createRunnableDevEnvironment, c as createServer, y as createServerHotChannel, w as createServerModuleRunner, x as createServerModuleRunnerTransport, d as defineConfig, v as fetchModule, j as formatPostcssSourceMap, L as isFileLoadingAllowed, K as isFileServingAllowed, q as isRunnableDevEnvironment, l as loadConfigFromFile, M as loadEnv, E as mergeAlias, C as mergeConfig, z as moduleRunnerTransform, A as normalizePath, o as optimizeDeps, p as perEnvironmentPlugin, b as perEnvironmentState, k as preprocessCSS, e as preview, r as resolveConfig, N as resolveEnvPrefix, G as rollupVersion, u as runnerImport, J as searchForWorkspaceRoot, H as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-Cg8OuIew.js';
4
4
  export { defaultAllowedOrigins, DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, VERSION as version } from './constants.js';
5
5
  export { version as esbuildVersion } from 'esbuild';
6
6
  import 'node:fs';
@@ -26,6 +26,7 @@ import 'stream';
26
26
  import 'os';
27
27
  import 'child_process';
28
28
  import 'node:os';
29
+ import 'node:net';
29
30
  import 'node:dns';
30
31
  import 'vite/module-runner';
31
32
  import 'module';
@@ -41,7 +42,6 @@ import 'zlib';
41
42
  import 'buffer';
42
43
  import 'https';
43
44
  import 'tls';
44
- import 'node:net';
45
45
  import 'assert';
46
46
  import 'node:querystring';
47
47
  import 'node:zlib';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "6.1.0-beta.2",
3
+ "version": "6.1.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -73,7 +73,7 @@
73
73
  "//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
74
74
  "dependencies": {
75
75
  "esbuild": "^0.24.2",
76
- "postcss": "^8.5.1",
76
+ "postcss": "^8.5.2",
77
77
  "rollup": "^4.30.1"
78
78
  },
79
79
  "optionalDependencies": {
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "devDependencies": {
83
83
  "@ampproject/remapping": "^2.3.0",
84
- "@babel/parser": "^7.26.7",
84
+ "@babel/parser": "^7.26.9",
85
85
  "@jridgewell/trace-mapping": "^0.3.25",
86
86
  "@polka/compression": "^1.0.0-next.25",
87
87
  "@rollup/plugin-alias": "^5.1.1",
@@ -108,15 +108,15 @@
108
108
  "estree-walker": "^3.0.3",
109
109
  "etag": "^1.8.1",
110
110
  "http-proxy": "^1.18.1",
111
- "launch-editor-middleware": "^2.9.1",
111
+ "launch-editor-middleware": "^2.10.0",
112
112
  "lightningcss": "^1.29.1",
113
113
  "magic-string": "^0.30.17",
114
114
  "mlly": "^1.7.4",
115
- "mrmime": "^2.0.0",
116
- "nanoid": "^5.0.9",
115
+ "mrmime": "^2.0.1",
116
+ "nanoid": "^5.1.0",
117
117
  "open": "^10.1.0",
118
118
  "parse5": "^7.2.1",
119
- "pathe": "^2.0.2",
119
+ "pathe": "^2.0.3",
120
120
  "periscopic": "^4.0.2",
121
121
  "picocolors": "^1.1.1",
122
122
  "picomatch": "^4.0.2",
@@ -125,16 +125,16 @@
125
125
  "postcss-modules": "^6.0.1",
126
126
  "resolve.exports": "^2.0.3",
127
127
  "rollup-plugin-dts": "^6.1.1",
128
- "rollup-plugin-esbuild": "^6.1.1",
129
- "rollup-plugin-license": "^3.5.3",
130
- "sass": "^1.83.4",
131
- "sass-embedded": "^1.83.4",
132
- "sirv": "^3.0.0",
128
+ "rollup-plugin-esbuild": "^6.2.0",
129
+ "rollup-plugin-license": "^3.6.0",
130
+ "sass": "^1.85.0",
131
+ "sass-embedded": "^1.85.0",
132
+ "sirv": "^3.0.1",
133
133
  "source-map-support": "^0.5.21",
134
134
  "strip-literal": "^3.0.0",
135
- "terser": "^5.37.0",
136
- "tinyglobby": "^0.2.10",
137
- "tsconfck": "^3.1.4",
135
+ "terser": "^5.39.0",
136
+ "tinyglobby": "^0.2.11",
137
+ "tsconfck": "^3.1.5",
138
138
  "tslib": "^2.8.1",
139
139
  "types": "link:./types",
140
140
  "ufo": "^1.5.4",