vite 8.0.0-beta.0 → 8.0.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.
@@ -1,4 +1,4 @@
1
1
  import "./logger.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";
2
+ import { $ as discoverProjectDependencies, J as cleanupDepsCacheStaleDirs, K as addManuallyIncludedOptimizeDeps, Q as depsLogString, X as createIsOptimizedDepUrl, Y as createIsOptimizedDepFile, Z as depsFromOptimizedDepInfo, at as loadCachedDepOptimizationMetadata, ct as optimizedDepInfoFromFile, dt as runOptimizeDeps, et as extractExportsData, ft as toDiscoveredDependencies, it as isDepOptimizationDisabled, lt as optimizedDepInfoFromId, nt as getOptimizedDepPath, ot as optimizeDeps, q as addOptimizedDepInfo, rt as initDepsOptimizerMetadata, st as optimizeExplicitEnvironmentDeps, tt as getDepsCacheDir, ut as optimizedDepNeedsInterop } from "./node.js";
3
3
 
4
4
  export { optimizeDeps };
@@ -1,4 +1,4 @@
1
1
  import "./logger.js";
2
- import { _t as restartServerWithUrls, gt as resolveServerOptions, ht as createServerCloseFn, mt as createServer, pt as _createServer, vt as serverConfigDefaults } from "./node.js";
2
+ import { _t as resolveServerOptions, gt as createServerCloseFn, ht as createServer, mt as _createServer, vt as restartServerWithUrls, yt as serverConfigDefaults } from "./node.js";
3
3
 
4
4
  export { createServer };
package/dist/node/cli.js CHANGED
@@ -565,7 +565,7 @@ const convertBase = (v) => {
565
565
  return v;
566
566
  };
567
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
- 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) => {
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`).option("--experimentalBundle", `[boolean] use experimental full bundle mode (this is highly experimental)`).action(async (root, options) => {
569
569
  filterDuplicateOptions(options);
570
570
  const { createServer } = await import("./chunks/server.js");
571
571
  try {
@@ -578,7 +578,8 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
578
578
  logLevel: options.logLevel,
579
579
  clearScreen: options.clearScreen,
580
580
  server: cleanGlobalCLIOptions(options),
581
- forceOptimizeDeps: options.force
581
+ forceOptimizeDeps: options.force,
582
+ experimental: { bundledDev: options.experimentalBundle }
582
583
  });
583
584
  if (!server.httpServer) throw new Error("HTTP server not available");
584
585
  await server.listen();
@@ -42,7 +42,7 @@ interface Alias {
42
42
  */
43
43
  customResolver?: ResolverFunction | ResolverObject | null;
44
44
  }
45
- type MapToFunction<T$1> = T$1 extends Function ? T$1 : never;
45
+ type MapToFunction<T> = T extends Function ? T : never;
46
46
  type ResolverFunction = MapToFunction<FunctionPluginHooks['resolveId']>;
47
47
  interface ResolverObject {
48
48
  buildStart?: FunctionPluginHooks['buildStart'];
@@ -342,7 +342,7 @@ type ProxyTargetUrl = URL | string | {
342
342
  host: string;
343
343
  protocol?: string;
344
344
  };
345
- type NormalizeProxyTarget<T$1 extends ProxyTargetUrl> = Exclude<T$1, string> | URL;
345
+ type NormalizeProxyTarget<T extends ProxyTargetUrl> = Exclude<T, string> | URL;
346
346
  interface ServerOptions$3 {
347
347
  /** URL string to be parsed with the url module. */
348
348
  target?: ProxyTarget;
@@ -664,7 +664,7 @@ interface CorsOptions {
664
664
  type CorsOrigin = boolean | string | RegExp | (string | RegExp)[];
665
665
  //#endregion
666
666
  //#region src/node/typeUtils.d.ts
667
- type RequiredExceptFor<T$1, K$1 extends keyof T$1> = Pick<T$1, K$1> & Required<Omit<T$1, K$1>>;
667
+ type RequiredExceptFor<T, K$1 extends keyof T> = Pick<T, K$1> & Required<Omit<T, K$1>>;
668
668
  //#endregion
669
669
  //#region src/node/preview.d.ts
670
670
  interface PreviewOptions extends CommonServerOptions {}
@@ -1041,8 +1041,8 @@ declare class ModuleNode {
1041
1041
  _clientModule: EnvironmentModuleNode | undefined;
1042
1042
  _ssrModule: EnvironmentModuleNode | undefined;
1043
1043
  constructor(moduleGraph: ModuleGraph, clientModule?: EnvironmentModuleNode, ssrModule?: EnvironmentModuleNode);
1044
- _get<T$1 extends keyof EnvironmentModuleNode>(prop: T$1): EnvironmentModuleNode[T$1];
1045
- _set<T$1 extends keyof EnvironmentModuleNode>(prop: T$1, value: EnvironmentModuleNode[T$1]): void;
1044
+ _get<T extends keyof EnvironmentModuleNode>(prop: T): EnvironmentModuleNode[T];
1045
+ _set<T extends keyof EnvironmentModuleNode>(prop: T, value: EnvironmentModuleNode[T]): void;
1046
1046
  _wrapModuleSet(prop: ModuleSetNames, module: EnvironmentModuleNode | undefined): Set<ModuleNode>;
1047
1047
  _getModuleSetUnion(prop: "importedModules" | "importers"): Set<ModuleNode>;
1048
1048
  _getModuleInfoUnion(prop: "info"): ModuleInfo | undefined;
@@ -1134,7 +1134,7 @@ interface HmrContext {
1134
1134
  interface HotChannelClient {
1135
1135
  send(payload: hmrPayload_HotPayload): void;
1136
1136
  }
1137
- type HotChannelListener<T$1 extends string = string> = (data: InferCustomEventPayload<T$1>, client: HotChannelClient) => void;
1137
+ type HotChannelListener<T extends string = string> = (data: InferCustomEventPayload<T>, client: HotChannelClient) => void;
1138
1138
  interface HotChannel<Api = any> {
1139
1139
  /**
1140
1140
  * Broadcast events to all clients
@@ -1143,7 +1143,7 @@ interface HotChannel<Api = any> {
1143
1143
  /**
1144
1144
  * Handle custom event emitted by `import.meta.hot.send`
1145
1145
  */
1146
- on?<T$1 extends string>(event: T$1, listener: HotChannelListener<T$1>): void;
1146
+ on?<T extends string>(event: T, listener: HotChannelListener<T>): void;
1147
1147
  on?(event: "connection", listener: () => void): void;
1148
1148
  /**
1149
1149
  * Unregister event listener
@@ -1177,11 +1177,11 @@ interface NormalizedHotChannel<Api = any> {
1177
1177
  /**
1178
1178
  * Send custom event
1179
1179
  */
1180
- send<T$1 extends string>(event: T$1, payload?: InferCustomEventPayload<T$1>): void;
1180
+ send<T extends string>(event: T, payload?: InferCustomEventPayload<T>): void;
1181
1181
  /**
1182
1182
  * Handle custom event emitted by `import.meta.hot.send`
1183
1183
  */
1184
- on<T$1 extends string>(event: T$1, listener: (data: InferCustomEventPayload<T$1>, client: NormalizedHotChannelClient) => void): void;
1184
+ on<T extends string>(event: T, listener: (data: InferCustomEventPayload<T>, client: NormalizedHotChannelClient) => void): void;
1185
1185
  /**
1186
1186
  * @deprecated use `vite:client:connect` event instead
1187
1187
  */
@@ -1452,38 +1452,38 @@ declare namespace WebSocket {
1452
1452
  }
1453
1453
 
1454
1454
  // WebSocket Server
1455
- class Server<T$1 extends WebSocket = WebSocket> extends EventEmitter {
1455
+ class Server<T extends WebSocket = WebSocket> extends EventEmitter {
1456
1456
  options: ServerOptions;
1457
1457
  path: string;
1458
- clients: Set<T$1>;
1458
+ clients: Set<T>;
1459
1459
  constructor(options?: ServerOptions, callback?: () => void);
1460
1460
  address(): AddressInfo | string;
1461
1461
  close(cb?: (err?: Error) => void): void;
1462
- handleUpgrade(request: http.IncomingMessage, socket: Duplex, upgradeHead: Buffer, callback: (client: T$1, request: http.IncomingMessage) => void): void;
1462
+ handleUpgrade(request: http.IncomingMessage, socket: Duplex, upgradeHead: Buffer, callback: (client: T, request: http.IncomingMessage) => void): void;
1463
1463
  shouldHandle(request: http.IncomingMessage): boolean | Promise<boolean>;
1464
1464
 
1465
1465
  // Events
1466
- on(event: 'connection', cb: (this: Server<T$1>, socket: T$1, request: http.IncomingMessage) => void): this;
1467
- on(event: 'error', cb: (this: Server<T$1>, error: Error) => void): this;
1468
- on(event: 'headers', cb: (this: Server<T$1>, headers: string[], request: http.IncomingMessage) => void): this;
1469
- on(event: 'close' | 'listening', cb: (this: Server<T$1>) => void): this;
1470
- on(event: string | symbol, listener: (this: Server<T$1>, ...args: any[]) => void): this;
1471
- once(event: 'connection', cb: (this: Server<T$1>, socket: T$1, request: http.IncomingMessage) => void): this;
1472
- once(event: 'error', cb: (this: Server<T$1>, error: Error) => void): this;
1473
- once(event: 'headers', cb: (this: Server<T$1>, headers: string[], request: http.IncomingMessage) => void): this;
1474
- once(event: 'close' | 'listening', cb: (this: Server<T$1>) => void): this;
1475
- once(event: string | symbol, listener: (this: Server<T$1>, ...args: any[]) => void): this;
1476
- off(event: 'connection', cb: (this: Server<T$1>, socket: T$1, request: http.IncomingMessage) => void): this;
1477
- off(event: 'error', cb: (this: Server<T$1>, error: Error) => void): this;
1478
- off(event: 'headers', cb: (this: Server<T$1>, headers: string[], request: http.IncomingMessage) => void): this;
1479
- off(event: 'close' | 'listening', cb: (this: Server<T$1>) => void): this;
1480
- off(event: string | symbol, listener: (this: Server<T$1>, ...args: any[]) => void): this;
1481
- addListener(event: 'connection', cb: (client: T$1, request: http.IncomingMessage) => void): this;
1466
+ on(event: 'connection', cb: (this: Server<T>, socket: T, request: http.IncomingMessage) => void): this;
1467
+ on(event: 'error', cb: (this: Server<T>, error: Error) => void): this;
1468
+ on(event: 'headers', cb: (this: Server<T>, headers: string[], request: http.IncomingMessage) => void): this;
1469
+ on(event: 'close' | 'listening', cb: (this: Server<T>) => void): this;
1470
+ on(event: string | symbol, listener: (this: Server<T>, ...args: any[]) => void): this;
1471
+ once(event: 'connection', cb: (this: Server<T>, socket: T, request: http.IncomingMessage) => void): this;
1472
+ once(event: 'error', cb: (this: Server<T>, error: Error) => void): this;
1473
+ once(event: 'headers', cb: (this: Server<T>, headers: string[], request: http.IncomingMessage) => void): this;
1474
+ once(event: 'close' | 'listening', cb: (this: Server<T>) => void): this;
1475
+ once(event: string | symbol, listener: (this: Server<T>, ...args: any[]) => void): this;
1476
+ off(event: 'connection', cb: (this: Server<T>, socket: T, request: http.IncomingMessage) => void): this;
1477
+ off(event: 'error', cb: (this: Server<T>, error: Error) => void): this;
1478
+ off(event: 'headers', cb: (this: Server<T>, headers: string[], request: http.IncomingMessage) => void): this;
1479
+ off(event: 'close' | 'listening', cb: (this: Server<T>) => void): this;
1480
+ off(event: string | symbol, listener: (this: Server<T>, ...args: any[]) => void): this;
1481
+ addListener(event: 'connection', cb: (client: T, request: http.IncomingMessage) => void): this;
1482
1482
  addListener(event: 'error', cb: (err: Error) => void): this;
1483
1483
  addListener(event: 'headers', cb: (headers: string[], request: http.IncomingMessage) => void): this;
1484
1484
  addListener(event: 'close' | 'listening', cb: () => void): this;
1485
1485
  addListener(event: string | symbol, listener: (...args: any[]) => void): this;
1486
- removeListener(event: 'connection', cb: (client: T$1) => void): this;
1486
+ removeListener(event: 'connection', cb: (client: T) => void): this;
1487
1487
  removeListener(event: 'error', cb: (err: Error) => void): this;
1488
1488
  removeListener(event: 'headers', cb: (headers: string[], request: http.IncomingMessage) => void): this;
1489
1489
  removeListener(event: 'close' | 'listening', cb: () => void): this;
@@ -1501,14 +1501,14 @@ declare namespace WebSocket {
1501
1501
  // export = WebSocket
1502
1502
  //#endregion
1503
1503
  //#region src/node/server/ws.d.ts
1504
- type WebSocketCustomListener<T$1> = (data: T$1, client: WebSocketClient) => void;
1504
+ type WebSocketCustomListener<T> = (data: T, client: WebSocketClient) => void;
1505
1505
  declare const isWebSocketServer: unique symbol;
1506
1506
  interface WebSocketServer extends NormalizedHotChannel {
1507
1507
  /**
1508
1508
  * Handle custom event emitted by `import.meta.hot.send`
1509
1509
  */
1510
1510
  on: WebSocket.Server["on"] & {
1511
- <T$1 extends string>(event: T$1, listener: WebSocketCustomListener<hmrPayload_InferCustomEventPayload<T$1>>): void;
1511
+ <T extends string>(event: T, listener: WebSocketCustomListener<hmrPayload_InferCustomEventPayload<T>>): void;
1512
1512
  };
1513
1513
  /**
1514
1514
  * Unregister event listener.
@@ -1582,6 +1582,11 @@ declare class DevEnvironment extends BaseEnvironment {
1582
1582
  reloadModule(module: EnvironmentModuleNode): Promise<void>;
1583
1583
  transformRequest(url: string, options?: TransformOptionsInternal): Promise<TransformResult | null>;
1584
1584
  warmupRequest(url: string): Promise<void>;
1585
+ protected invalidateModule(m: {
1586
+ path: string;
1587
+ message?: string;
1588
+ firstInvalidatedBy: string;
1589
+ }, _client: NormalizedHotChannelClient): void;
1585
1590
  close(): Promise<void>;
1586
1591
  /**
1587
1592
  * Calling `await environment.waitForRequestsIdle(id)` will wait until all static imports
@@ -2339,9 +2344,9 @@ declare class BasicMinimalPluginContext<Meta = PluginContextMeta> {
2339
2344
  error(e: string | RollupError): never;
2340
2345
  private _normalizeRawLog;
2341
2346
  }
2342
- declare class MinimalPluginContext$1<T$1 extends Environment = Environment> extends BasicMinimalPluginContext implements MinimalPluginContext {
2343
- environment: T$1;
2344
- constructor(meta: PluginContextMeta, environment: T$1);
2347
+ declare class MinimalPluginContext$1<T extends Environment = Environment> extends BasicMinimalPluginContext implements MinimalPluginContext {
2348
+ environment: T;
2349
+ constructor(meta: PluginContextMeta, environment: T);
2345
2350
  }
2346
2351
  declare class PluginContainer {
2347
2352
  private environments;
@@ -2941,9 +2946,9 @@ interface Plugin<A = any> extends Rolldown.Plugin<A> {
2941
2946
  moduleSideEffects: boolean | "no-treeshake";
2942
2947
  }) => boolean | null | void>;
2943
2948
  }
2944
- type HookHandler<T$1> = T$1 extends ObjectHook<infer H> ? H : T$1;
2949
+ type HookHandler<T> = T extends ObjectHook<infer H> ? H : T;
2945
2950
  type PluginWithRequiredHook<K$1 extends keyof Plugin> = Plugin & { [P in K$1]: NonNullable<Plugin[P]> };
2946
- type Thenable<T$1> = T$1 | Promise<T$1>;
2951
+ type Thenable<T> = T | Promise<T>;
2947
2952
  type FalsyPlugin = false | null | undefined;
2948
2953
  type PluginOption = Thenable<Plugin | {
2949
2954
  name: string;
@@ -3491,6 +3496,15 @@ interface ExperimentalOptions {
3491
3496
  * @default 'v1'
3492
3497
  */
3493
3498
  enableNativePlugin?: boolean | "resolver" | "v1";
3499
+ /**
3500
+ * Enable full bundle mode.
3501
+ *
3502
+ * This is highly experimental.
3503
+ *
3504
+ * @experimental
3505
+ * @default false
3506
+ */
3507
+ bundledDev?: boolean;
3494
3508
  }
3495
3509
  interface LegacyOptions {
3496
3510
  /**
@@ -3544,6 +3558,8 @@ interface ResolvedConfig extends Readonly<Omit<UserConfig, "plugins" | "css" | "
3544
3558
  cacheDir: string;
3545
3559
  command: "build" | "serve";
3546
3560
  mode: string;
3561
+ /** `true` when build or full-bundle mode dev */
3562
+ isBundled: boolean;
3547
3563
  isWorker: boolean;
3548
3564
  isProduction: boolean;
3549
3565
  envDir: string | false;
@@ -3675,15 +3691,15 @@ declare class FetchableDevEnvironment extends DevEnvironment {
3675
3691
  }
3676
3692
  //#endregion
3677
3693
  //#region src/node/ssr/runnerImport.d.ts
3678
- interface RunnerImportResult<T$1> {
3679
- module: T$1;
3694
+ interface RunnerImportResult<T> {
3695
+ module: T;
3680
3696
  dependencies: string[];
3681
3697
  }
3682
3698
  /**
3683
3699
  * Import any file using the default Vite environment.
3684
3700
  * @experimental
3685
3701
  */
3686
- declare function runnerImport<T$1>(moduleId: string, inlineConfig?: InlineConfig): Promise<RunnerImportResult<T$1>>;
3702
+ declare function runnerImport<T>(moduleId: string, inlineConfig?: InlineConfig): Promise<RunnerImportResult<T>>;
3687
3703
  //#endregion
3688
3704
  //#region src/node/ssr/fetchModule.d.ts
3689
3705
  interface FetchModuleOptions {
@@ -1,4 +1,4 @@
1
1
  import { F as defaultAllowedOrigins, N as VERSION, _ as DEFAULT_SERVER_CONDITIONS, d as DEFAULT_CLIENT_MAIN_FIELDS, h as DEFAULT_EXTERNAL_CONDITIONS, n as createLogger, u as DEFAULT_CLIENT_CONDITIONS, v as DEFAULT_SERVER_MAIN_FIELDS } from "./chunks/logger.js";
2
- import { At as loadEnv, Bt as normalizePath, C as isRunnableDevEnvironment, Ct as isFileLoadingAllowed, Dt as createServerModuleRunner, E as BuildEnvironment, Et as ssrTransform, Ft as perEnvironmentPlugin, Ht as rollupVersion, It as createFilter, Lt as isCSSRequest, Mt as transformWithOxc, Nt as transformWithEsbuild, O as build, Ot as createServerModuleRunnerTransport, Pt as perEnvironmentState, Rt as mergeAlias, S as createRunnableDevEnvironment, St as createIdResolver, T as fetchModule, Tt as send, Ut as withFilter, Vt as rolldownVersion, a as parse, at as optimizeDeps, b as preview, bt as preprocessCSS, c as parseSync, d as defineConfig, ft as createServerHotChannel, g as resolveConfig, i as minifySync, j as createBuilder, jt as resolveEnvPrefix, kt as buildErrorMessage, l as createFetchableDevEnvironment, m as loadConfigFromFile, mt as createServer, n as esmExternalRequirePlugin, o as parseAst, r as minify, s as parseAstAsync, t as esbuildVersion, u as isFetchableDevEnvironment, v as sortUserPlugins, w as DevEnvironment, wt as isFileServingAllowed, xt as searchForWorkspaceRoot, y as runnerImport, yt as formatPostcssSourceMap, zt as mergeConfig } from "./chunks/node.js";
2
+ import { A as createBuilder, At as createServerModuleRunner, Bt as isCSSRequest, C as isRunnableDevEnvironment, Ct as isFileServingAllowed, Dt as searchForWorkspaceRoot, E as build, Et as preprocessCSS, Ft as transformWithOxc, Gt as rollupVersion, Ht as mergeConfig, It as transformWithEsbuild, Kt as withFilter, Lt as perEnvironmentState, Mt as buildErrorMessage, Nt as loadEnv, Ot as createIdResolver, Pt as resolveEnvPrefix, Rt as perEnvironmentPlugin, S as createRunnableDevEnvironment, St as isFileLoadingAllowed, Tt as formatPostcssSourceMap, Ut as normalizePath, Vt as mergeAlias, Wt as rolldownVersion, a as parse, b as preview, bt as send, c as parseSync, d as defineConfig, g as resolveConfig, ht as createServer, i as minifySync, jt as createServerModuleRunnerTransport, kt as ssrTransform, l as createFetchableDevEnvironment, m as loadConfigFromFile, n as esmExternalRequirePlugin, o as parseAst, ot as optimizeDeps, pt as createServerHotChannel, r as minify, s as parseAstAsync, t as esbuildVersion, u as isFetchableDevEnvironment, v as sortUserPlugins, w as BuildEnvironment, wt as fetchModule, xt as DevEnvironment, y as runnerImport, zt as createFilter } from "./chunks/node.js";
3
3
 
4
4
  export { BuildEnvironment, DevEnvironment, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "8.0.0-beta.0",
3
+ "version": "8.0.0-beta.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -117,7 +117,7 @@
117
117
  "postcss-modules": "^6.0.1",
118
118
  "premove": "^4.0.0",
119
119
  "resolve.exports": "^2.0.3",
120
- "rolldown-plugin-dts": "^0.18.1",
120
+ "rolldown-plugin-dts": "^0.18.3",
121
121
  "rollup": "^4.43.0",
122
122
  "rollup-plugin-license": "^3.6.0",
123
123
  "sass": "^1.94.2",
@@ -15,6 +15,8 @@ export interface CustomEventMap {
15
15
  'vite:invalidate': InvalidatePayload
16
16
  'vite:ws:connect': WebSocketConnectionPayload
17
17
  'vite:ws:disconnect': WebSocketConnectionPayload
18
+ /** @internal */
19
+ 'vite:module-loaded': { modules: string[] }
18
20
 
19
21
  // server events
20
22
  'vite:client:connect': undefined
@@ -24,6 +24,12 @@ export interface UpdatePayload {
24
24
 
25
25
  export interface Update {
26
26
  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
27
33
  path: string
28
34
  acceptedPath: string
29
35
  timestamp: number