weapp-vite 6.15.13 → 6.15.15

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.
@@ -6,7 +6,7 @@ import { LoggerConfig } from "@weapp-core/logger";
6
6
  import { ConfigEnv, ConfigEnv as ConfigEnv$1, InlineConfig, InlineConfig as InlineConfig$1, Plugin as Plugin$1, PluginOption, ResolvedConfig, UserConfig, ViteDevServer, ViteDevServer as ViteDevServer$1, build } from "vite";
7
7
  import { LRUCache } from "lru-cache";
8
8
  import { fdir } from "fdir";
9
- import { InputOption, RolldownBuild, RolldownOptions, RolldownOutput, RolldownOutput as RolldownOutput$1, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcher as RolldownWatcher$1, WatchOptions as RolldownWatchOptions } from "rolldown";
9
+ import { InputOption, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownOutput as RolldownOutput$1, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcher as RolldownWatcher$1, WatchOptions as RolldownWatchOptions } from "rolldown";
10
10
  import { Options } from "rolldown-plugin-dts";
11
11
  import { Buffer } from "node:buffer";
12
12
  import { PluginOptions } from "vite-tsconfig-paths";
@@ -504,6 +504,14 @@ interface WeappSubPackageConfig {
504
504
  interface WeappHmrConfig {
505
505
  sharedChunks?: 'full' | 'auto' | 'off';
506
506
  touchAppWxss?: boolean | 'auto';
507
+ /**
508
+ * @description HMR 终端日志档位:默认仅输出总耗时,显式开启 concise/verbose 后再展示阶段诊断。
509
+ */
510
+ logLevel?: 'default' | 'concise' | 'verbose';
511
+ /**
512
+ * @description 是否输出 HMR 结构化 profile,或指定自定义 JSONL 输出路径
513
+ */
514
+ profileJson?: boolean | string;
507
515
  }
508
516
  /**
509
517
  * @description worker 构建配置
@@ -521,6 +529,7 @@ interface WeappVueTemplateConfig {
521
529
  htmlTagToWxmlTagClass?: boolean;
522
530
  scopedSlotsCompiler?: 'auto' | 'augmented' | 'off';
523
531
  scopedSlotsRequireProps?: boolean;
532
+ slotSingleRootNoWrapper?: boolean;
524
533
  slotMultipleInstance?: boolean;
525
534
  classStyleRuntime?: 'auto' | 'wxs' | 'js';
526
535
  objectLiteralBindMode?: 'runtime' | 'inline';
@@ -1077,6 +1086,16 @@ interface ResolvedMultiPlatformConfig {
1077
1086
  targets: readonly MpPlatform$1[];
1078
1087
  }
1079
1088
  //#endregion
1089
+ //#region src/utils/json.d.ts
1090
+ interface JsonResolvableEntry {
1091
+ json?: any;
1092
+ jsonPath?: string;
1093
+ type?: 'app' | 'page' | 'component' | 'plugin';
1094
+ }
1095
+ //#endregion
1096
+ //#region src/utils/loadViteConfigFile.d.ts
1097
+ type ViteConfigLoader = 'bundle' | 'runner' | 'native';
1098
+ //#endregion
1080
1099
  //#region src/runtime/config/types.d.ts
1081
1100
  interface LoadConfigOptions {
1082
1101
  cwd: string;
@@ -1086,6 +1105,7 @@ interface LoadConfigOptions {
1086
1105
  pluginOnly?: boolean;
1087
1106
  inlineConfig?: InlineConfig;
1088
1107
  configFile?: string;
1108
+ configLoader?: ViteConfigLoader;
1089
1109
  cliPlatform?: string;
1090
1110
  projectConfigPath?: string;
1091
1111
  }
@@ -1199,13 +1219,6 @@ interface ResolvedWeappWebConfig {
1199
1219
  source?: WeappWebConfig;
1200
1220
  }
1201
1221
  //#endregion
1202
- //#region src/utils/json.d.ts
1203
- interface JsonResolvableEntry {
1204
- json?: any;
1205
- jsonPath?: string;
1206
- type?: 'app' | 'page' | 'component' | 'plugin';
1207
- }
1208
- //#endregion
1209
1222
  //#region src/cache/file.d.ts
1210
1223
  type HashInput = string | Buffer;
1211
1224
  declare class FileCache<T extends object> {
@@ -1364,6 +1377,42 @@ interface RuntimeState {
1364
1377
  independent: {
1365
1378
  outputs: Map<string, RolldownOutput>;
1366
1379
  };
1380
+ hmr: {
1381
+ loadedEntrySet: Set<string>;
1382
+ dirtyEntrySet: Set<string>;
1383
+ dirtyEntryReasons: Map<string, 'direct' | 'dependency'>;
1384
+ resolvedEntryMap: Map<string, ResolvedId>;
1385
+ entriesMap: Map<string, Entry | undefined>;
1386
+ layoutEntryDependents: Map<string, Set<string>>;
1387
+ entryLayoutDependencies: Map<string, Set<string>>;
1388
+ recentProfiles: Array<{
1389
+ totalMs: number;
1390
+ buildCoreMs?: number;
1391
+ transformMs?: number;
1392
+ writeMs?: number;
1393
+ watchToDirtyMs?: number;
1394
+ emitMs?: number;
1395
+ sharedChunkResolveMs?: number;
1396
+ dirtyCount?: number;
1397
+ pendingCount?: number;
1398
+ emittedCount?: number;
1399
+ }>;
1400
+ profile: {
1401
+ event?: ChangeEvent;
1402
+ file?: string;
1403
+ buildCoreMs?: number;
1404
+ transformMs?: number;
1405
+ writeMs?: number;
1406
+ watchToDirtyMs?: number;
1407
+ emitMs?: number;
1408
+ sharedChunkResolveMs?: number;
1409
+ dirtyCount?: number;
1410
+ pendingCount?: number;
1411
+ emittedCount?: number;
1412
+ dirtyReasonSummary?: string[];
1413
+ pendingReasonSummary?: string[];
1414
+ };
1415
+ };
1367
1416
  };
1368
1417
  json: {
1369
1418
  cache: FileCache<any>;
@@ -1516,7 +1565,7 @@ interface AutoRoutesService {
1516
1565
  getWatchFiles: () => Iterable<string>;
1517
1566
  getWatchDirectories: () => Iterable<string>;
1518
1567
  isRouteFile: (filePath: string) => boolean;
1519
- handleFileChange: (filePath: string, event?: AutoRoutesFileEvent) => Promise<void>;
1568
+ handleFileChange: (filePath: string, event?: AutoRoutesFileEvent) => Promise<boolean>;
1520
1569
  isInitialized: () => boolean;
1521
1570
  isEnabled: () => boolean;
1522
1571
  }
package/dist/config.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { Bn as resolveWeappViteHostMeta, Fn as WeappViteHostMeta, In as WeappViteRuntime, Ln as applyWeappViteHostMeta, Pn as WEAPP_VITE_HOST_NAME, Rn as createWeappViteHostMeta, _ as definePageJson, a as UserConfigFnNoEnvPlain, c as UserConfigFnPromise, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, l as defineConfig, m as Theme, n as UserConfigExport, nt as WeappViteConfig, o as UserConfigFnObject, p as Sitemap, r as UserConfigFn, s as UserConfigFnObjectPlain, t as UserConfig, u as App, v as defineSitemapJson, y as defineThemeJson, zn as isWeappViteHost } from "./config-DzoHnvv-.mjs";
1
+ import { Bn as resolveWeappViteHostMeta, Fn as WeappViteHostMeta, In as WeappViteRuntime, Ln as applyWeappViteHostMeta, Pn as WEAPP_VITE_HOST_NAME, Rn as createWeappViteHostMeta, _ as definePageJson, a as UserConfigFnNoEnvPlain, c as UserConfigFnPromise, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, l as defineConfig, m as Theme, n as UserConfigExport, nt as WeappViteConfig, o as UserConfigFnObject, p as Sitemap, r as UserConfigFn, s as UserConfigFnObjectPlain, t as UserConfig, u as App, v as defineSitemapJson, y as defineThemeJson, zn as isWeappViteHost } from "./config-BEJTp6sp.mjs";
2
2
  export { App, Component, Page, Sitemap, Theme, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnNoEnv, UserConfigFnNoEnvPlain, UserConfigFnObject, UserConfigFnObjectPlain, UserConfigFnPromise, WEAPP_VITE_HOST_NAME, WeappViteConfig, WeappViteHostMeta, WeappViteRuntime, applyWeappViteHostMeta, createWeappViteHostMeta, defineAppJson, defineComponentJson, defineConfig, definePageJson, defineSitemapJson, defineThemeJson, isWeappViteHost, resolveWeappViteHostMeta };
package/dist/config.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as defineThemeJson, i as defineSitemapJson, n as defineComponentJson, r as definePageJson, t as defineAppJson } from "./json-wnfVS9jE.mjs";
2
- import { a as resolveWeappViteHostMeta, i as isWeappViteHost, n as applyWeappViteHostMeta, r as createWeappViteHostMeta, t as WEAPP_VITE_HOST_NAME } from "./pluginHost-BzPJL4F-.mjs";
3
- import { t as defineConfig } from "./config-B2xtjEug.mjs";
1
+ import { a as defineThemeJson, i as defineSitemapJson, n as defineComponentJson, r as definePageJson, t as defineAppJson } from "./json-D0HkutE0.mjs";
2
+ import { a as resolveWeappViteHostMeta, i as isWeappViteHost, n as applyWeappViteHostMeta, r as createWeappViteHostMeta, t as WEAPP_VITE_HOST_NAME } from "./pluginHost-SJdl15d3.mjs";
3
+ import { t as defineConfig } from "./config-DJjSbpNX.mjs";
4
4
  export { WEAPP_VITE_HOST_NAME, applyWeappViteHostMeta, createWeappViteHostMeta, defineAppJson, defineComponentJson, defineConfig, definePageJson, defineSitemapJson, defineThemeJson, isWeappViteHost, resolveWeappViteHostMeta };