weapp-vite 6.16.27 → 6.16.28
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 +1 -1
- package/dist/auto-routes.mjs +1 -1
- package/dist/cli.mjs +3 -3
- package/dist/{config-DCnATcnt.d.mts → config-s5bMI_-z.d.mts} +5 -1
- package/dist/config.d.mts +1 -1
- package/dist/{createContext-BcvnrDHZ.mjs → createContext-e20SKsa-.mjs} +814 -632
- package/dist/docs/README.md +1 -1
- package/dist/docs/vue-sfc.md +6 -4
- package/dist/docs/weapp-config.md +4 -4
- package/dist/{file-B9O7wZIh.mjs → file-6emWhSkC.mjs} +1 -1
- package/dist/file-C85Sj-OD.mjs +2 -0
- package/dist/getInstance-DMap3kp4.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/types.d.mts +1 -1
- package/package.json +8 -8
- package/dist/file-DEY9-lgk.mjs +0 -2
- package/dist/getInstance-i-vvoZiY.mjs +0 -2
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ export default defineConfig({
|
|
|
61
61
|
- `weapp.vue.template.htmlTagToWxmlTagClass`
|
|
62
62
|
默认开启。在映射发生时追加原标签名 class,例如 `h3 -> <view class="h3">`、`br -> <view class="br" />`,便于你自己写 CSS 低成本恢复默认外观;不需要时可设为 `false`。
|
|
63
63
|
- `weapp.vue.template.slotFallbackWrapper`
|
|
64
|
-
|
|
64
|
+
微信平台默认会用内部 `virtualHost` 组件承载普通具名插槽 fallback,减少 `view` wrapper 的布局影响;需要回到旧行为可配置 `weapp.vue.template.slotFallbackWrapperStrategy: 'view'` 或显式 `slotFallbackWrapper: 'view'`。`slotFallbackWrapper` 仍支持全局默认、按模板标签名 `component` / 子组件静态 `defineOptions({ name })` 的 `componentName` / slot 规则,以及组件内 `slot-wrapper` / `slot-wrapper-class` 静态覆盖。单个 slot 的局部策略更推荐写在对应的 `<template #xxx>` 上,例如 `<template #header slot-wrapper="cover-view">`。转发 `<slot />` 时不要使用 `<block slot="...">` 作为 wrapper,真实 DevTools 运行时会丢内容。
|
|
65
65
|
|
|
66
66
|
```vue
|
|
67
67
|
<!-- App.vue -->
|
package/dist/auto-routes.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getRouteRuntimeGlobalKeys, i as getCompilerContext } from "./createContext-
|
|
1
|
+
import { g as getRouteRuntimeGlobalKeys, i as getCompilerContext } from "./createContext-e20SKsa-.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 createCjsConfigLoadError, E as isPathInside, S as parseCommentJson, T as shouldPassPlatformArgToIdeOpen, _ as createBuildScopeConfigFromCli, b as getProjectConfigFileName, f as resolveWeappViteTarget, h as resolveHmrProfileJsonPath, m as SHARED_CHUNK_VIRTUAL_PREFIX, n as syncProjectSupportFiles, p as createSharedBuildConfig, r as syncManagedTsconfigBootstrapFiles, s as formatBytes, t as createCompilerContext, v as resolveWeappConfigFile, w as getDefaultIdeProjectRoot, x as loadViteConfigFile, y as checkRuntime } from "./createContext-
|
|
1
|
+
import { C as createCjsConfigLoadError, E as isPathInside, S as parseCommentJson, T as shouldPassPlatformArgToIdeOpen, _ as createBuildScopeConfigFromCli, b as getProjectConfigFileName, f as resolveWeappViteTarget, h as resolveHmrProfileJsonPath, m as SHARED_CHUNK_VIRTUAL_PREFIX, n as syncProjectSupportFiles, p as createSharedBuildConfig, r as syncManagedTsconfigBootstrapFiles, s as formatBytes, t as createCompilerContext, v as resolveWeappConfigFile, w as getDefaultIdeProjectRoot, x as loadViteConfigFile, y as checkRuntime } from "./createContext-e20SKsa-.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-6emWhSkC.mjs";
|
|
4
4
|
import { o as resolveWeappMcpConfig, s as startWeappViteMcpServer } from "./mcp-qmDOTH07.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import path, { posix } from "pathe";
|
|
@@ -3708,7 +3708,7 @@ function resolveRunnableHotkeyDefinition(input) {
|
|
|
3708
3708
|
}
|
|
3709
3709
|
//#endregion
|
|
3710
3710
|
//#region package.json
|
|
3711
|
-
var version = "6.16.
|
|
3711
|
+
var version = "6.16.28";
|
|
3712
3712
|
//#endregion
|
|
3713
3713
|
//#region src/cli/devHotkeys/format.ts
|
|
3714
3714
|
const FULLWIDTH_ASCII_START = 65281;
|
|
@@ -8,10 +8,10 @@ import { LRUCache } from "lru-cache";
|
|
|
8
8
|
import { fdir } from "fdir";
|
|
9
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
|
+
import PQueue from "p-queue";
|
|
11
12
|
import { Buffer } from "node:buffer";
|
|
12
13
|
import { PluginOptions } from "vite-tsconfig-paths";
|
|
13
14
|
import { WrapPluginOptions } from "vite-plugin-performance";
|
|
14
|
-
import PQueue from "p-queue";
|
|
15
15
|
import { ComputedDefinitions as ComputedDefinitions$1, MethodDefinitions as MethodDefinitions$1, PageLayoutMeta, Ref, WevuDefaults } from "wevu";
|
|
16
16
|
import { MiniProgramNetworkDefaults } from "@wevu/web-apis";
|
|
17
17
|
import { App, App as App$1, Component, Component as Component$1, GenerateType, Page, Page as Page$1, Plugin, Sitemap, Sitemap as Sitemap$1, Theme, Theme as Theme$1 } from "@weapp-core/schematics";
|
|
@@ -581,6 +581,7 @@ interface WeappVueTemplateConfig {
|
|
|
581
581
|
scopedSlotsCompiler?: 'auto' | 'augmented' | 'off';
|
|
582
582
|
scopedSlotsRequireProps?: boolean;
|
|
583
583
|
slotSingleRootNoWrapper?: boolean;
|
|
584
|
+
slotFallbackWrapperStrategy?: 'view' | 'virtual-host';
|
|
584
585
|
slotFallbackWrapper?: string | {
|
|
585
586
|
tag?: string;
|
|
586
587
|
attrs?: Record<string, string>;
|
|
@@ -910,6 +911,7 @@ interface BuildOptions {
|
|
|
910
911
|
interface BuildService {
|
|
911
912
|
queue: PQueue;
|
|
912
913
|
build: (options?: BuildOptions) => Promise<RolldownOutput | RolldownOutput[] | RolldownWatcher>;
|
|
914
|
+
requestConfigRestart: (target?: BuildTarget) => void;
|
|
913
915
|
buildIndependentBundle: (root: string, meta: SubPackageMetaValue) => Promise<RolldownOutput>;
|
|
914
916
|
getIndependentOutput: (root: string) => RolldownOutput | undefined;
|
|
915
917
|
invalidateIndependentOutput: (root: string) => void;
|
|
@@ -1250,6 +1252,7 @@ interface LoadConfigOptions {
|
|
|
1250
1252
|
projectConfigPath?: string;
|
|
1251
1253
|
}
|
|
1252
1254
|
interface LoadConfigResult {
|
|
1255
|
+
loadOptions: LoadConfigOptions;
|
|
1253
1256
|
config: InlineConfig;
|
|
1254
1257
|
aliasEntries: ResolvedAlias[];
|
|
1255
1258
|
outputExtensions: OutputExtensions;
|
|
@@ -1302,6 +1305,7 @@ interface PackageInfo {
|
|
|
1302
1305
|
}
|
|
1303
1306
|
interface ConfigService {
|
|
1304
1307
|
options: LoadConfigResult;
|
|
1308
|
+
readonly loadOptions: LoadConfigOptions;
|
|
1305
1309
|
outputExtensions: OutputExtensions;
|
|
1306
1310
|
defineEnv: Record<string, any>;
|
|
1307
1311
|
packageManager: DetectResult;
|
package/dist/config.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Bn as WeappViteHostMeta, Hn as createWeappViteHostMeta, Un as isWeappViteHost, Vn as applyWeappViteHostMeta, Wn as resolveWeappViteHostMeta, Yn 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, zn as WEAPP_VITE_HOST_NAME } from "./config-
|
|
1
|
+
import { Bn as WeappViteHostMeta, Hn as createWeappViteHostMeta, Un as isWeappViteHost, Vn as applyWeappViteHostMeta, Wn as resolveWeappViteHostMeta, Yn 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, zn as WEAPP_VITE_HOST_NAME } from "./config-s5bMI_-z.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 };
|