weapp-vite 6.16.1 → 6.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -3
- package/dist/auto-routes.mjs +1 -1
- package/dist/cli.mjs +976 -57
- package/dist/{config-BKXx-hW-.d.mts → config-Deromcuk.d.mts} +64 -4
- package/dist/config.d.mts +1 -1
- package/dist/{createContext-C-05IQc1.mjs → createContext-C775dw5P.mjs} +324 -95
- package/dist/docs/README.md +17 -3
- package/dist/docs/ai-workflows.md +19 -0
- package/dist/docs/mcp.md +23 -5
- package/dist/docs/volar.md +19 -1
- package/dist/docs/weapp-config.md +28 -0
- package/dist/{file-BC_RNbAI.mjs → file-CueQM5Yi.mjs} +1 -1
- package/dist/file-D7c-LQA5.mjs +2 -0
- package/dist/getInstance-BzywMrU-.mjs +2 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/json.d.mts +1 -1
- package/dist/{mcp-BzcrPiku.mjs → mcp-DV3K2AVD.mjs} +6 -4
- package/dist/mcp.d.mts +4 -3
- package/dist/mcp.mjs +2 -2
- package/dist/types.d.mts +2 -2
- package/package.json +7 -7
- package/dist/file-djYgQoCM.mjs +0 -2
- package/dist/getInstance-BzppVHkY.mjs +0 -2
|
@@ -204,9 +204,6 @@ interface WeappWebConfig {
|
|
|
204
204
|
}
|
|
205
205
|
interface WeappManagedSharedTsconfigConfig {
|
|
206
206
|
compilerOptions?: CompilerOptions;
|
|
207
|
-
include?: string[];
|
|
208
|
-
exclude?: string[];
|
|
209
|
-
files?: string[];
|
|
210
207
|
}
|
|
211
208
|
interface WeappManagedAppTsconfigConfig {
|
|
212
209
|
compilerOptions?: CompilerOptions;
|
|
@@ -397,6 +394,10 @@ interface WeappMcpConfig {
|
|
|
397
394
|
host?: string;
|
|
398
395
|
port?: number;
|
|
399
396
|
endpoint?: string;
|
|
397
|
+
/**
|
|
398
|
+
* @description streamable-http 模式下的 DevTools runtime REST 入口;设为 false 可关闭。
|
|
399
|
+
*/
|
|
400
|
+
restEndpoint?: string | false;
|
|
400
401
|
}
|
|
401
402
|
/**
|
|
402
403
|
* @description 自动路由配置
|
|
@@ -604,6 +605,61 @@ interface WeappForwardConsoleConfig {
|
|
|
604
605
|
*/
|
|
605
606
|
unhandledErrors?: boolean;
|
|
606
607
|
}
|
|
608
|
+
/**
|
|
609
|
+
* @description analyze 包体预算配置。
|
|
610
|
+
*/
|
|
611
|
+
interface WeappAnalyzeBudgetConfig {
|
|
612
|
+
/**
|
|
613
|
+
* 总包预算阈值(字节)。
|
|
614
|
+
*/
|
|
615
|
+
totalBytes?: number;
|
|
616
|
+
/**
|
|
617
|
+
* 主包预算阈值(字节)。
|
|
618
|
+
*/
|
|
619
|
+
mainBytes?: number;
|
|
620
|
+
/**
|
|
621
|
+
* 普通分包预算阈值(字节)。
|
|
622
|
+
*/
|
|
623
|
+
subPackageBytes?: number;
|
|
624
|
+
/**
|
|
625
|
+
* 独立分包预算阈值(字节)。
|
|
626
|
+
*/
|
|
627
|
+
independentBytes?: number;
|
|
628
|
+
/**
|
|
629
|
+
* 预算预警比例,默认 0.85。
|
|
630
|
+
*/
|
|
631
|
+
warningRatio?: number;
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* @description analyze 历史快照配置。
|
|
635
|
+
*/
|
|
636
|
+
interface WeappAnalyzeHistoryConfig {
|
|
637
|
+
/**
|
|
638
|
+
* 是否写入历史快照。
|
|
639
|
+
*/
|
|
640
|
+
enabled?: boolean;
|
|
641
|
+
/**
|
|
642
|
+
* 历史快照目录,默认 `.weapp-vite/analyze-history`。
|
|
643
|
+
*/
|
|
644
|
+
dir?: string;
|
|
645
|
+
/**
|
|
646
|
+
* 保留快照数量,默认 20。
|
|
647
|
+
*/
|
|
648
|
+
limit?: number;
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* @description analyze 配置。
|
|
652
|
+
*/
|
|
653
|
+
interface WeappAnalyzeConfig {
|
|
654
|
+
/**
|
|
655
|
+
* dashboard 与 Markdown 报告使用的包体预算。
|
|
656
|
+
*/
|
|
657
|
+
budgets?: WeappAnalyzeBudgetConfig;
|
|
658
|
+
/**
|
|
659
|
+
* CLI 侧历史快照。设置为 `false` 可关闭。
|
|
660
|
+
*/
|
|
661
|
+
history?: boolean | WeappAnalyzeHistoryConfig;
|
|
662
|
+
}
|
|
607
663
|
/**
|
|
608
664
|
* @description weapp-vite 主配置
|
|
609
665
|
*/
|
|
@@ -641,6 +697,10 @@ interface WeappViteConfig {
|
|
|
641
697
|
* 主包/分包体积告警阈值(字节)。
|
|
642
698
|
*/
|
|
643
699
|
packageSizeWarningBytes?: number;
|
|
700
|
+
/**
|
|
701
|
+
* analyze 报告配置。
|
|
702
|
+
*/
|
|
703
|
+
analyze?: WeappAnalyzeConfig;
|
|
644
704
|
jsonAlias?: AliasOptions;
|
|
645
705
|
npm?: WeappNpmConfig;
|
|
646
706
|
generate?: GenerateOptions;
|
|
@@ -1652,4 +1712,4 @@ declare module 'vite' {
|
|
|
1652
1712
|
*/
|
|
1653
1713
|
declare function defineConfig<T extends UserConfigExport>(config: T): T;
|
|
1654
1714
|
//#endregion
|
|
1655
|
-
export {
|
|
1715
|
+
export { WeappAnalyzeBudgetConfig as $, GenerateTemplateScope as $t, Ref as A, WeappLibVueTscOptions as An, WeappVueConfig as At, BindingErrorLike as B, applyWeappViteHostMeta as Bn, CopyGlobs as Bt, LoadConfigOptions as C, SubPackageStyleScope as Cn, WeappInjectWebRuntimeGlobalsTarget as Ct, MethodDefinitions$1 as D, WeappLibEntryContext as Dn, WeappRouteRule as Dt, InlineConfig$1 as E, WeappLibDtsOptions as En, WeappRequestRuntimeConfig as Et, RolldownPlugin as F, WeappManagedTypeScriptConfig as Fn, Alias as Ft, EntryJsonFragment as G, GenerateFilenamesOptions as Gt, BaseEntry as H, isWeappViteHost as Hn, GenerateDirsOptions as Ht, RolldownPluginOption as I, WeappWebConfig as In, AliasOptions as It, ScanComponentItem as J, GenerateTemplateContext as Jt, PageEntry as K, GenerateOptions as Kt, RolldownWatchOptions as L, WEAPP_VITE_HOST_NAME as Ln, AlipayNpmMode as Lt, RolldownBuild as M, WeappManagedNodeTsconfigConfig as Mn, WeappWebRuntimeConfig as Mt, RolldownOptions as N, WeappManagedServerTsconfigConfig as Nn, WeappWevuConfig as Nt, Plugin$1 as O, WeappLibFileName as On, WeappRouteRules as Ot, RolldownOutput$1 as P, WeappManagedSharedTsconfigConfig as Pn, WeappWorkerConfig as Pt, UserConfig$2 as Q, GenerateTemplateInlineSource as Qt, RolldownWatcher$1 as R, WeappViteHostMeta as Rn, BuildNpmPackageMeta as Rt, CompilerContext as S, SubPackageStyleEntry as Sn, WeappInjectWebRuntimeGlobalsConfig as St, ConfigEnv$1 as T, WeappLibConfig as Tn, WeappNpmConfig as Tt, ComponentEntry as U, resolveWeappViteHostMeta as Un, GenerateExtensionsOptions as Ut, AppEntry as V, createWeappViteHostMeta as Vn, CopyOptions as Vt, Entry as W, GenerateFileType as Wt, ProjectConfig as X, GenerateTemplateFactory as Xt, WxmlDep as Y, GenerateTemplateEntry as Yt, SubPackageMetaValue as Z, GenerateTemplateFileSource as Zt, definePageJson as _, SharedChunkOverride as _n, WeappAutoRoutesIncludePattern as _t, UserConfigFnNoEnvPlain as a, JsonMergeStage as an, WeappViteConfig as at, ChangeEvent as b, SubPackageStyleConfigEntry as bn, WeappInjectRequestGlobalsTarget as bt, UserConfigFnPromise as c, NpmBuildOptions as cn, EnhanceOptions as ct, Component$1 as d, NpmPluginPackageConfig as dn, MultiPlatformConfig as dt, GenerateTemplatesConfig as en, WeappAnalyzeConfig as et, Page$1 as f, NpmStrategy as fn, ScanWxmlOptions as ft, defineComponentJson as g, SharedChunkMode as gn, WeappAutoRoutesInclude as gt, defineAppJson as h, SharedChunkDynamicImports as hn, WeappAutoRoutesConfig as ht, UserConfigFnNoEnv as i, JsonMergeFunction as in, WeappForwardConsoleLogLevel as it, ResolvedConfig as j, WeappManagedAppTsconfigConfig as jn, WeappVueTemplateConfig as jt, PluginOption as k, WeappLibInternalDtsOptions as kn, WeappSubPackageConfig as kt, defineConfig as l, NpmDependencyPattern as ln, EnhanceWxmlOptions as lt, Theme$1 as m, ResolvedAlias as mn, WeappAppPreludeMode as mt, UserConfigExport as n, JsonConfig as nn, WeappDebugConfig as nt, UserConfigFnObject as o, JsonMergeStrategy as on, AutoImportComponents as ot, Sitemap$1 as p, NpmSubPackageConfig as pn, WeappAppPreludeConfig as pt, ComponentsMap as q, GenerateTemplate as qt, UserConfigFn as r, JsonMergeContext as rn, WeappForwardConsoleConfig as rt, UserConfigFnObjectPlain as s, MpPlatform$1 as sn, AutoImportComponentsOption as st, UserConfig$1 as t, JsFormat as tn, WeappAnalyzeHistoryConfig as tt, App$1 as u, NpmMainPackageConfig as un, HandleWxmlOptions as ut, defineSitemapJson as v, SharedChunkStrategy as vn, WeappHmrConfig as vt, ComputedDefinitions$1 as w, WeappLibComponentJson as wn, WeappMcpConfig as wt, WeappVitePluginApi as x, SubPackageStyleConfigObject as xn, WeappInjectWeapiConfig as xt, defineThemeJson as y, SubPackage as yn, WeappInjectRequestGlobalsConfig as yt, ViteDevServer$1 as z, WeappViteRuntime as zn, ChunksConfig as zt };
|
package/dist/config.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Bn as
|
|
1
|
+
import { Bn as applyWeappViteHostMeta, Hn as isWeappViteHost, Ln as WEAPP_VITE_HOST_NAME, Rn as WeappViteHostMeta, Un as resolveWeappViteHostMeta, Vn as createWeappViteHostMeta, _ as definePageJson, a as UserConfigFnNoEnvPlain, at as WeappViteConfig, 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, 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 WeappViteRuntime } from "./config-Deromcuk.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 };
|