weapp-vite 7.5.0 → 7.7.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.
Files changed (135) hide show
  1. package/README.md +14 -6
  2. package/THIRD_PARTY_NOTICES.md +60 -0
  3. package/bin/bootstrap.js +9 -4
  4. package/bin/bootstrap.test.ts +82 -1
  5. package/bin/nodeVersionWarning.js +17 -0
  6. package/bin/nodeVersionWarning.test.ts +30 -0
  7. package/dist/action-BD56SQh4.mjs +254 -0
  8. package/dist/action-CPtgEl6p.mjs +94 -0
  9. package/dist/action-le0bNff_.mjs +1102 -0
  10. package/dist/action-ytG5oFAw.mjs +138 -0
  11. package/dist/action-zmJrU8PC.mjs +245 -0
  12. package/dist/{analyze-ZJUvEdaY.mjs → analyze-DCZo-sJd.mjs} +4 -71
  13. package/dist/artifacts-TrTX9_jj.mjs +104 -0
  14. package/dist/assets-XyhpYtGl.mjs +630 -0
  15. package/dist/auto-import-components/resolvers.d.mts +1 -1
  16. package/dist/auto-import-components/resolvers.mjs +1 -1
  17. package/dist/auto-import-presets/wevu-router.d.mts +1 -1
  18. package/dist/auto-import-presets/wevu-router.mjs +1 -1
  19. package/dist/auto-import-presets/wevu.d.mts +1 -1
  20. package/dist/auto-import-presets/wevu.mjs +1 -1
  21. package/dist/auto-import-presets.d.mts +2 -2
  22. package/dist/auto-import-presets.mjs +2 -2
  23. package/dist/auto-routes.d.mts +1 -3
  24. package/dist/auto-routes.mjs +3 -4
  25. package/dist/{budget-BD7VqLCl.d.mts → budget-DTPngJU0.d.mts} +1 -10
  26. package/dist/budget-_Mu-4GKn.mjs +63 -0
  27. package/dist/builtProject-B145uOt5.mjs +534 -0
  28. package/dist/{package-7swhyLmf.mjs → classifier-CNTJOYQL.mjs} +5 -9
  29. package/dist/cli-acceptance.mjs +3 -4
  30. package/dist/cli.mjs +142 -4569
  31. package/dist/{config-DRGcCi3h.mjs → config-59ZWhCIf.mjs} +1 -2
  32. package/dist/{config-V0L-IAJf.d.mts → config-BNx2BODw.d.mts} +145 -150
  33. package/dist/config.d.mts +2 -2
  34. package/dist/config.mjs +3 -3
  35. package/dist/{constants-DEZdcsMn.mjs → constants-BOe8mgqL.mjs} +2 -4
  36. package/dist/{createCompilerContextInstance-DJH_P_nZ.mjs → createCompilerContextInstance-BXSdH2E8.mjs} +19930 -14019
  37. package/dist/{createContext-BqYzHhY9.mjs → createContext-W0TeXxbo.mjs} +7 -5
  38. package/dist/dashboard/analyze.d.mts +1 -7
  39. package/dist/dashboard/analyze.mjs +3 -1
  40. package/dist/dashboard/vite.d.mts +2 -4
  41. package/dist/dashboard/vite.mjs +1 -2
  42. package/dist/dashboard.d.mts +2 -2
  43. package/dist/dashboard.mjs +1733 -1
  44. package/dist/dashboardTransport-C9290QgS.mjs +15 -0
  45. package/dist/{dashboardViteBridge-Dy3nAD4m.mjs → dashboardViteBridge-B7QgQo94.mjs} +11 -11
  46. package/dist/{dev-fR5GiJRO.mjs → dev-D1QSExwk.mjs} +6 -3
  47. package/dist/devProvider-Bcvz5nu4.mjs +4966 -0
  48. package/dist/docs/README.md +14 -6
  49. package/dist/docs/ai-workflows.md +2 -0
  50. package/dist/docs/mcp.md +11 -1
  51. package/dist/docs/troubleshooting.md +16 -0
  52. package/dist/docs/vue-sfc.md +25 -2
  53. package/dist/docs/weapp-config.md +29 -0
  54. package/dist/docs/wevu-authoring.md +2 -0
  55. package/dist/doctor-worker.mjs +5 -5
  56. package/dist/doctor.d.mts +2 -8
  57. package/dist/doctor.mjs +24 -31
  58. package/dist/engine-Mnnm_ALP.mjs +53 -0
  59. package/dist/file-5eEfbK60.mjs +1 -0
  60. package/dist/{file-sC3jD7Fh.mjs → file-D8mp5GmB.mjs} +50 -26
  61. package/dist/{files-BqxFIPRp.mjs → files-Cy9jURJu.mjs} +1 -2
  62. package/dist/forwardConsole-D2Q0RIqc.mjs +509 -0
  63. package/dist/getInstance-BXNVH7sU.mjs +1 -0
  64. package/dist/{getInstance-DiGSzBNI.mjs → getInstance-DfNlbr-X.mjs} +2 -3
  65. package/dist/history-dKxzoHmN.mjs +774 -0
  66. package/dist/i18n.d.mts +1 -3
  67. package/dist/i18n.mjs +1 -2
  68. package/dist/{index-C9HjUX5c.d.mts → index-DIZJRrvK.d.mts} +1 -24
  69. package/dist/{index-CaXAtb9e.d.mts → index-SnaW3cvA.d.mts} +0 -12
  70. package/dist/index.d.mts +3 -7
  71. package/dist/index.mjs +6 -6
  72. package/dist/{json-BL8Dhhk6.mjs → json-Cvon2mw5.mjs} +1 -2
  73. package/dist/json.d.mts +1 -1
  74. package/dist/json.mjs +1 -1
  75. package/dist/lib-CJyMBzoe.mjs +140 -0
  76. package/dist/{lifecycle-BROTlwSL.mjs → lifecycle-CUo8PMQc.mjs} +123 -33
  77. package/dist/{loadConfig-C3BQhz7F.mjs → loadConfig-CKIdfW4o.mjs} +2 -3
  78. package/dist/loadConfig-D4WGJcYp.mjs +1 -0
  79. package/dist/logBuildAppFinish-DOBoof6S.mjs +54 -0
  80. package/dist/mcp-D88QvQgG.mjs +84 -0
  81. package/dist/{mcp-Cj8Maqo6.mjs → mcp-ovJgl1N9.mjs} +2 -4
  82. package/dist/mcp.d.mts +1 -3
  83. package/dist/mcp.mjs +1 -1
  84. package/dist/mcpClient-C8JzVZ46.mjs +283 -0
  85. package/dist/{processCleanup-B6KA30Zc.mjs → metadata-HlDKtlsu.mjs} +2 -21
  86. package/dist/nodeEnv-zq1EymWj.mjs +6 -0
  87. package/dist/openIde-QoYKhuuM.mjs +643 -0
  88. package/dist/options-Cz8vZ-0w.mjs +33 -0
  89. package/dist/{chunkStrategy-DRA5WpB-.mjs → package-DR62fAzP.mjs} +32 -31
  90. package/dist/path-E1OjBJAl.mjs +43 -0
  91. package/dist/{platform-CnkySBKz.mjs → platform-BiMpsZIb.mjs} +1 -2
  92. package/dist/{pluginHost--CaeyWpA.mjs → pluginHost-vn8Vty1J.mjs} +1 -2
  93. package/dist/processCleanup-DzB64WI8.mjs +18 -0
  94. package/dist/{protocol-vg8HGJ4n.mjs → protocol-HiSJRrSO.mjs} +43 -41
  95. package/dist/reader-wzPH_W8A.mjs +92 -0
  96. package/dist/realpathScope-DwlLaCk3.mjs +22 -0
  97. package/dist/report-PJVyo-UZ.mjs +105 -0
  98. package/dist/{path-doV773b7.mjs → resolvedId-DaxPh_yV.mjs} +5 -50
  99. package/dist/{resolvers-Dod-euqX.mjs → resolvers-CKYqmRD_.mjs} +10 -20
  100. package/dist/resolvers.d.mts +1 -1
  101. package/dist/resolvers.mjs +1 -1
  102. package/dist/{routes-C7fCmf92.d.mts → routes-DvAFX29h.d.mts} +0 -2
  103. package/dist/{runtime-Ee2HY6gR.d.mts → runtime-BL4RjBRa.d.mts} +1 -9
  104. package/dist/runtime-CKtMVERT.mjs +42 -0
  105. package/dist/{runtime-D6VCNhNY.mjs → runtime-DDUCb7pP.mjs} +4 -8
  106. package/dist/runtime.d.mts +1 -1
  107. package/dist/runtime.mjs +1 -1
  108. package/dist/schematics-DikfOjMD.mjs +90 -0
  109. package/dist/{session-PskhD-nZ.mjs → session-COrQJYif.mjs} +81 -21
  110. package/dist/test.d.mts +1 -3
  111. package/dist/test.mjs +54 -30
  112. package/dist/types-BK2EQ3Jm.d.mts +37 -0
  113. package/dist/{types-CgZn5X6j.d.mts → types-e2BMP9NU.d.mts} +1 -4
  114. package/dist/types.d.mts +4 -4
  115. package/dist/{upload-D4msblBf.mjs → upload-Chal5b3w.mjs} +118 -24
  116. package/dist/upload-worker.mjs +3 -5
  117. package/dist/{utils-CJSCgEj6.mjs → utils-CTGSZp4j.mjs} +72 -146
  118. package/dist/vite.d.mts +2 -4
  119. package/dist/vite.mjs +55 -21
  120. package/dist/volar.mjs +1 -2
  121. package/dist/{wevu-BQWUU7br.mjs → wevu-BaihCXO9.mjs} +1 -2
  122. package/dist/wevu-DTtSOyxB.d.mts +3 -0
  123. package/dist/{wevu-router-Dg1LnBlg.mjs → wevu-router-BIoxDbnu.mjs} +1 -2
  124. package/dist/wevu-router-CdWurGQ4.d.mts +3 -0
  125. package/dist/wxs-7V7MPzeW.mjs +1 -0
  126. package/dist/wxs-BdHHXltv.mjs +110 -0
  127. package/package.json +62 -53
  128. package/dist/dashboard-DvqF3Key.mjs +0 -1842
  129. package/dist/devProvider-BGBkw28J.mjs +0 -1050
  130. package/dist/file-DRb4eWqw.mjs +0 -1
  131. package/dist/getInstance-SiE6WZRh.mjs +0 -1
  132. package/dist/loadConfig-VGtBF4qm.mjs +0 -1
  133. package/dist/mcp-D3Yh24Cj.mjs +0 -529
  134. package/dist/wevu-C4KEC5kO.d.mts +0 -5
  135. package/dist/wevu-router-Cg2sIkIE.d.mts +0 -5
@@ -1,6 +1,8 @@
1
- import { d as ResolvedValue, f as Resolver } from "./index-CaXAtb9e.mjs";
2
- import { t as AutoRoutes } from "./routes-C7fCmf92.mjs";
3
- import { t as WeappI18nConfig } from "./types-CgZn5X6j.mjs";
1
+ import { d as ResolvedValue, f as Resolver } from "./index-SnaW3cvA.mjs";
2
+ import { t as AutoRoutes } from "./routes-DvAFX29h.mjs";
3
+ import { t as WeappI18nConfig } from "./types-e2BMP9NU.mjs";
4
+ import { r as GlassEaselTemplateFinding, t as GlassEaselAnalysisFact } from "./types-BK2EQ3Jm.mjs";
5
+ import { WebRuntimeGlobalTarget } from "@weapp-core/constants";
4
6
  import { MpPlatform, OutputExtensions } from "@weapp-core/shared";
5
7
  import { WeappAstConfig } from "@weapp-vite/ast";
6
8
  import "@weapp-vite/ast/operations/onPageScroll";
@@ -10,22 +12,23 @@ import { ComponentStyleOptions, JsonConfig, JsonMergeContext, JsonMergeFunction,
10
12
  import { ConfigEnv, ConfigEnv as ConfigEnv$1, InlineConfig, InlineConfig as InlineConfig$1, Plugin, Plugin as Plugin$2, PluginOption, ResolvedConfig, ResolvedConfig as ResolvedConfig$1, UserConfig, ViteDevServer, ViteDevServer as ViteDevServer$1, build } from "vite";
11
13
  import { LRUCache } from "lru-cache";
12
14
  import { fdir } from "fdir";
15
+ import { Buffer } from "node:buffer";
13
16
  import { HmrCompilerAsset as WeappCompilerHmrAsset, HmrCompilerPreparation, HmrCompilerPreparation as WeappCompilerHmrPreparation, HmrCompilerRequest, HmrCompilerRequest as WeappCompilerHmrRequest } from "@weapp-vite/hmr";
14
17
  import PQueue from "p-queue";
15
- import { Buffer } from "node:buffer";
18
+ import "get-tsconfig";
16
19
  import { WrapPluginOptions } from "vite-plugin-performance";
17
20
  import { Options } from "rolldown-plugin-dts";
18
- import { ComputedDefinitions as ComputedDefinitions$1, MethodDefinitions as MethodDefinitions$1, PageLayoutMeta, Ref, WevuDefaults } from "wevu";
19
- import { MiniProgramNetworkDefaults } from "@wevu/web-apis";
20
21
  import { App, App as App$1, Component, Component as Component$1, GenerateType, Page, Page as Page$1, Plugin as Plugin$1, Sitemap, Sitemap as Sitemap$1, Theme, Theme as Theme$1 } from "@weapp-core/schematics";
22
+ import { ChokidarOptions } from "chokidar";
21
23
  import { InputOption, OutputBundle, OutputChunk, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownOutput as RolldownOutput$1, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcher as RolldownWatcher$1, WatchOptions as RolldownWatchOptions } from "rolldown";
24
+ import { MiniProgramNetworkDefaults } from "@wevu/web-apis/network-defaults";
25
+ import { PageLayoutMeta, WevuConfigDefaults } from "wevu/config";
22
26
  import { WeappWebPluginOptions } from "@weapp-vite/web/plugin";
23
27
  import { CompilerOptions } from "typescript";
24
28
  import { CreateCompilerOptions } from "weapp-tailwindcss/core";
25
29
  import { UserDefinedOptions } from "weapp-tailwindcss/types";
26
- import { PluginOptions } from "vite-tsconfig-paths";
30
+ import { ComputedDefinitions as ComputedDefinitions$1, MethodDefinitions as MethodDefinitions$1, Ref } from "wevu/types";
27
31
  import { DetectResult } from "package-manager-detector";
28
- //#region src/runtimeTarget.d.ts
29
32
  type WebPlatform = 'web';
30
33
  type WeappViteRuntime = 'miniprogram' | 'web';
31
34
  type WeappVitePlatform = MpPlatform$1 | WebPlatform;
@@ -54,8 +57,6 @@ declare function isWebPlatform(input?: string | null): boolean;
54
57
  declare function getSupportedWeappViteTargetDescriptors(): readonly WeappViteTargetDescriptor[];
55
58
  declare function getSupportedWeappVitePlatforms(): readonly WeappVitePlatform[];
56
59
  declare function resolveWeappViteTarget(input?: WeappViteTargetInput | null, options?: ResolveWeappViteTargetOptions): ResolvedWeappViteTarget;
57
- //#endregion
58
- //#region src/pluginHost.d.ts
59
60
  declare const WEAPP_VITE_HOST_NAME = "weapp-vite";
60
61
  interface WeappViteHostMeta {
61
62
  name: typeof WEAPP_VITE_HOST_NAME;
@@ -74,15 +75,11 @@ declare module 'vite' {
74
75
  weappVite?: WeappViteHostMeta;
75
76
  }
76
77
  }
77
- //#endregion
78
- //#region src/utils/importMeta.d.ts
79
78
  interface ImportMetaDefineRegistry {
80
79
  defineEntries: Record<string, any>;
81
80
  envObject: Record<string, any>;
82
81
  envMemberAccess: Record<string, any>;
83
82
  }
84
- //#endregion
85
- //#region src/types/config/foundation.d.ts
86
83
  type NpmBuildOptions = InlineConfig;
87
84
  type MpPlatform$1 = MpPlatform;
88
85
  /**
@@ -352,8 +349,6 @@ interface ChunksConfig {
352
349
  forceDuplicatePatterns?: (string | RegExp)[];
353
350
  duplicateWarningBytes?: number;
354
351
  }
355
- //#endregion
356
- //#region src/types/config/projectConfig.d.ts
357
352
  /** 保留原生工具新增字段,已声明字段仍提供类型检查与补全。 */
358
353
  interface NativeOptions {
359
354
  [key: string]: unknown;
@@ -510,8 +505,6 @@ interface MultiPlatformProjectConfigs {
510
505
  /** 百度:生成 `project.swan.json`。 */
511
506
  swan?: SwanProjectConfig;
512
507
  }
513
- //#endregion
514
- //#region src/types/config/wxmlTransform.d.ts
515
508
  /** 模板属性的新值;字符串为字面量,表达式只生成绑定而不在构建端求值。 */
516
509
  type WxmlAttributeValue = string | number | boolean | {
517
510
  expression: string;
@@ -569,8 +562,6 @@ interface WxmlTransformContext {
569
562
  error: (message: string) => never;
570
563
  }
571
564
  type WxmlTransform = (code: string, context: WxmlTransformContext) => WxmlTransformResult | Promise<WxmlTransformResult>;
572
- //#endregion
573
- //#region src/types/config/wxmlValidate.d.ts
574
565
  /** 诊断位置对应最终输出模板;不映射回 Vue 等源文件。 */
575
566
  interface WxmlValidationDiagnostic {
576
567
  severity: 'warning' | 'error';
@@ -587,8 +578,6 @@ interface WxmlValidationContext extends Pick<WxmlTransformContext, 'fileName' |
587
578
  }
588
579
  /** 返回值不用于转换;非 undefined 返回值会作为配置错误报告。 */
589
580
  type WxmlValidate = (code: string, context: WxmlValidationContext) => void | Promise<void>;
590
- //#endregion
591
- //#region src/types/config/features.d.ts
592
581
  /**
593
582
  * @description 自动导入组件配置
594
583
  */
@@ -764,7 +753,7 @@ interface WeappInjectWeapiConfig {
764
753
  replaceWx?: boolean;
765
754
  globalName?: string;
766
755
  }
767
- type WeappInjectWebRuntimeGlobalsTarget = 'fetch' | 'Headers' | 'Request' | 'Response' | 'TextEncoder' | 'TextDecoder' | 'AbortController' | 'AbortSignal' | 'XMLHttpRequest' | 'WebSocket' | 'atob' | 'btoa' | 'queueMicrotask' | 'performance' | 'crypto' | 'Event' | 'CustomEvent';
756
+ type WeappInjectWebRuntimeGlobalsTarget = WebRuntimeGlobalTarget;
768
757
  type WeappInjectRequestGlobalsTarget = WeappInjectWebRuntimeGlobalsTarget;
769
758
  /**
770
759
  * @description Web Runtime 全局对象注入配置
@@ -872,6 +861,8 @@ interface WeappVueTemplateConfig {
872
861
  htmlTagToWxmlTagClass?: boolean;
873
862
  scopedSlotsCompiler?: 'auto' | 'augmented' | 'off';
874
863
  scopedSlotsRequireProps?: boolean;
864
+ /** 是否启用微信原生插槽的 provide/inject 上下文协议,默认关闭;需同时开启 scopedSlotsRequireProps。 */
865
+ nativeSlotContext?: boolean;
875
866
  slotSingleRootNoWrapper?: boolean;
876
867
  slotFallbackWrapperStrategy?: 'view' | 'virtual-host';
877
868
  slotFallbackWrapper?: string | {
@@ -907,7 +898,7 @@ interface WeappVueConfig {
907
898
  */
908
899
  interface WeappWevuConfig {
909
900
  preset?: 'performance';
910
- defaults?: WevuDefaults;
901
+ defaults?: WevuConfigDefaults;
911
902
  autoSetDataPick?: boolean;
912
903
  /**
913
904
  * @description 是否压缩 wevu 相关脚本输出。
@@ -941,15 +932,100 @@ interface WeappRouteRule {
941
932
  preload?: WeappPreloadRule;
942
933
  }
943
934
  type WeappRouteRules = Record<string, WeappRouteRule>;
944
- //#endregion
945
- //#region src/types/config/tsconfigPaths.d.ts
935
+ interface PluginOptions {
936
+ /**
937
+ * The directory to crawl for `tsconfig.json` files.
938
+ *
939
+ * When the `projects` option is set, crawling is skipped, so this is
940
+ * used to resolve `projects` paths into absolute paths instead.
941
+ *
942
+ * @default
943
+ * // The config root is used for resolving project paths, and the
944
+ * // workspace root is used for crawling.
945
+ * options.projects ? viteConfig.root : vite.searchForWorkspaceRoot(viteConfig.root)
946
+ */
947
+ root?: string;
948
+ /**
949
+ * An array of `.json` files and/or directories that contain a
950
+ * `tsconfig.json` file. These JSON files must adhere to the
951
+ * {@link https://www.typescriptlang.org/tsconfig TypeScript config interface}.
952
+ * The `extends` property is supported.
953
+ *
954
+ * This disables crawling for `tsconfig.json` files when defined.
955
+ *
956
+ * **Note:** When using `projectDiscovery: "lazy"`, this option is perfect
957
+ * for ensuring your
958
+ * {@link https://www.typescriptlang.org/docs/handbook/project-references.html project references}
959
+ * are discovered.
960
+ */
961
+ projects?: string[];
962
+ /**
963
+ * Disable strictness that limits path resolution to TypeScript and
964
+ * JavaScript modules.
965
+ *
966
+ * Useful if you want asset URLs in Vue templates to be resolved, or when
967
+ * `"allowJs": true` in your tsconfig isn't good enough.
968
+ */
969
+ loose?: boolean;
970
+ /**
971
+ * Fine-grained control over which files should have their imports
972
+ * resolved by this plugin. This has no effect when `loose` is true.
973
+ */
974
+ importerFilter?: (importer: string) => boolean;
975
+ /**
976
+ * Silence the warning about malformed `tsconfig.json` files.
977
+ */
978
+ ignoreConfigErrors?: boolean;
979
+ /**
980
+ * An array of `tsconfig.json` file names to search for.
981
+ *
982
+ * @default ["tsconfig.json", "jsconfig.json"]
983
+ */
984
+ configNames?: string[];
985
+ /**
986
+ * A function that determines which directories to skip when searching
987
+ * for tsconfig.json files. While `.git` and `node_modules` directories
988
+ * are always skipped, this option allows you to skip additional
989
+ * directories, which is useful in large monorepos to improve
990
+ * performance.
991
+ *
992
+ * **Note:** This is not used when the `projects` option is set, unless
993
+ * `projectDiscovery` is set to `lazy`.
994
+ */
995
+ skip?: (dir: string) => boolean;
996
+ /**
997
+ * With the "lazy" strategy, the `tsconfig.json` files are parsed when an
998
+ * import is encountered in a module with a supported file extension that
999
+ * exists in the same directory as the `tsconfig.json` file (or one of
1000
+ * its subdirectories).
1001
+ *
1002
+ * **Note 1:** If your `tsconfig.json` files have `../*` paths in their
1003
+ * `include` or `files` array, the "lazy" strategy is not recommended,
1004
+ * since the tsconfig file won't be discovered for those cases.
1005
+ *
1006
+ * **Note 2:** You can combine the `projects` option with "lazy" to
1007
+ * ensure your project references are discovered. Alternatively, the
1008
+ * `configNames` option allows for custom-named tsconfig files to be
1009
+ * discovered.
1010
+ *
1011
+ * With the "eager" strategy, all `tsconfig.json` files are loaded and
1012
+ * parsed when the plugin is initialized. This means they won't be
1013
+ * reloaded if their file is edited. This was the only parsing strategy
1014
+ * prior to v5.2.0 and may be deprecated in a future version.
1015
+ *
1016
+ * @default "eager"
1017
+ */
1018
+ projectDiscovery?: "eager" | "lazy";
1019
+ /**
1020
+ * A file to write detailed logs of the resolver process.
1021
+ */
1022
+ logFile?: string | boolean;
1023
+ }
946
1024
  /** 高级路径适配选项,保留旧配置的类型兼容。 */
947
1025
  interface TsconfigPathsOptions extends PluginOptions {
948
1026
  /** @deprecated 解析器已统一处理继承和路径,此选项仅兼容旧配置,不再加载 TypeScript 编译器。 */
949
1027
  parseNative?: boolean;
950
1028
  }
951
- //#endregion
952
- //#region src/types/config/main.d.ts
953
1029
  type WeappTailwindcssOptions = UserDefinedOptions & Pick<CreateCompilerOptions, 'compiler'>;
954
1030
  /**
955
1031
  * @description 分包元信息
@@ -1200,8 +1276,6 @@ interface ProjectConfig {
1200
1276
  }[];
1201
1277
  };
1202
1278
  }
1203
- //#endregion
1204
- //#region src/types/compilerPlugin.d.ts
1205
1279
  type WeappCompilerPluginPhase = 'source' | 'output';
1206
1280
  type WeappCompilerResourceKind = 'style' | 'template' | 'script';
1207
1281
  interface WeappCompilerPluginCapabilities {
@@ -1286,8 +1360,6 @@ interface WeappCompilerPlugin {
1286
1360
  }
1287
1361
  type WeappCompilerPluginFactory = (context: WeappCompilerPluginContext) => WeappCompilerPlugin | Promise<WeappCompilerPlugin>;
1288
1362
  type WeappCompilerPluginOption = WeappCompilerPlugin | WeappCompilerPluginFactory;
1289
- //#endregion
1290
- //#region src/types/context.d.ts
1291
1363
  interface WxmlDep {
1292
1364
  tagName: string;
1293
1365
  start: number;
@@ -1302,8 +1374,6 @@ interface ScanComponentItem {
1302
1374
  end: number;
1303
1375
  }
1304
1376
  type ComponentsMap = Record<string, ScanComponentItem[]>;
1305
- //#endregion
1306
- //#region src/types/entry.d.ts
1307
1377
  interface BaseEntry {
1308
1378
  path: string;
1309
1379
  jsonPath?: string;
@@ -1344,8 +1414,6 @@ interface ComponentEntry extends BaseEntry {
1344
1414
  jsonPath: string;
1345
1415
  }
1346
1416
  type EntryJsonFragment = Omit<BaseEntry, 'path' | 'type'>;
1347
- //#endregion
1348
- //#region src/types/errors.d.ts
1349
1417
  interface BindingErrorLike {
1350
1418
  message?: string;
1351
1419
  code?: string;
@@ -1354,11 +1422,7 @@ interface BindingErrorLike {
1354
1422
  frame?: string;
1355
1423
  stack?: string;
1356
1424
  }
1357
- //#endregion
1358
- //#region src/moduleGraph/protocol.d.ts
1359
1425
  type SidecarModuleKind = 'json' | 'jsx' | 'layout' | 'script' | 'style' | 'template' | 'using-component' | 'wxs';
1360
- //#endregion
1361
- //#region src/moduleGraph/types.d.ts
1362
1426
  interface BuildModuleInfo {
1363
1427
  dynamicImporters?: readonly string[];
1364
1428
  exports?: readonly string[];
@@ -1411,8 +1475,6 @@ interface TopologyRescanRequest {
1411
1475
  files: Set<string>;
1412
1476
  reasons: Set<string>;
1413
1477
  }
1414
- //#endregion
1415
- //#region src/moduleGraph/service.d.ts
1416
1478
  interface ModuleGraphService {
1417
1479
  /** 只替换指定 scope;返回仅对应本次绑定的释放器。 */
1418
1480
  bindBuildContext: (scope: object, context: BuildGraphContext) => () => void;
@@ -1423,7 +1485,8 @@ interface ModuleGraphService {
1423
1485
  bindPluginContext: (scope: object, context: BuildGraphContext) => void;
1424
1486
  /** 仅用于整个会话关闭或替换,不用于普通增量构建或临时 snapshot。 */
1425
1487
  resetSession: () => void;
1426
- collectAffectedEntries: (file: string) => Set<string>;
1488
+ /** 指定 kind 时仅查询该类声明依赖,不展开构建引擎的模块图。 */
1489
+ collectAffectedEntries: (file: string, kind?: SidecarModuleKind) => Set<string>;
1427
1490
  getPendingChanges: () => Array<{
1428
1491
  event: string;
1429
1492
  file: string;
@@ -1436,7 +1499,7 @@ interface ModuleGraphService {
1436
1499
  id: string;
1437
1500
  resolveDependencies?: boolean;
1438
1501
  }) => Promise<BuildModuleInfo>;
1439
- replaceEntryDependencies: (ownerId: string, kind: SidecarModuleKind, sourceIds: Iterable<string>) => void;
1502
+ replaceEntryDependencies: (ownerId: string, kind: SidecarModuleKind, sourceIds: Iterable<string>, resolveSourceId?: (id: string) => string) => void;
1440
1503
  /** 释放 owner 自己的依赖声明;实际 import graph 的更新仍由构建引擎负责。 */
1441
1504
  removeEntryDependencies: (ownerId: string) => void;
1442
1505
  recordChangedFile: (file: string, event: string) => void;
@@ -1450,13 +1513,13 @@ interface ModuleGraphService {
1450
1513
  syncDevGraph: (context: BuildGraphContext) => Promise<void>;
1451
1514
  getTransformDependencies: (sourceId: string) => readonly string[];
1452
1515
  replaceTransformDependencies: (sourceId: string, dependencies: Iterable<string>) => void;
1453
- getEntryDependencies: (ownerId: string) => Array<{
1516
+ getEntryDependencies: (ownerId: string, options?: {
1517
+ preserveAliases: boolean;
1518
+ }) => Array<{
1454
1519
  kind: SidecarModuleKind;
1455
1520
  sourceId: string;
1456
1521
  }>;
1457
1522
  }
1458
- //#endregion
1459
- //#region src/runtime/buildPlugin/service.d.ts
1460
1523
  interface BuildOptions {
1461
1524
  skipNpm?: boolean;
1462
1525
  }
@@ -1468,8 +1531,6 @@ interface BuildService {
1468
1531
  getIndependentOutput: (root: string) => RolldownOutput | undefined;
1469
1532
  invalidateIndependentOutput: (root: string) => void;
1470
1533
  }
1471
- //#endregion
1472
- //#region ../../node_modules/.pnpm/pkg-types@2.3.3/node_modules/pkg-types/dist/index.d.mts
1473
1534
  interface PackageJson {
1474
1535
  /**
1475
1536
  * The name is what your thing is called.
@@ -1764,26 +1825,18 @@ type PackageJsonFunding = string | {
1764
1825
  type PackageJsonExportKey = "." | "import" | "require" | "types" | "node" | "browser" | "default" | (string & {});
1765
1826
  type PackageJsonExportsObject = { [P in PackageJsonExportKey]?: string | PackageJsonExportsObject | Array<string | PackageJsonExportsObject>; };
1766
1827
  type PackageJsonExports = string | PackageJsonExportsObject | Array<string | PackageJsonExportsObject>;
1767
- //#endregion
1768
- //#region src/multiPlatform.d.ts
1769
1828
  interface ResolvedMultiPlatformConfig {
1770
1829
  enabled: boolean;
1771
1830
  projectConfigRoot: string;
1772
1831
  targets: readonly MpPlatform$1[];
1773
1832
  projectConfigs?: MultiPlatformProjectConfigs;
1774
1833
  }
1775
- //#endregion
1776
- //#region src/utils/json.d.ts
1777
1834
  interface JsonResolvableEntry {
1778
1835
  json?: any;
1779
1836
  jsonPath?: string;
1780
1837
  type?: 'app' | 'page' | 'component' | 'plugin';
1781
1838
  }
1782
- //#endregion
1783
- //#region src/utils/loadViteConfigFile.d.ts
1784
1839
  type ViteConfigLoader = 'bundle' | 'runner' | 'native';
1785
- //#endregion
1786
- //#region src/runtime/config/types.d.ts
1787
1840
  interface LoadConfigOptions {
1788
1841
  cwd: string;
1789
1842
  isDev: boolean;
@@ -1920,8 +1973,6 @@ interface ResolvedWeappWebConfig {
1920
1973
  userConfig?: InlineConfig;
1921
1974
  source?: WeappWebConfig;
1922
1975
  }
1923
- //#endregion
1924
- //#region src/cache/file.d.ts
1925
1976
  type HashInput = string | Buffer;
1926
1977
  declare class FileCache<T extends object> {
1927
1978
  cache: LRUCache<string, T>;
@@ -1938,15 +1989,11 @@ declare class FileCache<T extends object> {
1938
1989
  signature?: string;
1939
1990
  }): Promise<boolean>;
1940
1991
  }
1941
- //#endregion
1942
- //#region src/runtime/jsonPlugin.d.ts
1943
1992
  interface JsonService {
1944
1993
  read: (filepath: string) => Promise<any>;
1945
1994
  resolve: (entry: JsonResolvableEntry) => string | undefined;
1946
1995
  cache: FileCache<any>;
1947
1996
  }
1948
- //#endregion
1949
- //#region src/runtime/npmPlugin/builder/packageBuilder.d.ts
1950
1997
  interface PackageBuilder {
1951
1998
  isMiniprogramPackage: (pkg: PackageJson) => boolean;
1952
1999
  shouldSkipBuild: (outDir: string, isOutdated: boolean) => Promise<boolean>;
@@ -1970,8 +2017,6 @@ interface BuildPackageArgs {
1970
2017
  options?: NpmBuildOptions;
1971
2018
  isDependenciesCacheOutdate: boolean;
1972
2019
  }
1973
- //#endregion
1974
- //#region src/runtime/npmPlugin/service/types.d.ts
1975
2020
  interface NpmService {
1976
2021
  getDependenciesCacheFilePath: (key?: string) => string;
1977
2022
  readonly dependenciesCacheHash: string;
@@ -1998,46 +2043,6 @@ interface NpmService {
1998
2043
  }[];
1999
2044
  build: (options?: NpmBuildOptions) => Promise<void>;
2000
2045
  }
2001
- //#endregion
2002
- //#region src/analyze/glassEasel/types.d.ts
2003
- type GlassEaselDiagnosticCode = 'GE001' | 'GE002' | 'GE003' | 'GE004' | 'GE005' | 'GE006';
2004
- type GlassEaselDiagnosticSeverity = 'error' | 'warning';
2005
- interface GlassEaselDiagnostic {
2006
- code: GlassEaselDiagnosticCode;
2007
- severity: GlassEaselDiagnosticSeverity;
2008
- message: string;
2009
- file: string;
2010
- line?: number;
2011
- column?: number;
2012
- normalized?: boolean;
2013
- }
2014
- /** 每个 source/output owner 的最近分析事实;日志去重状态不属于当前事实。 */
2015
- interface GlassEaselAnalysisFact {
2016
- kind: 'output' | 'source';
2017
- scope?: string;
2018
- detected: boolean;
2019
- diagnostics: Map<string, GlassEaselDiagnostic>;
2020
- sourceIds: Set<string>;
2021
- }
2022
- interface GlassEaselAnalyzeResult {
2023
- detected: boolean;
2024
- minimumBaseLibrary: '3.8.12';
2025
- migrationGuide: string;
2026
- diagnostics: GlassEaselDiagnostic[];
2027
- summary: {
2028
- errors: number;
2029
- warnings: number;
2030
- };
2031
- }
2032
- interface GlassEaselTemplateFinding {
2033
- code: Extract<GlassEaselDiagnosticCode, 'GE002' | 'GE003' | 'GE004'>;
2034
- severity: GlassEaselDiagnosticSeverity;
2035
- message: string;
2036
- start: number;
2037
- normalized?: boolean;
2038
- }
2039
- //#endregion
2040
- //#region src/utils/hmrProfile/provenance.d.ts
2041
2046
  interface HmrProfileSourceEvent {
2042
2047
  eventId: string;
2043
2048
  event?: ChangeEvent;
@@ -2051,15 +2056,11 @@ interface HmrProfileProvenance {
2051
2056
  batchWaitMs?: number;
2052
2057
  queueWaitMs?: number;
2053
2058
  }
2054
- //#endregion
2055
- //#region src/wxml/shared.d.ts
2056
2059
  interface Token {
2057
2060
  start: number;
2058
2061
  end: number;
2059
2062
  value: string;
2060
2063
  }
2061
- //#endregion
2062
- //#region src/wxml/scan/types.d.ts
2063
2064
  interface RemovalRange {
2064
2065
  start: number;
2065
2066
  end: number;
@@ -2096,12 +2097,8 @@ interface WxmlToken {
2096
2097
  glassEaselFindings?: GlassEaselTemplateFinding[];
2097
2098
  code: string;
2098
2099
  }
2099
- //#endregion
2100
- //#region src/wxml/scan/index.d.ts
2101
2100
  declare function scanWxml(wxml: string | Buffer, options?: ScanWxmlOptions): WxmlToken;
2102
2101
  type ScanWxmlResult = ReturnType<typeof scanWxml>;
2103
- //#endregion
2104
- //#region src/wxml/processing/registry.d.ts
2105
2102
  type TemplateDependencies = Map<string, Set<string>>;
2106
2103
  type ProcessingStage = 'transform' | 'validate';
2107
2104
  interface WxmlDependencyRegistry {
@@ -2115,30 +2112,22 @@ interface WxmlDependencyRegistry {
2115
2112
  references: Map<string, number>;
2116
2113
  listeners: Set<(files: string[]) => void>;
2117
2114
  }
2118
- //#endregion
2119
- //#region src/runtime/autoImport/types.d.ts
2120
2115
  interface LocalAutoImportMatch {
2121
2116
  kind: 'local';
2122
2117
  entry: ComponentEntry;
2123
2118
  value: ResolvedValue;
2124
2119
  }
2125
- //#endregion
2126
- //#region src/runtime/autoRoutesPlugin/types.d.ts
2127
2120
  interface NamedAutoRoute {
2128
2121
  name: string;
2129
2122
  path: string;
2130
2123
  meta: Record<string, StaticRouteValue>;
2131
2124
  }
2132
- //#endregion
2133
- //#region src/runtime/watcher/types.d.ts
2134
2125
  interface WatcherInstance {
2135
2126
  close: () => void | Promise<void>;
2136
2127
  }
2137
2128
  interface SidecarWatcher {
2138
2129
  close: () => void | Promise<void>;
2139
2130
  }
2140
- //#endregion
2141
- //#region src/runtime/runtimeState.d.ts
2142
2131
  interface AutoRoutesCandidateState {
2143
2132
  base: string;
2144
2133
  files: Set<string>;
@@ -2221,6 +2210,8 @@ interface RuntimeState {
2221
2210
  entriesMap: Map<string, Entry | undefined>;
2222
2211
  vueEntryHasTemplate: Map<string, boolean>;
2223
2212
  vueEntrySfcSignatures: Map<string, VueSfcBlockSignatures>;
2213
+ /** 当前编译 generation 的模板注册签名,只随成功快照交付为基线。 */
2214
+ templateRegistrationSignatures?: Map<string, string | undefined>;
2224
2215
  vueEntryStyleBindings: Map<string, VueEntryStyleBindings>;
2225
2216
  /** 编译 provider 内容签名;key 为入口,value 的 key 为 provider 名称。 */
2226
2217
  vueEntryContentSignatures?: Map<string, Readonly<Record<string, string>>>;
@@ -2235,6 +2226,8 @@ interface RuntimeState {
2235
2226
  isRebuild: boolean;
2236
2227
  /** 当前快照从根入口重建可达图;完整发布后才撤销旧产物。 */
2237
2228
  fullEntryScan?: boolean;
2229
+ /** 当前快照已清空输出缓存并重发全部资源,不要求重新扫描入口拓扑。 */
2230
+ fullSnapshotOutput: boolean;
2238
2231
  didEmitAllEntries: boolean;
2239
2232
  lastHmrEntryIds: Set<string>;
2240
2233
  lastEmittedEntryIds: Set<string>;
@@ -2291,6 +2284,16 @@ interface RuntimeState {
2291
2284
  snapshotResolveMs?: number;
2292
2285
  snapshotBuildMs?: number;
2293
2286
  writeMs?: number;
2287
+ /** Tailwind 六个连续输出阶段均包含在 writeMs 中,不能与 writeMs 再次相加。 */
2288
+ tailwindPrepareMs?: number;
2289
+ tailwindGenerateMs?: number;
2290
+ tailwindCssMs?: number;
2291
+ tailwindTemplateMs?: number;
2292
+ tailwindJavaScriptMs?: number;
2293
+ tailwindFinalizeMs?: number;
2294
+ /** 来源解析与磁盘生成是 tailwindGenerateMs 的累计子项,多 root 可重叠,不能当作连续阶段相加。 */
2295
+ tailwindSourceResolveMs?: number;
2296
+ tailwindDiskGenerateMs?: number;
2294
2297
  finalizePrepareMs?: number;
2295
2298
  finalizeTemplateMs?: number;
2296
2299
  finalizePublishMs?: number;
@@ -2355,6 +2358,16 @@ interface RuntimeState {
2355
2358
  snapshotResolveMs?: number;
2356
2359
  snapshotBuildMs?: number;
2357
2360
  writeMs?: number;
2361
+ /** Tailwind 六个连续输出阶段均包含在 writeMs 中,不能与 writeMs 再次相加。 */
2362
+ tailwindPrepareMs?: number;
2363
+ tailwindGenerateMs?: number;
2364
+ tailwindCssMs?: number;
2365
+ tailwindTemplateMs?: number;
2366
+ tailwindJavaScriptMs?: number;
2367
+ tailwindFinalizeMs?: number;
2368
+ /** 来源解析与磁盘生成是 tailwindGenerateMs 的累计子项,多 root 可重叠,不能当作连续阶段相加。 */
2369
+ tailwindSourceResolveMs?: number;
2370
+ tailwindDiskGenerateMs?: number;
2358
2371
  finalizePrepareMs?: number;
2359
2372
  finalizeTemplateMs?: number;
2360
2373
  finalizePublishMs?: number;
@@ -2393,6 +2406,7 @@ interface RuntimeState {
2393
2406
  }>;
2394
2407
  emittedSource: Map<string, string>;
2395
2408
  sidecarImports: Set<string>;
2409
+ sidecarImportsByOwner: Map<string, Set<string>>;
2396
2410
  };
2397
2411
  watcher: {
2398
2412
  rollupWatcherMap: Map<string, WatcherInstance>;
@@ -2433,8 +2447,6 @@ interface RuntimeState {
2433
2447
  options: LoadConfigResult;
2434
2448
  };
2435
2449
  }
2436
- //#endregion
2437
- //#region src/runtime/scanPlugin/service/index.d.ts
2438
2450
  interface ScanService {
2439
2451
  appEntry?: AppEntry;
2440
2452
  pluginJson?: Plugin$1;
@@ -2451,8 +2463,6 @@ interface ScanService {
2451
2463
  markIndependentDirty: (root: string) => void;
2452
2464
  drainIndependentDirtyRoots: () => string[];
2453
2465
  }
2454
- //#endregion
2455
- //#region src/runtime/watcherPlugin.d.ts
2456
2466
  interface WatcherService {
2457
2467
  rollupWatcherMap: Map<string, WatcherInstance>;
2458
2468
  sidecarWatcherMap: Map<string, SidecarWatcher>;
@@ -2461,8 +2471,6 @@ interface WatcherService {
2461
2471
  close: (root?: string) => void;
2462
2472
  closeAll: () => void | Promise<void>;
2463
2473
  }
2464
- //#endregion
2465
- //#region src/runtime/webPlugin.d.ts
2466
2474
  interface WebService {
2467
2475
  readonly devServer?: ViteDevServer;
2468
2476
  isEnabled: () => boolean;
@@ -2470,12 +2478,8 @@ interface WebService {
2470
2478
  build: () => Promise<Awaited<ReturnType<typeof build>> | undefined>;
2471
2479
  close: () => Promise<void>;
2472
2480
  }
2473
- //#endregion
2474
- //#region src/runtime/wxmlPlugin/service/shared.d.ts
2475
2481
  type WxmlDependencyKind = 'template-import' | 'template-include' | 'script-module' | 'unknown';
2476
2482
  type WxmlImporterDependencyKind = WxmlDependencyKind | 'mixed';
2477
- //#endregion
2478
- //#region src/runtime/wxmlPlugin/types.d.ts
2479
2483
  interface WxmlService {
2480
2484
  depsMap: Map<string, Set<string>>;
2481
2485
  importerMap: Map<string, Set<string>>;
@@ -2507,8 +2511,6 @@ interface WxmlService {
2507
2511
  scan: (filepath: string) => Promise<ScanWxmlResult | undefined>;
2508
2512
  setWxmlComponentsMap: (absPath: string, components: ComponentsMap) => void;
2509
2513
  }
2510
- //#endregion
2511
- //#region src/runtime/autoImport/service/types.d.ts
2512
2514
  interface ResolverAutoImportMatch {
2513
2515
  kind: 'resolver';
2514
2516
  value: ResolvedValue;
@@ -2532,16 +2534,10 @@ interface AutoImportService {
2532
2534
  awaitPendingRegistrations?: () => Promise<void>;
2533
2535
  awaitManifestWrites: () => Promise<void>;
2534
2536
  }
2535
- //#endregion
2536
- //#region src/runtime/autoRoutesPlugin/routes/scan.d.ts
2537
2537
  interface ScanRoutesOptions {
2538
2538
  resolvePageDeclarationSource?: ResolveSfcBlockSrcOptions['resolveId'];
2539
2539
  }
2540
- //#endregion
2541
- //#region src/runtime/autoRoutesPlugin/watch.d.ts
2542
2540
  type AutoRoutesFileEvent = ChangeEvent | 'rename';
2543
- //#endregion
2544
- //#region src/runtime/autoRoutesPlugin/service.d.ts
2545
2541
  type PageDeclarationSourceResolver = NonNullable<ScanRoutesOptions['resolvePageDeclarationSource']>;
2546
2542
  interface AutoRoutesService {
2547
2543
  /** 活动构建解析器只参与本次刷新,不替换服务持有的长期解析器。 */
@@ -2550,6 +2546,8 @@ interface AutoRoutesService {
2550
2546
  getSnapshot: () => AutoRoutes;
2551
2547
  getReference: () => AutoRoutes;
2552
2548
  getSignature: () => string;
2549
+ /** 返回最近完整扫描中的源码指纹;未知源码不能作为已发布的去重凭据。 */
2550
+ getSourceFingerprint: (filePath: string) => string | undefined;
2553
2551
  getModuleCode: () => string;
2554
2552
  getNamedModuleCode: () => string;
2555
2553
  getWatchFiles: () => Iterable<string>;
@@ -2566,8 +2564,6 @@ interface AutoRoutesService {
2566
2564
  isInitialized: () => boolean;
2567
2565
  isEnabled: () => boolean;
2568
2566
  }
2569
- //#endregion
2570
- //#region src/context/CompilerContext.d.ts
2571
2567
  type BuildTarget = 'app' | 'plugin';
2572
2568
  interface CompilerContext {
2573
2569
  runtimeState: RuntimeState;
@@ -2583,16 +2579,12 @@ interface CompilerContext {
2583
2579
  buildService: BuildService;
2584
2580
  scanService: ScanService;
2585
2581
  currentBuildTarget?: BuildTarget;
2586
- onStatefulHmrSourceChange?: (file: string, dirtyReasonSummary: string[]) => void;
2582
+ onStatefulHmrSourceChange?: (file: string, dirtyReasonSummary: string[], sourceEvent?: HmrProfileSourceEvent) => void;
2587
2583
  }
2588
- //#endregion
2589
- //#region src/types/plugin.d.ts
2590
2584
  interface WeappVitePluginApi {
2591
2585
  ctx: CompilerContext;
2592
2586
  }
2593
2587
  type ChangeEvent = 'create' | 'update' | 'delete';
2594
- //#endregion
2595
- //#region src/json.d.ts
2596
2588
  type ReturnSelf<T> = (config: T) => T;
2597
2589
  type ConfigFn<T> = T | ((ctx: CompilerContext) => T);
2598
2590
  type DefineJsonFn<T> = ReturnSelf<ConfigFn<T>>;
@@ -2616,8 +2608,6 @@ declare const defineSitemapJson: DefineJsonFn<Sitemap$1>;
2616
2608
  * @description 定义 theme.json(支持直接对象或函数形式)
2617
2609
  */
2618
2610
  declare const defineThemeJson: DefineJsonFn<Theme$1>;
2619
- //#endregion
2620
- //#region src/config.d.ts
2621
2611
  /**
2622
2612
  * @description weapp-vite 的用户配置(扩展 Vite UserConfig)
2623
2613
  */
@@ -2631,6 +2621,12 @@ type UserConfigFnObject<T extends UserConfig$1 = UserConfig$1> = (env: ConfigEnv
2631
2621
  type UserConfigFnPromise<T extends UserConfig$1 = UserConfig$1> = (env: ConfigEnv) => Promise<T>;
2632
2622
  type UserConfigFn<T extends UserConfig$1 = UserConfig$1> = (env: ConfigEnv) => T | Promise<T>;
2633
2623
  type UserConfigExport<T extends UserConfig$1 = UserConfig$1> = T | Promise<T> | UserConfigFnObject<T> | UserConfigFnPromise<T> | UserConfigFn<T>;
2624
+ declare module 'rolldown' {
2625
+ interface WatcherOptions {
2626
+ /** weapp-vite 自有 sidecar watcher 的 backend 与轮询选项。 */
2627
+ chokidar?: Pick<ChokidarOptions, 'backend' | 'pollingInterval' | 'pollingBinaryInterval' | 'usePolling' | 'interval' | 'binaryInterval'>;
2628
+ }
2629
+ }
2634
2630
  declare module 'vite' {
2635
2631
  interface UserConfig {
2636
2632
  weapp?: WeappViteConfig;
@@ -2643,5 +2639,4 @@ declare module 'vite' {
2643
2639
  * @description 导致 `platform` 等联合字面量字段被宽化为 `string`。
2644
2640
  */
2645
2641
  declare function defineConfig<T extends UserConfigExport>(config: T): T;
2646
- //#endregion
2647
- export { WeappCompilerHmrRequest as $, NpmMainPackageConfig as $n, WeappSubPackageConfig as $t, PluginOption as A, DeprecatedInlineDynamicImports as An, WeappWebConfig as Ar, ScanWxmlOptions as At, ViteDevServer$1 as B, GenerateTemplateFileSource as Bn, WeappVitePlatform as Br, WeappInjectRequestGlobalsTarget as Bt, GlassEaselAnalyzeResult as C, Alias as Cn, WeappLibInternalDtsOptions as Cr, WeappViteConfig as Ct, InlineConfig$1 as D, ChunksConfig as Dn, WeappManagedServerTsconfigConfig as Dr, EnhanceWxmlOptions as Dt, ConfigEnv$1 as E, BuildNpmPackageMeta as En, WeappManagedNodeTsconfigConfig as Er, EnhanceOptions as Et, RolldownOutput$1 as F, GenerateOptions as Fn, isWeappViteHost as Fr, WeappAutoRoutesIncludePattern as Ft, Entry as G, JsonConfig as Gn, WebPlatform as Gr, WeappNpmConfig as Gt, AppEntry as H, GenerateTemplateScope as Hn, WeappViteTargetDescriptor as Hr, WeappInjectWebRuntimeGlobalsConfig as Ht, RolldownPlugin as I, GenerateTemplate as In, resolveWeappViteHostMeta as Ir, WeappBuildScopeConfig as It, ComponentsMap as J, JsonMergeStage as Jn, isWebPlatform as Jr, WeappReactCompilerConfig as Jt, EntryJsonFragment as K, JsonMergeContext as Kn, getSupportedWeappVitePlatforms as Kr, WeappPreloadNetwork as Kt, RolldownPluginOption as L, GenerateTemplateContext as Ln, ResolveWeappViteTargetOptions as Lr, WeappBuildScopeObjectConfig as Lt, ResolvedConfig$1 as M, GenerateExtensionsOptions as Mn, WeappViteHostMeta as Mr, WeappAppPreludeMode as Mt, RolldownBuild as N, GenerateFileType as Nn, applyWeappViteHostMeta as Nr, WeappAutoRoutesConfig as Nt, MethodDefinitions$1 as O, CopyGlobs as On, WeappManagedSharedTsconfigConfig as Or, HandleWxmlOptions as Ot, RolldownOptions as P, GenerateFilenamesOptions as Pn, createWeappViteHostMeta as Pr, WeappAutoRoutesInclude as Pt, WeappCompilerHmrPreparation as Q, NpmDependencyPattern as Qn, WeappRouteRules as Qt, RolldownWatchOptions as R, GenerateTemplateEntry as Rn, ResolvedWeappViteTarget as Rr, WeappHmrConfig as Rt, CompilerContext as S, MultiPlatformProjectConfigs as Sn, WeappLibFileName as Sr, WeappUploadConfig as St, ComputedDefinitions$1 as T, AlipayNpmMode as Tn, WeappManagedAppTsconfigConfig as Tr, AutoImportComponentsOption as Tt, BaseEntry as U, GenerateTemplatesConfig as Un, WeappViteTargetInput as Ur, WeappInjectWebRuntimeGlobalsTarget as Ut, BindingErrorLike as V, GenerateTemplateInlineSource as Vn, WeappViteRuntime as Vr, WeappInjectWeapiConfig as Vt, ComponentEntry as W, JsFormat as Wn, WeappViteTargetKind as Wr, WeappMcpConfig as Wt, WxmlDep as X, MpPlatform$1 as Xn, WeappRequestRuntimeConfig as Xt, ScanComponentItem as Y, JsonMergeStrategy as Yn, resolveWeappViteTarget as Yr, WeappReactConfig as Yt, WeappCompilerHmrAsset as Z, NpmBuildOptions as Zn, WeappRouteRule as Zt, definePageJson as _, WxmlTransformContext as _n, SubPackageStyleScope as _r, WeappAnalyzeHistoryConfig as _t, UserConfigFnNoEnvPlain as a, WeappWorkerConfig as an, SharedChunkDynamicImports as ar, WeappCompilerPluginFactory as at, ChangeEvent as b, WxmlTransformVisitor as bn, WeappLibDtsOptions as br, WeappForwardConsoleLogLevel as bt, UserConfigFnPromise as c, WxmlValidate as cn, SharedChunkStrategy as cr, WeappCompilerResourceKind as ct, Component$1 as d, WxmlValidationVisitor as dn, StyleEntry as dr, WeappCompilerTransformResult as dt, WeappUniAppConfig as en, NpmPackageFilesConfig as er, WeappCompilerOutputRequest as et, Page$1 as f, WxmlAttribute as fn, StyleScope as fr, ProjectConfig as ft, defineComponentJson as g, WxmlTransform as gn, SubPackageStyleEntry as gr, WeappAnalyzeConfig as gt, defineAppJson as h, WxmlSourceLocation as hn, SubPackageStyleConfigObject as hr, WeappAnalyzeBudgetConfig as ht, UserConfigFnNoEnv as i, WeappWevuConfig as in, ResolvedAlias as ir, WeappCompilerPluginController as it, Ref as j, GenerateDirsOptions as jn, WEAPP_VITE_HOST_NAME as jr, WeappAppPreludeConfig as jt, Plugin$2 as k, CopyOptions as kn, WeappManagedTypeScriptConfig as kr, MultiPlatformConfig as kt, defineConfig as l, WxmlValidationContext as ln, StyleConfigEntry as lr, WeappCompilerSourceClaim as lt, Theme$1 as m, WxmlElementInfo as mn, SubPackageStyleConfigEntry as mr, UserConfig$2 as mt, UserConfigExport as n, WeappVueTemplateConfig as nn, NpmStrategy as nr, WeappCompilerPluginCapabilities as nt, UserConfigFnObject as o, WxmlRemoveAttrRule as on, SharedChunkMode as or, WeappCompilerPluginOption as ot, Sitemap$1 as p, WxmlAttributeValue as pn, SubPackage as pr, SubPackageMetaValue as pt, PageEntry as q, JsonMergeFunction as qn, getSupportedWeappViteTargetDescriptors as qr, WeappPreloadRule as qt, UserConfigFn as r, WeappWebRuntimeConfig as rn, NpmSubPackageConfig as rr, WeappCompilerPluginContext as rt, UserConfigFnObjectPlain as s, WxmlRemoveOptions as sn, SharedChunkOverride as sr, WeappCompilerPluginPhase as st, UserConfig$1 as t, WeappVueConfig as tn, NpmPluginPackageConfig as tr, WeappCompilerPlugin as tt, App$1 as u, WxmlValidationDiagnostic as un, StyleConfigObject as ur, WeappCompilerSourceRequest as ut, defineSitemapJson as v, WxmlTransformNode as vn, WeappLibComponentJson as vr, WeappDebugConfig as vt, LoadConfigOptions as w, AliasOptions as wn, WeappLibVueTscOptions as wr, AutoImportComponents as wt, WeappVitePluginApi as x, MultiPlatformProjectConfig as xn, WeappLibEntryContext as xr, WeappTailwindcssOptions as xt, defineThemeJson as y, WxmlTransformResult as yn, WeappLibConfig as yr, WeappForwardConsoleConfig as yt, RolldownWatcher$1 as z, GenerateTemplateFactory as zn, WEB_PLATFORM_ALIASES as zr, WeappInjectRequestGlobalsConfig as zt };
2642
+ export { WeappCompilerOutputRequest as $, NpmPackageFilesConfig as $n, WeappUniAppConfig as $t, Ref as A, GenerateDirsOptions as An, WEAPP_VITE_HOST_NAME as Ar, WeappAppPreludeConfig as At, BindingErrorLike as B, GenerateTemplateInlineSource as Bn, WeappViteRuntime as Br, WeappInjectWeapiConfig as Bt, LoadConfigOptions as C, AliasOptions as Cn, WeappLibVueTscOptions as Cr, AutoImportComponents as Ct, MethodDefinitions$1 as D, CopyGlobs as Dn, WeappManagedSharedTsconfigConfig as Dr, HandleWxmlOptions as Dt, InlineConfig$1 as E, ChunksConfig as En, WeappManagedServerTsconfigConfig as Er, EnhanceWxmlOptions as Et, RolldownPlugin as F, GenerateTemplate as Fn, resolveWeappViteHostMeta as Fr, WeappBuildScopeConfig as Ft, EntryJsonFragment as G, JsonMergeContext as Gn, getSupportedWeappVitePlatforms as Gr, WeappPreloadNetwork as Gt, BaseEntry as H, GenerateTemplatesConfig as Hn, WeappViteTargetInput as Hr, WeappInjectWebRuntimeGlobalsTarget as Ht, RolldownPluginOption as I, GenerateTemplateContext as In, ResolveWeappViteTargetOptions as Ir, WeappBuildScopeObjectConfig as It, ScanComponentItem as J, JsonMergeStrategy as Jn, resolveWeappViteTarget as Jr, WeappReactConfig as Jt, PageEntry as K, JsonMergeFunction as Kn, getSupportedWeappViteTargetDescriptors as Kr, WeappPreloadRule as Kt, RolldownWatchOptions as L, GenerateTemplateEntry as Ln, ResolvedWeappViteTarget as Lr, WeappHmrConfig as Lt, RolldownBuild as M, GenerateFileType as Mn, applyWeappViteHostMeta as Mr, WeappAutoRoutesConfig as Mt, RolldownOptions as N, GenerateFilenamesOptions as Nn, createWeappViteHostMeta as Nr, WeappAutoRoutesInclude as Nt, Plugin$2 as O, CopyOptions as On, WeappManagedTypeScriptConfig as Or, MultiPlatformConfig as Ot, RolldownOutput$1 as P, GenerateOptions as Pn, isWeappViteHost as Pr, WeappAutoRoutesIncludePattern as Pt, WeappCompilerHmrRequest as Q, NpmMainPackageConfig as Qn, WeappSubPackageConfig as Qt, RolldownWatcher$1 as R, GenerateTemplateFactory as Rn, WEB_PLATFORM_ALIASES as Rr, WeappInjectRequestGlobalsConfig as Rt, CompilerContext as S, Alias as Sn, WeappLibInternalDtsOptions as Sr, WeappViteConfig as St, ConfigEnv$1 as T, BuildNpmPackageMeta as Tn, WeappManagedNodeTsconfigConfig as Tr, EnhanceOptions as Tt, ComponentEntry as U, JsFormat as Un, WeappViteTargetKind as Ur, WeappMcpConfig as Ut, AppEntry as V, GenerateTemplateScope as Vn, WeappViteTargetDescriptor as Vr, WeappInjectWebRuntimeGlobalsConfig as Vt, Entry as W, JsonConfig as Wn, WebPlatform as Wr, WeappNpmConfig as Wt, WeappCompilerHmrAsset as X, NpmBuildOptions as Xn, WeappRouteRule as Xt, WxmlDep as Y, MpPlatform$1 as Yn, WeappRequestRuntimeConfig as Yt, WeappCompilerHmrPreparation as Z, NpmDependencyPattern as Zn, WeappRouteRules as Zt, definePageJson as _, WxmlTransformNode as _n, WeappLibComponentJson as _r, WeappDebugConfig as _t, UserConfigFnNoEnvPlain as a, WxmlRemoveAttrRule as an, SharedChunkMode as ar, WeappCompilerPluginOption as at, ChangeEvent as b, MultiPlatformProjectConfig as bn, WeappLibEntryContext as br, WeappTailwindcssOptions as bt, UserConfigFnPromise as c, WxmlValidationContext as cn, StyleConfigEntry as cr, WeappCompilerSourceClaim as ct, Component$1 as d, WxmlAttribute as dn, StyleScope as dr, ProjectConfig as dt, WeappVueConfig as en, NpmPluginPackageConfig as er, WeappCompilerPlugin as et, Page$1 as f, WxmlAttributeValue as fn, SubPackage as fr, SubPackageMetaValue as ft, defineComponentJson as g, WxmlTransformContext as gn, SubPackageStyleScope as gr, WeappAnalyzeHistoryConfig as gt, defineAppJson as h, WxmlTransform as hn, SubPackageStyleEntry as hr, WeappAnalyzeConfig as ht, UserConfigFnNoEnv as i, WeappWorkerConfig as in, SharedChunkDynamicImports as ir, WeappCompilerPluginFactory as it, ResolvedConfig$1 as j, GenerateExtensionsOptions as jn, WeappViteHostMeta as jr, WeappAppPreludeMode as jt, PluginOption as k, DeprecatedInlineDynamicImports as kn, WeappWebConfig as kr, ScanWxmlOptions as kt, defineConfig as l, WxmlValidationDiagnostic as ln, StyleConfigObject as lr, WeappCompilerSourceRequest as lt, Theme$1 as m, WxmlSourceLocation as mn, SubPackageStyleConfigObject as mr, WeappAnalyzeBudgetConfig as mt, UserConfigExport as n, WeappWebRuntimeConfig as nn, NpmSubPackageConfig as nr, WeappCompilerPluginContext as nt, UserConfigFnObject as o, WxmlRemoveOptions as on, SharedChunkOverride as or, WeappCompilerPluginPhase as ot, Sitemap$1 as p, WxmlElementInfo as pn, SubPackageStyleConfigEntry as pr, UserConfig$2 as pt, ComponentsMap as q, JsonMergeStage as qn, isWebPlatform as qr, WeappReactCompilerConfig as qt, UserConfigFn as r, WeappWevuConfig as rn, ResolvedAlias as rr, WeappCompilerPluginController as rt, UserConfigFnObjectPlain as s, WxmlValidate as sn, SharedChunkStrategy as sr, WeappCompilerResourceKind as st, UserConfig$1 as t, WeappVueTemplateConfig as tn, NpmStrategy as tr, WeappCompilerPluginCapabilities as tt, App$1 as u, WxmlValidationVisitor as un, StyleEntry as ur, WeappCompilerTransformResult as ut, defineSitemapJson as v, WxmlTransformResult as vn, WeappLibConfig as vr, WeappForwardConsoleConfig as vt, ComputedDefinitions$1 as w, AlipayNpmMode as wn, WeappManagedAppTsconfigConfig as wr, AutoImportComponentsOption as wt, WeappVitePluginApi as x, MultiPlatformProjectConfigs as xn, WeappLibFileName as xr, WeappUploadConfig as xt, defineThemeJson as y, WxmlTransformVisitor as yn, WeappLibDtsOptions as yr, WeappForwardConsoleLogLevel as yt, ViteDevServer$1 as z, GenerateTemplateFileSource as zn, WeappVitePlatform as zr, WeappInjectRequestGlobalsTarget as zt };