vite 8.1.5 → 8.2.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,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.1.1_postcss@8.5.17/node_modules/postcss-import/lib/format-import-prelude.js
3
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/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.1.1_postcss@8.5.17/node_modules/postcss-import/lib/base64-encoded-import.js
18
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/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.1.1_postcss@8.5.17/node_modules/postcss-import/lib/apply-conditions.js
31
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/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.1.1_postcss@8.5.17/node_modules/postcss-import/lib/apply-raws.js
106
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/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) => {
@@ -117,7 +117,7 @@ var require_apply_raws = /* @__PURE__ */ __commonJSMin(((exports, module) => {
117
117
  };
118
118
  }));
119
119
  //#endregion
120
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.17/node_modules/postcss-import/lib/apply-styles.js
120
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/node_modules/postcss-import/lib/apply-styles.js
121
121
  var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
122
122
  module.exports = function applyStyles(bundle, styles) {
123
123
  styles.nodes = [];
@@ -137,7 +137,7 @@ var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
137
137
  };
138
138
  }));
139
139
  //#endregion
140
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.17/node_modules/postcss-import/lib/data-url.js
140
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/node_modules/postcss-import/lib/data-url.js
141
141
  var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
142
142
  const anyDataURLRegexp = /^data:text\/css(?:;(base64|plain))?,/i;
143
143
  const base64DataURLRegexp = /^data:text\/css;base64,/i;
@@ -156,7 +156,7 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
156
156
  };
157
157
  }));
158
158
  //#endregion
159
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.17/node_modules/postcss-import/lib/parse-statements.js
159
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/node_modules/postcss-import/lib/parse-statements.js
160
160
  var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module) => {
161
161
  const valueParser = require_lib();
162
162
  const { stringify } = valueParser;
@@ -281,7 +281,7 @@ var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module)
281
281
  }
282
282
  }));
283
283
  //#endregion
284
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.17/node_modules/postcss-import/lib/process-content.js
284
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/node_modules/postcss-import/lib/process-content.js
285
285
  var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) => {
286
286
  const path$2 = __require("path");
287
287
  let sugarss;
@@ -315,7 +315,7 @@ var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) =
315
315
  }
316
316
  }));
317
317
  //#endregion
318
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.17/node_modules/postcss-import/lib/parse-styles.js
318
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/node_modules/postcss-import/lib/parse-styles.js
319
319
  var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
320
320
  const path$1 = __require("path");
321
321
  const dataURL = require_data_url();
@@ -418,7 +418,7 @@ var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
418
418
  module.exports = parseStyles;
419
419
  }));
420
420
  //#endregion
421
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.17/node_modules/postcss-import/index.js
421
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/node_modules/postcss-import/index.js
422
422
  var require_postcss_import = /* @__PURE__ */ __commonJSMin(((exports, module) => {
423
423
  const path = __require("path");
424
424
  const applyConditions = require_apply_conditions();
@@ -24,12 +24,13 @@ import { ZlibOptions } from "node:zlib";
24
24
  import { ChunkMetadata, CustomPluginOptionsVite } from "#types/metadata";
25
25
  import { Terser, TerserMinifyOptions } from "#types/internal/terserOptions";
26
26
  import * as PostCSS from "postcss";
27
+ import { ProcessOptions, Processor, Transformer } from "postcss";
27
28
  import { LightningCSSOptions, LightningCSSOptions as lightningcssOptions_LightningCSSOptions } from "#types/internal/lightningcssOptions";
28
29
  import { LessPreprocessorBaseOptions, SassModernPreprocessBaseOptions, StylusPreprocessorBaseOptions } from "#types/internal/cssPreprocessorOptions";
29
30
  import { withFilter } from "rolldown/filter";
30
31
  import { GeneralImportGlobOptions, ImportGlobFunction, ImportGlobOptions, KnownAsTypeMap, KnownQueryTypeMap } from "#types/importGlob";
31
32
  //#endregion
32
- //#region ../../node_modules/.pnpm/@vitejs+devtools@0.3.4_typescript@6.0.3_vite@packages+vite/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
33
+ //#region ../../node_modules/.pnpm/@vitejs+devtools@0.4.1_crossws@0.4.10_srvx@0.11.15_typescript@6.0.3_valibot@1.4.2_vite@packages+vite/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
33
34
  //#region src/node/cli-commands.d.ts
34
35
  interface StartOptions {
35
36
  root?: string;
@@ -39,7 +40,7 @@ interface StartOptions {
39
40
  open?: boolean;
40
41
  }
41
42
  //#endregion
42
- //#region ../../node_modules/.pnpm/@vitejs+devtools@0.3.4_typescript@6.0.3_vite@packages+vite/node_modules/@vitejs/devtools/dist/config.d.ts
43
+ //#region ../../node_modules/.pnpm/@vitejs+devtools@0.4.1_crossws@0.4.10_srvx@0.11.15_typescript@6.0.3_valibot@1.4.2_vite@packages+vite/node_modules/@vitejs/devtools/dist/config.d.ts
43
44
  //#region src/node/config.d.ts
44
45
  interface DevToolsConfig extends Partial<StartOptions> {
45
46
  enabled: boolean;
@@ -1628,22 +1629,28 @@ declare class BundledDev {
1628
1629
  private initialBuildCompleted;
1629
1630
  private _closed;
1630
1631
  private clients;
1631
- private invalidateCalledModules;
1632
1632
  private debouncedFullReload;
1633
1633
  private fullReloadPending;
1634
1634
  private lastBuildError;
1635
1635
  memoryFiles: MemoryFiles;
1636
1636
  constructor(environment: DevEnvironment);
1637
1637
  private get devEngine();
1638
+ private pendingPayloadFilenames;
1638
1639
  listen(): Promise<void>;
1639
1640
  private waitForInitialBuildFinish;
1640
- invalidateModule(m: {
1641
- path: string;
1642
- message?: string;
1643
- firstInvalidatedBy: string;
1644
- }, client: NormalizedHotChannelClient): Promise<void>;
1645
1641
  triggerBundleRegenerationIfStale(): Promise<boolean>;
1646
- triggerLazyBundling(moduleId: string | null, clientId: string | null): Promise<string | undefined>;
1642
+ triggerLazyBundling(moduleId: string | null, clientId: string | null): Promise<{
1643
+ code: string;
1644
+ filename: string;
1645
+ } | undefined>;
1646
+ /**
1647
+ * Called by the serving middlewares when the response for a payload completed.
1648
+ * Only delivered payloads are recorded on the server's per-client ship map, so
1649
+ * later chunks may omit a module only if the payload carrying it was delivered.
1650
+ *
1651
+ * Note: the payload filename is unique across all clients.
1652
+ */
1653
+ markPayloadDelivered(filename: string): void;
1647
1654
  close(): Promise<void>;
1648
1655
  private storeOutputFiles;
1649
1656
  private getRolldownOptions;
@@ -2002,7 +2009,6 @@ interface ResolveOptions extends EnvironmentResolveOptions {
2002
2009
  * Enable tsconfig paths resolution
2003
2010
  *
2004
2011
  * @default false
2005
- * @experimental
2006
2012
  */
2007
2013
  tsconfigPaths?: boolean;
2008
2014
  }
@@ -2280,9 +2286,10 @@ interface BuildEnvironmentOptions {
2280
2286
  type BuildOptions = BuildEnvironmentOptions;
2281
2287
  interface LibraryOptions {
2282
2288
  /**
2283
- * Path of library entry
2289
+ * Path of library entry.
2290
+ * Defaults to the top-level `input` option when omitted.
2284
2291
  */
2285
- entry: InputOption;
2292
+ entry?: InputOption;
2286
2293
  /**
2287
2294
  * The name of the exposed global variable. Required when the `formats` option includes
2288
2295
  * `umd` or `iife`
@@ -2759,6 +2766,13 @@ interface ViteDevServer {
2759
2766
  interface ResolvedServerUrls {
2760
2767
  local: string[];
2761
2768
  network: string[];
2769
+ /**
2770
+ * Names of the network interface that each {@link ResolvedServerUrls.network}
2771
+ * URL is bound to, in the same order as `network`. An entry is `undefined`
2772
+ * when the interface name is not known, for example when an explicit `host`
2773
+ * is set.
2774
+ */
2775
+ networkInterfaceNames?: (string | undefined)[];
2762
2776
  }
2763
2777
  declare function createServer(inlineConfig?: InlineConfig | ResolvedConfig): Promise<ViteDevServer>;
2764
2778
  //#endregion
@@ -3083,6 +3097,18 @@ type ResolveIdFn = (environment: PartialEnvironment, id: string, importer?: stri
3083
3097
  */
3084
3098
  declare function createIdResolver(config: ResolvedConfig, options?: Partial<InternalResolveOptions>): ResolveIdFn;
3085
3099
  //#endregion
3100
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.20_tsx@4.23.1_yaml@2.9.0/node_modules/postcss-load-config/src/index.d.ts
3101
+ type ConfigPlugin = Transformer | PostCSS.Plugin | Processor;
3102
+ interface Config {
3103
+ parser?: string | ProcessOptions['parser'] | false;
3104
+ stringifier?: string | ProcessOptions['stringifier'] | false;
3105
+ syntax?: string | ProcessOptions['syntax'] | false;
3106
+ map?: string | false;
3107
+ from?: string;
3108
+ to?: string;
3109
+ plugins?: Array<ConfigPlugin | false> | Record<string, object | false>;
3110
+ }
3111
+ //#endregion
3086
3112
  //#region src/node/plugins/css.d.ts
3087
3113
  interface CSSOptions {
3088
3114
  /**
@@ -3376,6 +3402,12 @@ type AllResolveOptions = ResolveOptions & {
3376
3402
  alias?: AliasOptions;
3377
3403
  };
3378
3404
  interface SharedEnvironmentOptions {
3405
+ /**
3406
+ * Entry points of the application.
3407
+ *
3408
+ * Paths are resolved relative to the project root.
3409
+ */
3410
+ input?: InputOption;
3379
3411
  /**
3380
3412
  * Define global variable replacements.
3381
3413
  * Entries will be defined on `window` during dev and replaced during build.
@@ -3423,6 +3455,7 @@ interface EnvironmentOptions extends SharedEnvironmentOptions {
3423
3455
  }
3424
3456
  type ResolvedResolveOptions = Required<ResolveOptions>;
3425
3457
  type ResolvedEnvironmentOptions = {
3458
+ input?: InputOption;
3426
3459
  define?: Record<string, any>;
3427
3460
  resolve: ResolvedResolveOptions;
3428
3461
  consumer: "client" | "server";
@@ -3680,6 +3713,14 @@ interface ExperimentalOptions {
3680
3713
  *
3681
3714
  * This is highly experimental.
3682
3715
  *
3716
+ * HMR semantics under full bundle mode differ from the middleware-based dev server
3717
+ * in two ways (boundaries are computed in the browser from runtime state, not
3718
+ * statically on the server):
3719
+ *
3720
+ * - Acceptance counts only when it executed: an `import.meta.hot.accept()` that
3721
+ * is in a dead branch does not suppress the update and falls back to a full reload.
3722
+ * - `hot.invalidate()` is handled fully client-side.
3723
+ *
3683
3724
  * @experimental
3684
3725
  * @default false
3685
3726
  */
@@ -4007,4 +4048,4 @@ declare const parseAst: typeof parseAst$1;
4007
4048
  declare const parseAstAsync: typeof parseAstAsync$1;
4008
4049
  declare const esbuildVersion = "0.25.0";
4009
4050
  //#endregion
4010
- export { type Alias, type AliasOptions, type AnymatchFn, type AnymatchPattern, type AppType, type BindCLIShortcutsOptions, type BuildAppHook, BuildEnvironment, 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, DevEnvironment, 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 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 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, build, buildErrorMessage, createBuilder, createFetchableDevEnvironment, createFilter, createIdResolver, createLogger, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defaultAllowedOrigins, 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, defineConfig, esbuildVersion, esmExternalRequirePlugin, fetchModule, formatPostcssSourceMap, isCSSRequest, isFetchableDevEnvironment, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, minify, minifySync, ssrTransform as moduleRunnerTransform, normalizePath, optimizeDeps, parse, parseAst, parseAstAsync, parseSync, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rolldownVersion, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, transformWithEsbuild, transformWithOxc, VERSION as version, withFilter };
4051
+ export { type Alias, type AliasOptions, type AnymatchFn, type AnymatchPattern, type AppType, type BindCLIShortcutsOptions, type BuildAppHook, BuildEnvironment, 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, DevEnvironment, 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 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, build, buildErrorMessage, createBuilder, createFetchableDevEnvironment, createFilter, createIdResolver, createLogger, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defaultAllowedOrigins, 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, defineConfig, esbuildVersion, esmExternalRequirePlugin, fetchModule, formatPostcssSourceMap, isCSSRequest, isFetchableDevEnvironment, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, minify, minifySync, ssrTransform as moduleRunnerTransform, normalizePath, optimizeDeps, parse, parseAst, parseAstAsync, parseSync, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rolldownVersion, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, transformWithEsbuild, transformWithOxc, VERSION as version, withFilter };
@@ -65,7 +65,7 @@ function normalizeString(path, allowAboveRoot) {
65
65
  else if (char === "/") break;
66
66
  else char = "/";
67
67
  if (char === "/") {
68
- if (!(lastSlash === index - 1 || dots === 1)) if (dots === 2) {
68
+ if (lastSlash !== index - 1 && dots !== 1) if (dots === 2) {
69
69
  if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
70
70
  if (res.length > 2) {
71
71
  let lastSlashIndex = res.lastIndexOf("/");
@@ -464,13 +464,17 @@ var HMRContext = class {
464
464
  this.hotModulesMap.clear(), this.disposeMap.clear(), this.pruneMap.clear(), this.dataMap.clear(), this.customListenersMap.clear(), this.ctxToListenersMap.clear();
465
465
  }
466
466
  async prunePaths(paths) {
467
- await Promise.all(paths.map((path) => {
468
- let disposer = this.disposeMap.get(path);
469
- if (disposer) return disposer(this.dataMap.get(path));
470
- })), await Promise.all(paths.map((path) => {
471
- let fn = this.pruneMap.get(path);
472
- if (fn) return fn(this.dataMap.get(path));
473
- }));
467
+ try {
468
+ await Promise.all(paths.map((path) => {
469
+ let disposer = this.disposeMap.get(path);
470
+ if (disposer) return disposer(this.dataMap.get(path));
471
+ })), await Promise.all(paths.map((path) => {
472
+ let fn = this.pruneMap.get(path);
473
+ if (fn) return fn(this.dataMap.get(path));
474
+ }));
475
+ } finally {
476
+ paths.forEach((path) => this.dataMap.delete(path));
477
+ }
474
478
  }
475
479
  warnFailedUpdate(err, path) {
476
480
  (!(err instanceof Error) || !err.message.includes("fetch")) && this.logger.error(err), this.logger.error(`Failed to reload ${path}. This could be due to syntax errors or importing non-existent modules. (see errors above)`);
@@ -787,6 +791,7 @@ function createHMRHandlerForRunner(runner) {
787
791
  break;
788
792
  }
789
793
  case "ping": break;
794
+ case "bundled-dev-update": break;
790
795
  default: return payload;
791
796
  }
792
797
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "8.1.5",
3
+ "version": "8.2.0-beta.0",
4
4
  "description": "Native-ESM powered web dev build tool",
5
5
  "keywords": [
6
6
  "build-tool",
@@ -56,10 +56,10 @@
56
56
  "./package.json": "./package.json"
57
57
  },
58
58
  "dependencies": {
59
- "lightningcss": "^1.32.0",
59
+ "lightningcss": "^1.33.0",
60
60
  "picomatch": "^4.0.5",
61
- "postcss": "^8.5.17",
62
- "rolldown": "~1.1.5",
61
+ "postcss": "^8.5.20",
62
+ "rolldown": "~1.2.0",
63
63
  "tinyglobby": "^0.2.17"
64
64
  },
65
65
  "devDependencies": {
@@ -73,7 +73,7 @@
73
73
  "@types/escape-html": "^1.0.4",
74
74
  "@types/pnpapi": "^0.0.5",
75
75
  "@vercel/detect-agent": "^1.2.3",
76
- "@vitejs/devtools": "^0.3.4",
76
+ "@vitejs/devtools": "^0.4.1",
77
77
  "@vitest/utils": "4.1.10",
78
78
  "@voidzero-dev/vite-task-client": "^0.2.0",
79
79
  "artichokie": "^0.4.4",
@@ -94,7 +94,7 @@
94
94
  "host-validation-middleware": "^0.1.4",
95
95
  "http-proxy-3": "^1.23.3",
96
96
  "launch-editor-middleware": "^2.14.1",
97
- "magic-string": "^0.30.21",
97
+ "magic-string": "^1.0.0",
98
98
  "mlly": "^1.8.2",
99
99
  "mrmime": "^2.0.1",
100
100
  "nanoid": "^5.1.16",
@@ -109,7 +109,7 @@
109
109
  "postcss-modules": "^9.0.1",
110
110
  "premove": "^4.0.0",
111
111
  "resolve.exports": "^2.0.3",
112
- "rolldown-plugin-dts": "^0.27.6",
112
+ "rolldown-plugin-dts": "^0.27.9",
113
113
  "rollup": "^4.59.0",
114
114
  "rollup-plugin-license": "^3.7.1",
115
115
  "sass": "^1.101.0",
@@ -118,11 +118,11 @@
118
118
  "strip-literal": "^3.1.0",
119
119
  "terser": "^5.49.0",
120
120
  "ufo": "^1.6.4",
121
- "ws": "^8.21.0"
121
+ "ws": "^8.21.1"
122
122
  },
123
123
  "peerDependencies": {
124
124
  "@types/node": "^20.19.0 || >=22.12.0",
125
- "@vitejs/devtools": "^0.3.0",
125
+ "@vitejs/devtools": "^0.4.0",
126
126
  "esbuild": "^0.27.0 || ^0.28.0",
127
127
  "jiti": ">=1.21.0",
128
128
  "less": "^4.0.0",
@@ -18,7 +18,7 @@ export interface CustomEventMap {
18
18
  /** @internal */
19
19
  'vite:forward-console': ForwardConsolePayload
20
20
  /** @internal */
21
- 'vite:module-loaded': { modules: string[]; clientId: string }
21
+ 'vite:client-connected': { clientId: string }
22
22
 
23
23
  // server events
24
24
  'vite:client:connect': undefined
@@ -4,6 +4,7 @@ export type HotPayload =
4
4
  | ConnectedPayload
5
5
  | PingPayload
6
6
  | UpdatePayload
7
+ | BundledDevUpdatePayload
7
8
  | FullReloadPayload
8
9
  | CustomPayload
9
10
  | ErrorPayload
@@ -22,14 +23,21 @@ export interface UpdatePayload {
22
23
  updates: Update[]
23
24
  }
24
25
 
26
+ /**
27
+ * Full-bundle-mode update notification. The client computes the HMR boundaries
28
+ * itself from `changedIds`.
29
+ */
30
+ export interface BundledDevUpdatePayload {
31
+ type: 'bundled-dev-update'
32
+ changedIds: string[]
33
+ /** URL of the per-client HMR patch chunk */
34
+ url: string
35
+ /** Per-client sequence number */
36
+ seq: number
37
+ }
38
+
25
39
  export interface Update {
26
40
  type: 'js-update' | 'css-update'
27
- /**
28
- * URL of HMR patch chunk
29
- *
30
- * This only exists when full-bundle mode is enabled.
31
- */
32
- url?: string
33
41
  path: string
34
42
  acceptedPath: string
35
43
  timestamp: number
@@ -53,6 +61,12 @@ export interface FullReloadPayload {
53
61
  path?: string
54
62
  /** @internal */
55
63
  triggeredBy?: string
64
+ /**
65
+ * When set, only the bundling-fallback page acts on the reload;
66
+ * other pages ignore the message.
67
+ * @internal
68
+ */
69
+ ifFallback?: boolean
56
70
  }
57
71
 
58
72
  export interface CustomPayload {