weapp-vite 6.19.1 → 6.19.2
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 +2 -2
- package/dist/auto-routes.mjs +1 -1
- package/dist/cli.mjs +3 -3
- package/dist/{config-CKToDk5V.d.mts → config-DWY8nWj0.d.mts} +8 -1
- package/dist/config.d.mts +1 -1
- package/dist/{createContext-DrwOUlDX.mjs → createContext-D9HCnUmH.mjs} +625 -183
- package/dist/docs/README.md +2 -2
- package/dist/docs/uni-app-component-libraries.md +12 -0
- package/dist/docs/weapp-config.md +4 -2
- package/dist/file-BTZg_nyD.mjs +2 -0
- package/dist/{file-CdNDPmkx.mjs → file-CFQYYS_3.mjs} +1 -1
- package/dist/getInstance-BPQWdhpZ.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.d.mts +1 -1
- package/dist/test.mjs +1 -1
- package/dist/types.d.mts +1 -1
- package/package.json +13 -13
- package/dist/file-TBExd8Jd.mjs +0 -2
- package/dist/getInstance-wujsDq8Q.mjs +0 -2
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
## 快速开始
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
微信项目默认会根据微信开发者工具的热重载设置选择 HMR 模式。也可以显式锁定模式:
|
|
39
39
|
|
|
40
40
|
```ts
|
|
41
41
|
export default defineConfig({
|
|
@@ -47,7 +47,7 @@ export default defineConfig({
|
|
|
47
47
|
})
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
未配置 `weapp.hmr.runtime` 时,`wv dev` 会在启动时读取 `project.private.config.json.setting.compileHotReLoad`:开启时使用 `stateful-experimental`,关闭或无法确认时使用 `classic`。启动日志会显示最终 HMR 模式、选择来源和切换到另一模式的方法。显式设置 `classic` 或 `stateful-experimental` 会覆盖自动选择。修改 DevTools 设置后请重启 `wv dev`;CSS、资源、配置和不兼容更新会自动回退完整构建与当前路由重载。
|
|
51
51
|
|
|
52
52
|
> 说明:CLI 同时支持完整命令 `weapp-vite` 与简写命令 `wv`,两者等价。下面的示例默认使用 `weapp-vite`,你也可以按个人习惯替换成 `wv`。
|
|
53
53
|
|
package/dist/auto-routes.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getCompilerContext, v as getRouteRuntimeGlobalKeys } from "./createContext-
|
|
1
|
+
import { n as getCompilerContext, v as getRouteRuntimeGlobalKeys } from "./createContext-D9HCnUmH.mjs";
|
|
2
2
|
//#region src/auto-routes.ts
|
|
3
3
|
const ROUTE_RUNTIME_OVERRIDE_KEY = Symbol.for("weapp-vite.route-runtime");
|
|
4
4
|
function createGetter(resolver) {
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as parseCommentJson, D as isPathInside, E as shouldPassPlatformArgToIdeOpen, S as loadViteConfigFile, T as getDefaultIdeProjectRoot, _ as resolveHmrProfileJsonPath, a as formatBytes, b as checkRuntime, d as getBackendForCapability, f as resolveBackendExecution, g as SHARED_CHUNK_VIRTUAL_PREFIX, h as createSharedBuildConfig, m as syncManagedTsconfigBootstrapFiles, p as syncProjectSupportFiles, t as createCompilerContext, w as createCjsConfigLoadError, x as getProjectConfigFileName, y as resolveWeappConfigFile } from "./createContext-
|
|
1
|
+
import { C as parseCommentJson, D as isPathInside, E as shouldPassPlatformArgToIdeOpen, S as loadViteConfigFile, T as getDefaultIdeProjectRoot, _ as resolveHmrProfileJsonPath, a as formatBytes, b as checkRuntime, d as getBackendForCapability, f as resolveBackendExecution, g as SHARED_CHUNK_VIRTUAL_PREFIX, h as createSharedBuildConfig, m as syncManagedTsconfigBootstrapFiles, p as syncProjectSupportFiles, t as createCompilerContext, w as createCjsConfigLoadError, x as getProjectConfigFileName, y as resolveWeappConfigFile } from "./createContext-D9HCnUmH.mjs";
|
|
2
2
|
import { r as logger_default, t as colors } from "./logger-mt4mSTqV.mjs";
|
|
3
|
-
import { h as VERSION } from "./file-
|
|
3
|
+
import { h as VERSION } from "./file-CFQYYS_3.mjs";
|
|
4
4
|
import { c as startWeappViteMcpServer, l as detectAiDevelopmentEnvironment, s as resolveWeappMcpConfig } from "./mcp-BG6TliEg.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import fs from "node:fs";
|
|
@@ -4540,7 +4540,7 @@ function resolveRunnableHotkeyDefinition(input) {
|
|
|
4540
4540
|
}
|
|
4541
4541
|
//#endregion
|
|
4542
4542
|
//#region package.json
|
|
4543
|
-
var version = "6.19.
|
|
4543
|
+
var version = "6.19.2";
|
|
4544
4544
|
//#endregion
|
|
4545
4545
|
//#region src/cli/devHotkeys/format.ts
|
|
4546
4546
|
const FULLWIDTH_ASCII_START = 65281;
|
|
@@ -570,7 +570,7 @@ interface WeappHmrConfig {
|
|
|
570
570
|
/**
|
|
571
571
|
* @description 微信开发者工具热更新运行时。stateful-experimental 使用实验性的状态保持协议。
|
|
572
572
|
*/
|
|
573
|
-
runtime?: 'classic' | 'stateful-experimental';
|
|
573
|
+
runtime?: 'auto' | 'classic' | 'stateful-experimental';
|
|
574
574
|
sharedChunks?: 'full' | 'auto' | 'off';
|
|
575
575
|
touchAppWxss?: boolean | 'auto';
|
|
576
576
|
/**
|
|
@@ -1361,6 +1361,7 @@ interface LoadConfigResult {
|
|
|
1361
1361
|
emitDefaultAutoImportOutputs: boolean;
|
|
1362
1362
|
chunksConfigured?: boolean;
|
|
1363
1363
|
projectConfig: Record<string, any>;
|
|
1364
|
+
projectPrivateConfig: Record<string, any>;
|
|
1364
1365
|
projectConfigPath?: string;
|
|
1365
1366
|
projectPrivateConfigPath?: string;
|
|
1366
1367
|
mpDistRoot: string;
|
|
@@ -1428,6 +1429,7 @@ interface ConfigService {
|
|
|
1428
1429
|
readonly weappViteConfig: NonNullable<InlineConfig['weapp']>;
|
|
1429
1430
|
readonly packageJson: PackageJson;
|
|
1430
1431
|
readonly projectConfig: Record<string, any>;
|
|
1432
|
+
readonly projectPrivateConfig: Record<string, any>;
|
|
1431
1433
|
readonly projectConfigPath?: string;
|
|
1432
1434
|
readonly projectPrivateConfigPath?: string;
|
|
1433
1435
|
readonly srcRoot: string;
|
|
@@ -1780,6 +1782,10 @@ interface RuntimeState {
|
|
|
1780
1782
|
css: {
|
|
1781
1783
|
importerToDependencies: Map<string, Set<string>>;
|
|
1782
1784
|
dependencyToImporters: Map<string, Set<string>>;
|
|
1785
|
+
transformedSidecarSource: Map<string, {
|
|
1786
|
+
code: string;
|
|
1787
|
+
diskSource: string;
|
|
1788
|
+
}>;
|
|
1783
1789
|
emittedSource: Map<string, string>;
|
|
1784
1790
|
sidecarImports: Set<string>;
|
|
1785
1791
|
};
|
|
@@ -1954,6 +1960,7 @@ interface CompilerContext {
|
|
|
1954
1960
|
buildService: BuildService;
|
|
1955
1961
|
scanService: ScanService;
|
|
1956
1962
|
currentBuildTarget?: BuildTarget;
|
|
1963
|
+
onStatefulHmrSourceChange?: (file: string, dirtyReasonSummary: string[]) => void;
|
|
1957
1964
|
}
|
|
1958
1965
|
//#endregion
|
|
1959
1966
|
//#region src/types/plugin.d.ts
|
package/dist/config.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Gn as isWeappViteHost, Hn as WeappViteHostMeta, Kn as resolveWeappViteHostMeta, Un as applyWeappViteHostMeta, Vn as WEAPP_VITE_HOST_NAME, Wn as createWeappViteHostMeta, Zn as WeappViteRuntime, _ 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 } from "./config-
|
|
1
|
+
import { Gn as isWeappViteHost, Hn as WeappViteHostMeta, Kn as resolveWeappViteHostMeta, Un as applyWeappViteHostMeta, Vn as WEAPP_VITE_HOST_NAME, Wn as createWeappViteHostMeta, Zn as WeappViteRuntime, _ 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 } from "./config-DWY8nWj0.mjs";
|
|
2
2
|
export { type App, type Component, type Page, type Sitemap, type Theme, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnNoEnv, UserConfigFnNoEnvPlain, UserConfigFnObject, UserConfigFnObjectPlain, UserConfigFnPromise, WEAPP_VITE_HOST_NAME, type WeappViteConfig, WeappViteHostMeta, type WeappViteRuntime, applyWeappViteHostMeta, createWeappViteHostMeta, defineAppJson, defineComponentJson, defineConfig, definePageJson, defineSitemapJson, defineThemeJson, isWeappViteHost, resolveWeappViteHostMeta };
|