weapp-vite 7.1.4 → 7.2.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.
- package/dist/auto-import-presets/wevu-router.mjs +1 -1
- package/dist/auto-import-presets/wevu.mjs +1 -1
- package/dist/auto-import-presets.mjs +2 -2
- package/dist/auto-routes.mjs +1 -1
- package/dist/cli.mjs +607 -297
- package/dist/{config-CDlfnbbb.d.mts → config-JdEU9lCP.d.mts} +32 -1
- package/dist/config.d.mts +1 -1
- package/dist/{createContext-CsYIo9DO.mjs → createContext-403iJEyy.mjs} +997 -329
- package/dist/docs/getting-started.md +1 -1
- package/dist/docs/vue-sfc.md +20 -6
- package/dist/docs/wevu-authoring.md +1 -1
- package/dist/file-BRwj-D25.mjs +2 -0
- package/dist/{file-CHisoC18.mjs → file-CfgcKGLR.mjs} +1 -1
- package/dist/getInstance-BhkSNqVQ.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/dist/wevu-BQWUU7br.mjs +142 -0
- package/dist/{wevu-router-Bl-FE8zi.mjs → wevu-router-Dg1LnBlg.mjs} +3 -1
- package/package.json +23 -21
- package/dist/file-DxMrh1lh.mjs +0 -2
- package/dist/getInstance-C-3pAq1Y.mjs +0 -2
- package/dist/wevu-CrDVekb9.mjs +0 -130
|
@@ -79,7 +79,7 @@ weapp-vite mcp
|
|
|
79
79
|
- 目录结构、`AGENTS.md`、`.weapp-vite`:[`project-structure.md`](./project-structure.md)
|
|
80
80
|
- `vite.config.ts` 与 `weapp` 配置:[`weapp-config.md`](./weapp-config.md)
|
|
81
81
|
- wevu 页面/组件/store 写法:[`wevu-authoring.md`](./wevu-authoring.md)
|
|
82
|
-
- Vue SFC 宏、`definePageMeta`、`v-model`:[`vue-sfc.md`](./vue-sfc.md)
|
|
82
|
+
- Vue SFC 宏、`definePageMeta`、`definePage`、`v-model`:[`vue-sfc.md`](./vue-sfc.md)
|
|
83
83
|
|
|
84
84
|
## 常见命令
|
|
85
85
|
|
package/dist/docs/vue-sfc.md
CHANGED
|
@@ -5,18 +5,30 @@
|
|
|
5
5
|
## 推荐基线
|
|
6
6
|
|
|
7
7
|
- 优先使用 `<script setup lang="ts">`
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
8
|
+
- 宿主页面配置用 `definePageJson`
|
|
9
|
+
- 组件配置用 `defineComponentJson`
|
|
10
|
+
- 页面元信息和 layout 用 `definePageMeta`
|
|
11
|
+
- 命名路由用 `definePage`
|
|
11
12
|
|
|
12
13
|
## 宏的职责划分
|
|
13
14
|
|
|
14
15
|
- `defineAppJson`:应用级 JSON
|
|
15
|
-
- `definePageJson
|
|
16
|
+
- `definePageJson`:页面级宿主 JSON
|
|
16
17
|
- `defineComponentJson`:组件级 JSON
|
|
17
|
-
- `definePageMeta
|
|
18
|
+
- `definePageMeta`:页面元信息和 layout
|
|
19
|
+
- `definePage`:路由名称和业务 `meta`
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
这些宏可以在同一个页面中各自声明,职责不会合并:
|
|
22
|
+
|
|
23
|
+
```vue
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
definePageMeta({ layout: 'default', custom: { section: 'orders' } })
|
|
26
|
+
definePage({ name: 'orders', meta: { title: '订单业务标签' } })
|
|
27
|
+
definePageJson({ navigationBarTitleText: '订单' })
|
|
28
|
+
</script>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`definePage()` 的规范写法是顶层直接使用全局宏;显式导入或使用别名时只能来自 `wevu/router`。它是编译期声明,不存在可动态调用的运行时实现,旧名 `definePageRoute` 不提供兼容别名。`definePage({ name, meta })` 参数中的 `meta.title` 和 `meta.layout` 都只是路由业务数据,不会替代 `definePageJson()` 的宿主标题或 `definePageMeta()` 的 layout。
|
|
20
32
|
|
|
21
33
|
## `v-model`
|
|
22
34
|
|
|
@@ -59,6 +71,8 @@ const classes = useCssModule('theme')
|
|
|
59
71
|
|
|
60
72
|
其他小程序平台使用相同编译实现,但在完成对应 IDE/真机验证前视为实验性。
|
|
61
73
|
|
|
74
|
+
支付宝不支持 Vue 默认生成的 scoped 属性选择器。构建时会将模板作用域标记同步追加为 class,并将样式中的对应属性选择器转换为 class 选择器;保留原始 data 属性、动态 class 和选择器优先级,样式热更新也经过同一转换。无需移除 `<style scoped>`。
|
|
75
|
+
|
|
62
76
|
## `usingComponents`
|
|
63
77
|
|
|
64
78
|
当你在页面或组件里需要显式注册原生小程序组件时,优先明确当前文件使用的 JSON 宏与配置来源,避免多个入口互相覆盖。
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
- `storeToRefs`
|
|
31
31
|
- 避免巨型跨页面全局 store
|
|
32
32
|
|
|
33
|
-
`
|
|
33
|
+
Store 日常用法以 Pinia 4.0.3 为参照。先通过 `use(createPinia())` / `app.use(pinia)` 安装,或调用 `useXxx(pinia)`;外部 state 自动解包。`storeToRefs` 只返回响应式 state/getters,action 从 Store 直接解构。Setup 自行提供 `$reset`;`$dispose` 保留 manager 状态。插件接收 `{ store, pinia, app, options }`。推荐 `createPinia`;`createStore` 保留为同一个函数的兼容别名,`StoreManager` 类型继续保留。不提供 Web SSR、Pinia HMR 或 Vue Devtools。本次按 minor 发布,旧消费者仍需按 [PR 前后迁移指南](https://vite.weapp.dev/wevu/store-migration) 检查初始化、外部 ref、reset、订阅与插件。
|
|
34
34
|
|
|
35
35
|
## router
|
|
36
36
|
|
|
@@ -54,7 +54,7 @@ function resolveAutoRoutesMacroImportPath() {
|
|
|
54
54
|
}
|
|
55
55
|
async function resolveAutoRoutesInlineSnapshot() {
|
|
56
56
|
try {
|
|
57
|
-
const { getCompilerContext } = await import("./getInstance-
|
|
57
|
+
const { getCompilerContext } = await import("./getInstance-BhkSNqVQ.mjs");
|
|
58
58
|
const compilerContext = getCompilerContext();
|
|
59
59
|
const service = compilerContext.autoRoutesService;
|
|
60
60
|
const reference = service?.getReference?.();
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $n as applyWeappViteHostMeta, A as Ref, C as LoadConfigOptions, D as MethodDefinitions, E as InlineConfig, F as RolldownPlugin, I as RolldownPluginOption, L as RolldownWatchOptions, M as RolldownBuild, N as RolldownOptions, O as Plugin, P as RolldownOutput, Qn as WeappViteHostMeta, R as RolldownWatcher, S as CompilerContext, T as ConfigEnv, Zn as WEAPP_VITE_HOST_NAME, _ as definePageJson, a as UserConfigFnNoEnvPlain, ar as WEB_PLATFORM_ALIASES, c as UserConfigFnPromise, cr as WeappViteTargetDescriptor, d as Component, dr as WebPlatform, er as createWeappViteHostMeta, f as Page, fr as getSupportedWeappVitePlatforms, g as defineComponentJson, h as defineAppJson, hr as resolveWeappViteTarget, i as UserConfigFnNoEnv, ir as ResolvedWeappViteTarget, j as ResolvedConfig, k as PluginOption, l as defineConfig, lr as WeappViteTargetInput, m as Theme, mr as isWebPlatform, n as UserConfigExport, nr as resolveWeappViteHostMeta, o as UserConfigFnObject, or as WeappVitePlatform, ot as WeappViteConfig, p as Sitemap, pr as getSupportedWeappViteTargetDescriptors, r as UserConfigFn, rr as ResolveWeappViteTargetOptions, s as UserConfigFnObjectPlain, sr as WeappViteRuntime, t as UserConfig, tr as isWeappViteHost, u as App, ur as WeappViteTargetKind, v as defineSitemapJson, w as ComputedDefinitions, y as defineThemeJson, z as ViteDevServer } from "./config-
|
|
1
|
+
import { $n as applyWeappViteHostMeta, A as Ref, C as LoadConfigOptions, D as MethodDefinitions, E as InlineConfig, F as RolldownPlugin, I as RolldownPluginOption, L as RolldownWatchOptions, M as RolldownBuild, N as RolldownOptions, O as Plugin, P as RolldownOutput, Qn as WeappViteHostMeta, R as RolldownWatcher, S as CompilerContext, T as ConfigEnv, Zn as WEAPP_VITE_HOST_NAME, _ as definePageJson, a as UserConfigFnNoEnvPlain, ar as WEB_PLATFORM_ALIASES, c as UserConfigFnPromise, cr as WeappViteTargetDescriptor, d as Component, dr as WebPlatform, er as createWeappViteHostMeta, f as Page, fr as getSupportedWeappVitePlatforms, g as defineComponentJson, h as defineAppJson, hr as resolveWeappViteTarget, i as UserConfigFnNoEnv, ir as ResolvedWeappViteTarget, j as ResolvedConfig, k as PluginOption, l as defineConfig, lr as WeappViteTargetInput, m as Theme, mr as isWebPlatform, n as UserConfigExport, nr as resolveWeappViteHostMeta, o as UserConfigFnObject, or as WeappVitePlatform, ot as WeappViteConfig, p as Sitemap, pr as getSupportedWeappViteTargetDescriptors, r as UserConfigFn, rr as ResolveWeappViteTargetOptions, s as UserConfigFnObjectPlain, sr as WeappViteRuntime, t as UserConfig, tr as isWeappViteHost, u as App, ur as WeappViteTargetKind, v as defineSitemapJson, w as ComputedDefinitions, y as defineThemeJson, z as ViteDevServer } from "./config-JdEU9lCP.mjs";
|
|
2
2
|
import { t as WeappI18nConfig } from "./types-CgZn5X6j.mjs";
|
|
3
3
|
import { a as LayoutHostContext, c as LayoutHostResolver, d as unregisterLayoutHosts, f as waitForLayoutHost, i as LayoutHostBridge, l as registerLayoutHosts, m as createWevuComponent, n as defineProps, o as LayoutHostEntry, p as WevuComponentOptions, r as setPageLayout, s as LayoutHostResolveOptions, t as defineEmits, u as resolveLayoutHost } from "./runtime-Ee2HY6gR.mjs";
|
|
4
4
|
//#region src/createContext.d.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as defineThemeJson, i as defineSitemapJson, n as defineComponentJson, r as definePageJson, t as defineAppJson } from "./json-BL8Dhhk6.mjs";
|
|
2
2
|
import { a as resolveWeappViteHostMeta, i as isWeappViteHost, n as applyWeappViteHostMeta, r as createWeappViteHostMeta, t as WEAPP_VITE_HOST_NAME } from "./pluginHost--CaeyWpA.mjs";
|
|
3
3
|
import { t as defineConfig } from "./config-DRGcCi3h.mjs";
|
|
4
|
-
import { c as getSupportedWeappVitePlatforms, d as resolveWeappViteTarget, l as getSupportedWeappViteTargetDescriptors, s as WEB_PLATFORM_ALIASES, t as createCompilerContext, u as isWebPlatform } from "./createContext-
|
|
4
|
+
import { c as getSupportedWeappVitePlatforms, d as resolveWeappViteTarget, l as getSupportedWeappViteTargetDescriptors, s as WEB_PLATFORM_ALIASES, t as createCompilerContext, u as isWebPlatform } from "./createContext-403iJEyy.mjs";
|
|
5
5
|
import { a as resolveLayoutHost, c as createWevuComponent, i as registerLayoutHosts, n as defineProps, o as unregisterLayoutHosts, r as setPageLayout, s as waitForLayoutHost, t as defineEmits } from "./runtime-D6VCNhNY.mjs";
|
|
6
6
|
export { WEAPP_VITE_HOST_NAME, WEB_PLATFORM_ALIASES, applyWeappViteHostMeta, createCompilerContext, createWeappViteHostMeta, createWevuComponent, defineAppJson, defineComponentJson, defineConfig, defineEmits, definePageJson, defineProps, defineSitemapJson, defineThemeJson, getSupportedWeappVitePlatforms, getSupportedWeappViteTargetDescriptors, isWeappViteHost, isWebPlatform, registerLayoutHosts, resolveLayoutHost, resolveWeappViteHostMeta, resolveWeappViteTarget, setPageLayout, unregisterLayoutHosts, waitForLayoutHost };
|
package/dist/json.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as definePageJson, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, m as Theme, p as Sitemap, u as App, v as defineSitemapJson, y as defineThemeJson } from "./config-
|
|
1
|
+
import { _ as definePageJson, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, m as Theme, p as Sitemap, u as App, v as defineSitemapJson, y as defineThemeJson } from "./config-JdEU9lCP.mjs";
|
|
2
2
|
export { type App, type Component, type Page, type Sitemap, type Theme, defineAppJson, defineComponentJson, definePageJson, defineSitemapJson, defineThemeJson };
|
package/dist/mcp.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dt as WeappMcpConfig } from "./config-
|
|
1
|
+
import { Dt as WeappMcpConfig } from "./config-JdEU9lCP.mjs";
|
|
2
2
|
import { CreateServerOptions, DEFAULT_MCP_ENDPOINT, DEFAULT_MCP_HOST, DEFAULT_MCP_PORT, DEFAULT_RUNTIME_REST_ENDPOINT, McpServerHandle, StartMcpServerOptions, createWeappViteMcpServer } from "@weapp-vite/mcp";
|
|
3
3
|
//#region src/mcp.d.ts
|
|
4
4
|
export interface ResolvedWeappMcpConfig {
|
package/dist/test.mjs
CHANGED
package/dist/types.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as Resolver } from "./index-CaXAtb9e.mjs";
|
|
2
2
|
import { n as AutoRoutesSubPackage, t as AutoRoutes } from "./routes-C7fCmf92.mjs";
|
|
3
|
-
import { $ as WeappAnalyzeBudgetConfig, $t as GenerateFileType, A as Ref, An as StyleConfigObject, At as WeappPreloadRule, B as BindingErrorLike, Bn as WeappLibDtsOptions, Bt as WeappWebRuntimeConfig, Cn as NpmSubPackageConfig, Ct as WeappInjectRequestGlobalsTarget, D as MethodDefinitions, Dn as SharedChunkOverride, Dt as WeappMcpConfig, E as InlineConfig, En as SharedChunkMode, Et as WeappInjectWebRuntimeGlobalsTarget, F as RolldownPlugin, Fn as SubPackageStyleConfigObject, Ft as WeappRouteRules, G as EntryJsonFragment, Gn as WeappManagedAppTsconfigConfig, Gt as AlipayNpmMode, H as BaseEntry, Hn as WeappLibFileName, Ht as WeappWorkerConfig, I as RolldownPluginOption, In as SubPackageStyleEntry, It as WeappSubPackageConfig, J as ScanComponentItem, Jn as WeappManagedSharedTsconfigConfig, Jt as CopyGlobs, K as PageEntry, Kn as WeappManagedNodeTsconfigConfig, Kt as BuildNpmPackageMeta, L as RolldownWatchOptions, Ln as SubPackageStyleScope, Lt as WeappUniAppConfig, M as RolldownBuild, Mn as StyleScope, Mt as WeappReactConfig, N as RolldownOptions, Nn as SubPackage, Nt as WeappRequestRuntimeConfig, O as Plugin, On as SharedChunkStrategy, Ot as WeappNpmConfig, P as RolldownOutput, Pn as SubPackageStyleConfigEntry, Pt as WeappRouteRule, Q as UserConfig, Qn as WeappViteHostMeta, Qt as GenerateExtensionsOptions, R as RolldownWatcher, Rn as WeappLibComponentJson, Rt as WeappVueConfig, Sn as NpmStrategy, St as WeappInjectRequestGlobalsConfig, T as ConfigEnv, Tn as SharedChunkDynamicImports, Tt as WeappInjectWebRuntimeGlobalsConfig, U as ComponentEntry, Un as WeappLibInternalDtsOptions, Ut as Alias, V as AppEntry, Vn as WeappLibEntryContext, Vt as WeappWevuConfig, W as Entry, Wn as WeappLibVueTscOptions, Wt as AliasOptions, X as ProjectConfig, Xn as WeappWebConfig, Xt as DeprecatedInlineDynamicImports, Y as WxmlDep, Yn as WeappManagedTypeScriptConfig, Yt as CopyOptions, Z as SubPackageMetaValue, Zt as GenerateDirsOptions, _n as NpmBuildOptions, _t as WeappAutoRoutesInclude, an as GenerateTemplateFactory, at as WeappTailwindcssOptions, b as ChangeEvent, bn as NpmPackageFilesConfig, bt as WeappBuildScopeObjectConfig, cn as GenerateTemplateScope, ct as AutoImportComponentsOption, dn as JsonConfig, dt as HandleWxmlOptions, en as GenerateFilenamesOptions, et as WeappAnalyzeConfig, fn as JsonMergeContext, ft as MultiPlatformConfig, gn as MpPlatform, gt as WeappAutoRoutesConfig, hn as JsonMergeStrategy, ht as WeappAppPreludeMode, in as GenerateTemplateEntry, it as WeappForwardConsoleLogLevel, j as ResolvedConfig, jn as StyleEntry, jt as WeappReactCompilerConfig, k as PluginOption, kn as StyleConfigEntry, kt as WeappPreloadNetwork, ln as GenerateTemplatesConfig, lt as EnhanceOptions, mn as JsonMergeStage, mt as WeappAppPreludeConfig, nn as GenerateTemplate, nt as WeappDebugConfig, on as GenerateTemplateFileSource, ot as WeappViteConfig, pn as JsonMergeFunction, pt as ScanWxmlOptions, q as ComponentsMap, qn as WeappManagedServerTsconfigConfig, qt as ChunksConfig, rn as GenerateTemplateContext, rt as WeappForwardConsoleConfig, sn as GenerateTemplateInlineSource, sr as WeappViteRuntime, st as AutoImportComponents, tn as GenerateOptions, tt as WeappAnalyzeHistoryConfig, un as JsFormat, ut as EnhanceWxmlOptions, vn as NpmDependencyPattern, vt as WeappAutoRoutesIncludePattern, w as ComputedDefinitions, wn as ResolvedAlias, wt as WeappInjectWeapiConfig, x as WeappVitePluginApi, xn as NpmPluginPackageConfig, xt as WeappHmrConfig, yn as NpmMainPackageConfig, yt as WeappBuildScopeConfig, z as ViteDevServer, zn as WeappLibConfig, zt as WeappVueTemplateConfig } from "./config-
|
|
3
|
+
import { $ as WeappAnalyzeBudgetConfig, $t as GenerateFileType, A as Ref, An as StyleConfigObject, At as WeappPreloadRule, B as BindingErrorLike, Bn as WeappLibDtsOptions, Bt as WeappWebRuntimeConfig, Cn as NpmSubPackageConfig, Ct as WeappInjectRequestGlobalsTarget, D as MethodDefinitions, Dn as SharedChunkOverride, Dt as WeappMcpConfig, E as InlineConfig, En as SharedChunkMode, Et as WeappInjectWebRuntimeGlobalsTarget, F as RolldownPlugin, Fn as SubPackageStyleConfigObject, Ft as WeappRouteRules, G as EntryJsonFragment, Gn as WeappManagedAppTsconfigConfig, Gt as AlipayNpmMode, H as BaseEntry, Hn as WeappLibFileName, Ht as WeappWorkerConfig, I as RolldownPluginOption, In as SubPackageStyleEntry, It as WeappSubPackageConfig, J as ScanComponentItem, Jn as WeappManagedSharedTsconfigConfig, Jt as CopyGlobs, K as PageEntry, Kn as WeappManagedNodeTsconfigConfig, Kt as BuildNpmPackageMeta, L as RolldownWatchOptions, Ln as SubPackageStyleScope, Lt as WeappUniAppConfig, M as RolldownBuild, Mn as StyleScope, Mt as WeappReactConfig, N as RolldownOptions, Nn as SubPackage, Nt as WeappRequestRuntimeConfig, O as Plugin, On as SharedChunkStrategy, Ot as WeappNpmConfig, P as RolldownOutput, Pn as SubPackageStyleConfigEntry, Pt as WeappRouteRule, Q as UserConfig, Qn as WeappViteHostMeta, Qt as GenerateExtensionsOptions, R as RolldownWatcher, Rn as WeappLibComponentJson, Rt as WeappVueConfig, Sn as NpmStrategy, St as WeappInjectRequestGlobalsConfig, T as ConfigEnv, Tn as SharedChunkDynamicImports, Tt as WeappInjectWebRuntimeGlobalsConfig, U as ComponentEntry, Un as WeappLibInternalDtsOptions, Ut as Alias, V as AppEntry, Vn as WeappLibEntryContext, Vt as WeappWevuConfig, W as Entry, Wn as WeappLibVueTscOptions, Wt as AliasOptions, X as ProjectConfig, Xn as WeappWebConfig, Xt as DeprecatedInlineDynamicImports, Y as WxmlDep, Yn as WeappManagedTypeScriptConfig, Yt as CopyOptions, Z as SubPackageMetaValue, Zt as GenerateDirsOptions, _n as NpmBuildOptions, _t as WeappAutoRoutesInclude, an as GenerateTemplateFactory, at as WeappTailwindcssOptions, b as ChangeEvent, bn as NpmPackageFilesConfig, bt as WeappBuildScopeObjectConfig, cn as GenerateTemplateScope, ct as AutoImportComponentsOption, dn as JsonConfig, dt as HandleWxmlOptions, en as GenerateFilenamesOptions, et as WeappAnalyzeConfig, fn as JsonMergeContext, ft as MultiPlatformConfig, gn as MpPlatform, gt as WeappAutoRoutesConfig, hn as JsonMergeStrategy, ht as WeappAppPreludeMode, in as GenerateTemplateEntry, it as WeappForwardConsoleLogLevel, j as ResolvedConfig, jn as StyleEntry, jt as WeappReactCompilerConfig, k as PluginOption, kn as StyleConfigEntry, kt as WeappPreloadNetwork, ln as GenerateTemplatesConfig, lt as EnhanceOptions, mn as JsonMergeStage, mt as WeappAppPreludeConfig, nn as GenerateTemplate, nt as WeappDebugConfig, on as GenerateTemplateFileSource, ot as WeappViteConfig, pn as JsonMergeFunction, pt as ScanWxmlOptions, q as ComponentsMap, qn as WeappManagedServerTsconfigConfig, qt as ChunksConfig, rn as GenerateTemplateContext, rt as WeappForwardConsoleConfig, sn as GenerateTemplateInlineSource, sr as WeappViteRuntime, st as AutoImportComponents, tn as GenerateOptions, tt as WeappAnalyzeHistoryConfig, un as JsFormat, ut as EnhanceWxmlOptions, vn as NpmDependencyPattern, vt as WeappAutoRoutesIncludePattern, w as ComputedDefinitions, wn as ResolvedAlias, wt as WeappInjectWeapiConfig, x as WeappVitePluginApi, xn as NpmPluginPackageConfig, xt as WeappHmrConfig, yn as NpmMainPackageConfig, yt as WeappBuildScopeConfig, z as ViteDevServer, zn as WeappLibConfig, zt as WeappVueTemplateConfig } from "./config-JdEU9lCP.mjs";
|
|
4
4
|
import { t as WeappI18nConfig } from "./types-CgZn5X6j.mjs";
|
|
5
5
|
export { Alias, AliasOptions, AlipayNpmMode, AppEntry, AutoImportComponents, AutoImportComponentsOption, AutoRoutes, AutoRoutesSubPackage, BaseEntry, BindingErrorLike, BuildNpmPackageMeta, ChangeEvent, ChunksConfig, ComponentEntry, ComponentsMap, type ComputedDefinitions, type ConfigEnv, CopyGlobs, CopyOptions, DeprecatedInlineDynamicImports, EnhanceOptions, EnhanceWxmlOptions, Entry, EntryJsonFragment, GenerateDirsOptions, GenerateExtensionsOptions, GenerateFileType, GenerateFilenamesOptions, GenerateOptions, GenerateTemplate, GenerateTemplateContext, GenerateTemplateEntry, GenerateTemplateFactory, GenerateTemplateFileSource, GenerateTemplateInlineSource, GenerateTemplateScope, GenerateTemplatesConfig, HandleWxmlOptions, type InlineConfig, JsFormat, JsonConfig, JsonMergeContext, JsonMergeFunction, JsonMergeStage, JsonMergeStrategy, type MethodDefinitions, MpPlatform, MultiPlatformConfig, NpmBuildOptions, NpmDependencyPattern, NpmMainPackageConfig, NpmPackageFilesConfig, NpmPluginPackageConfig, NpmStrategy, NpmSubPackageConfig, PageEntry, type Plugin, type PluginOption, ProjectConfig, type Ref, ResolvedAlias, type ResolvedConfig, type Resolver, type RolldownBuild, type RolldownOptions, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatchOptions, type RolldownWatcher, ScanComponentItem, ScanWxmlOptions, SharedChunkDynamicImports, SharedChunkMode, SharedChunkOverride, SharedChunkStrategy, StyleConfigEntry, StyleConfigObject, StyleEntry, StyleScope, SubPackage, SubPackageMetaValue, SubPackageStyleConfigEntry, SubPackageStyleConfigObject, SubPackageStyleEntry, SubPackageStyleScope, UserConfig, type ViteDevServer, WeappAnalyzeBudgetConfig, WeappAnalyzeConfig, WeappAnalyzeHistoryConfig, WeappAppPreludeConfig, WeappAppPreludeMode, WeappAutoRoutesConfig, WeappAutoRoutesInclude, WeappAutoRoutesIncludePattern, WeappBuildScopeConfig, WeappBuildScopeObjectConfig, WeappDebugConfig, WeappForwardConsoleConfig, WeappForwardConsoleLogLevel, WeappHmrConfig, type WeappI18nConfig, WeappInjectRequestGlobalsConfig, WeappInjectRequestGlobalsTarget, WeappInjectWeapiConfig, WeappInjectWebRuntimeGlobalsConfig, WeappInjectWebRuntimeGlobalsTarget, WeappLibComponentJson, WeappLibConfig, WeappLibDtsOptions, WeappLibEntryContext, WeappLibFileName, WeappLibInternalDtsOptions, WeappLibVueTscOptions, WeappManagedAppTsconfigConfig, WeappManagedNodeTsconfigConfig, WeappManagedServerTsconfigConfig, WeappManagedSharedTsconfigConfig, WeappManagedTypeScriptConfig, WeappMcpConfig, WeappNpmConfig, WeappPreloadNetwork, WeappPreloadRule, WeappReactCompilerConfig, WeappReactConfig, WeappRequestRuntimeConfig, WeappRouteRule, WeappRouteRules, WeappSubPackageConfig, WeappTailwindcssOptions, WeappUniAppConfig, WeappViteConfig, type WeappViteHostMeta, WeappVitePluginApi, type WeappViteRuntime, WeappVueConfig, WeappVueTemplateConfig, WeappWebConfig, WeappWebRuntimeConfig, WeappWevuConfig, WeappWorkerConfig, WxmlDep };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { WEVU_DEFINE_PAGE_MACRO, WEVU_ROUTER_MODULE_ID } from "@weapp-core/constants";
|
|
2
|
+
//#region src/auto-import-presets/wevu.ts
|
|
3
|
+
const wevu = {
|
|
4
|
+
wevu: [
|
|
5
|
+
"createApp",
|
|
6
|
+
"createStore",
|
|
7
|
+
"createPinia",
|
|
8
|
+
"setActivePinia",
|
|
9
|
+
"getActivePinia",
|
|
10
|
+
"disposePinia",
|
|
11
|
+
"defineStore",
|
|
12
|
+
"storeToRefs",
|
|
13
|
+
"MutationType",
|
|
14
|
+
"defineComponent",
|
|
15
|
+
"defineProps",
|
|
16
|
+
"withDefaults",
|
|
17
|
+
"defineEmits",
|
|
18
|
+
"defineSlots",
|
|
19
|
+
"defineExpose",
|
|
20
|
+
"defineModel",
|
|
21
|
+
"defineOptions",
|
|
22
|
+
"defineAppJson",
|
|
23
|
+
"definePageJson",
|
|
24
|
+
"defineComponentJson",
|
|
25
|
+
"defineSitemapJson",
|
|
26
|
+
"defineThemeJson",
|
|
27
|
+
"definePageMeta",
|
|
28
|
+
"defineAppSetup",
|
|
29
|
+
"ref",
|
|
30
|
+
"customRef",
|
|
31
|
+
"reactive",
|
|
32
|
+
"shallowRef",
|
|
33
|
+
"shallowReactive",
|
|
34
|
+
"readonly",
|
|
35
|
+
"shallowReadonly",
|
|
36
|
+
"computed",
|
|
37
|
+
"watch",
|
|
38
|
+
"watchEffect",
|
|
39
|
+
"watchPostEffect",
|
|
40
|
+
"watchSyncEffect",
|
|
41
|
+
"effectScope",
|
|
42
|
+
"getCurrentScope",
|
|
43
|
+
"onScopeDispose",
|
|
44
|
+
"toRef",
|
|
45
|
+
"toRefs",
|
|
46
|
+
"unref",
|
|
47
|
+
"toValue",
|
|
48
|
+
"triggerRef",
|
|
49
|
+
"toRaw",
|
|
50
|
+
"markRaw",
|
|
51
|
+
"isRef",
|
|
52
|
+
"isReactive",
|
|
53
|
+
"isShallowRef",
|
|
54
|
+
"isShallowReactive",
|
|
55
|
+
"isRaw",
|
|
56
|
+
"isReadonly",
|
|
57
|
+
"isProxy",
|
|
58
|
+
"nextTick",
|
|
59
|
+
"useAsyncDerivation",
|
|
60
|
+
"effect",
|
|
61
|
+
"stop",
|
|
62
|
+
"batch",
|
|
63
|
+
"startBatch",
|
|
64
|
+
"endBatch",
|
|
65
|
+
"traverse",
|
|
66
|
+
"onLaunch",
|
|
67
|
+
"onShow",
|
|
68
|
+
"onHide",
|
|
69
|
+
"onError",
|
|
70
|
+
"onPageNotFound",
|
|
71
|
+
"onUnhandledRejection",
|
|
72
|
+
"onThemeChange",
|
|
73
|
+
"onMemoryWarning",
|
|
74
|
+
"onLoad",
|
|
75
|
+
"onReady",
|
|
76
|
+
"onUnload",
|
|
77
|
+
"onPullDownRefresh",
|
|
78
|
+
"onReachBottom",
|
|
79
|
+
"onPageScroll",
|
|
80
|
+
"onRouteDone",
|
|
81
|
+
"onTabItemTap",
|
|
82
|
+
"onResize",
|
|
83
|
+
"onShareAppMessage",
|
|
84
|
+
"onShareTimeline",
|
|
85
|
+
"onAddToFavorites",
|
|
86
|
+
"onSaveExitState",
|
|
87
|
+
"onAttached",
|
|
88
|
+
"onDetached",
|
|
89
|
+
"onMoved",
|
|
90
|
+
"onBeforeMount",
|
|
91
|
+
"onMounted",
|
|
92
|
+
"onBeforeUpdate",
|
|
93
|
+
"onUpdated",
|
|
94
|
+
"onBeforeUnmount",
|
|
95
|
+
"onUnmounted",
|
|
96
|
+
"onActivated",
|
|
97
|
+
"onDeactivated",
|
|
98
|
+
"onErrorCaptured",
|
|
99
|
+
"onServerPrefetch",
|
|
100
|
+
"getCurrentInstance",
|
|
101
|
+
"getCurrentSetupContext",
|
|
102
|
+
"provide",
|
|
103
|
+
"inject",
|
|
104
|
+
"hasInjectionContext",
|
|
105
|
+
"provideGlobal",
|
|
106
|
+
"injectGlobal",
|
|
107
|
+
"useNativeInstance",
|
|
108
|
+
"useBindModel",
|
|
109
|
+
"useChangeModel",
|
|
110
|
+
"useIntersectionObserver",
|
|
111
|
+
"useElementIntersectionObserver",
|
|
112
|
+
"useSelectorQuery",
|
|
113
|
+
"useBoundingClientRect",
|
|
114
|
+
"useSelectorFields",
|
|
115
|
+
"useScrollOffset",
|
|
116
|
+
"useDisposables",
|
|
117
|
+
"usePageLayout",
|
|
118
|
+
"setPageLayout",
|
|
119
|
+
"usePageStack",
|
|
120
|
+
"getCurrentPageStackSnapshot",
|
|
121
|
+
"useNavigationBarMetrics",
|
|
122
|
+
"getNavigationBarMetrics",
|
|
123
|
+
"usePageScrollThrottle",
|
|
124
|
+
"useUpdatePerformanceListener",
|
|
125
|
+
"useAsyncPullDownRefresh",
|
|
126
|
+
"use",
|
|
127
|
+
"mergeModels",
|
|
128
|
+
"useModel",
|
|
129
|
+
"useAttrs",
|
|
130
|
+
"useSlots",
|
|
131
|
+
"useTemplateRef",
|
|
132
|
+
"setWevuDefaults",
|
|
133
|
+
"resetWevuDefaults",
|
|
134
|
+
"markNoSetData",
|
|
135
|
+
"isNoSetData",
|
|
136
|
+
"addMutationRecorder",
|
|
137
|
+
"removeMutationRecorder"
|
|
138
|
+
],
|
|
139
|
+
[WEVU_ROUTER_MODULE_ID]: [WEVU_DEFINE_PAGE_MACRO]
|
|
140
|
+
};
|
|
141
|
+
//#endregion
|
|
142
|
+
export { wevu as t };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { WEVU_DEFINE_PAGE_MACRO, WEVU_ROUTER_MODULE_ID } from "@weapp-core/constants";
|
|
1
2
|
//#region src/auto-import-presets/wevu-router.ts
|
|
2
|
-
const wevuRouter = {
|
|
3
|
+
const wevuRouter = { [WEVU_ROUTER_MODULE_ID]: [
|
|
4
|
+
WEVU_DEFINE_PAGE_MACRO,
|
|
3
5
|
"createRouter",
|
|
4
6
|
"useRouter",
|
|
5
7
|
"useRoute",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.2.0",
|
|
5
5
|
"description": "weapp-vite 一个现代化的小程序打包工具",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -135,23 +135,24 @@
|
|
|
135
135
|
"@vercel/detect-agent": "^1.2.5",
|
|
136
136
|
"@volar/typescript": "^2.4.28",
|
|
137
137
|
"@vue/language-core": "^3.3.11",
|
|
138
|
-
"@weapp-core/constants": "0.2.
|
|
139
|
-
"@weapp-core/init": "6.0.
|
|
140
|
-
"@weapp-core/logger": "3.1.
|
|
141
|
-
"@weapp-core/schematics": "6.2.
|
|
142
|
-
"@weapp-core/shared": "3.2.
|
|
143
|
-
"@weapp-vite/ast": "7.
|
|
144
|
-
"@weapp-vite/eslint": "0.2.
|
|
145
|
-
"@weapp-vite/i18n": "0.2.
|
|
146
|
-
"@weapp-vite/mcp": "1.5.
|
|
147
|
-
"@weapp-vite/miniprogram-automator": "1.2.
|
|
148
|
-
"@weapp-vite/volar": "2.1.
|
|
149
|
-
"@weapp-vite/web": "1.5.
|
|
150
|
-
"@wevu/api": "0.3.
|
|
151
|
-
"@wevu/web-apis": "1.3.
|
|
138
|
+
"@weapp-core/constants": "0.2.6",
|
|
139
|
+
"@weapp-core/init": "6.0.22",
|
|
140
|
+
"@weapp-core/logger": "3.1.6",
|
|
141
|
+
"@weapp-core/schematics": "6.2.6",
|
|
142
|
+
"@weapp-core/shared": "3.2.5",
|
|
143
|
+
"@weapp-vite/ast": "7.2.0",
|
|
144
|
+
"@weapp-vite/eslint": "0.2.7",
|
|
145
|
+
"@weapp-vite/i18n": "0.2.6",
|
|
146
|
+
"@weapp-vite/mcp": "1.5.6",
|
|
147
|
+
"@weapp-vite/miniprogram-automator": "1.2.21",
|
|
148
|
+
"@weapp-vite/volar": "2.1.10",
|
|
149
|
+
"@weapp-vite/web": "1.5.5",
|
|
150
|
+
"@wevu/api": "0.3.5",
|
|
151
|
+
"@wevu/web-apis": "1.3.2",
|
|
152
152
|
"cac": "^7.0.0",
|
|
153
153
|
"chokidar": "^5.0.0",
|
|
154
154
|
"comment-json": "^5.0.0",
|
|
155
|
+
"devframe": "1.0.0",
|
|
155
156
|
"fdir": "^6.5.0",
|
|
156
157
|
"htmlparser2": "^12.0.0",
|
|
157
158
|
"local-pkg": "^1.2.1",
|
|
@@ -164,26 +165,27 @@
|
|
|
164
165
|
"pathe": "^2.0.3",
|
|
165
166
|
"picomatch": "^4.0.7",
|
|
166
167
|
"postcss": "^8.5.28",
|
|
168
|
+
"postcss-selector-parser": "^7.1.6",
|
|
167
169
|
"postcss-value-parser": "4.2.0",
|
|
168
170
|
"rolldown": "1.2.9",
|
|
169
171
|
"rolldown-plugin-dts": "0.28.6",
|
|
170
|
-
"rolldown-require": "2.0.
|
|
172
|
+
"rolldown-require": "2.0.32",
|
|
171
173
|
"semver": "^7.8.5",
|
|
172
174
|
"typescript": "^6.0.3",
|
|
173
175
|
"vite": "8.3.0",
|
|
174
|
-
"vite-plugin-performance": "2.0.
|
|
176
|
+
"vite-plugin-performance": "2.0.5",
|
|
175
177
|
"vite-tsconfig-paths": "^6.1.1",
|
|
176
178
|
"vue": "^3.5.43",
|
|
177
179
|
"vue-tsc": "^3.3.11",
|
|
178
|
-
"weapp-ide-cli": "6.1.
|
|
179
|
-
"weapp-tailwindcss": "^5.5.
|
|
180
|
-
"wevu": "7.
|
|
180
|
+
"weapp-ide-cli": "6.1.7",
|
|
181
|
+
"weapp-tailwindcss": "^5.5.8",
|
|
182
|
+
"wevu": "7.2.0"
|
|
181
183
|
},
|
|
182
184
|
"optionalDependencies": {
|
|
183
185
|
"@swc/core": "^1.16.2"
|
|
184
186
|
},
|
|
185
187
|
"devDependencies": {
|
|
186
|
-
"oxc-parser": "^0.
|
|
188
|
+
"oxc-parser": "^0.151.0",
|
|
187
189
|
"oxc-walker": "^1.1.1",
|
|
188
190
|
"tailwindcss": "^4.3.3",
|
|
189
191
|
"ts-morph": "^28.0.0"
|
package/dist/file-DxMrh1lh.mjs
DELETED
package/dist/wevu-CrDVekb9.mjs
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
//#region src/auto-import-presets/wevu.ts
|
|
2
|
-
const wevu = { wevu: [
|
|
3
|
-
"createApp",
|
|
4
|
-
"defineComponent",
|
|
5
|
-
"defineProps",
|
|
6
|
-
"withDefaults",
|
|
7
|
-
"defineEmits",
|
|
8
|
-
"defineSlots",
|
|
9
|
-
"defineExpose",
|
|
10
|
-
"defineModel",
|
|
11
|
-
"defineOptions",
|
|
12
|
-
"defineAppJson",
|
|
13
|
-
"definePageJson",
|
|
14
|
-
"defineComponentJson",
|
|
15
|
-
"defineSitemapJson",
|
|
16
|
-
"defineThemeJson",
|
|
17
|
-
"definePageMeta",
|
|
18
|
-
"defineAppSetup",
|
|
19
|
-
"ref",
|
|
20
|
-
"customRef",
|
|
21
|
-
"reactive",
|
|
22
|
-
"shallowRef",
|
|
23
|
-
"shallowReactive",
|
|
24
|
-
"readonly",
|
|
25
|
-
"shallowReadonly",
|
|
26
|
-
"computed",
|
|
27
|
-
"watch",
|
|
28
|
-
"watchEffect",
|
|
29
|
-
"watchPostEffect",
|
|
30
|
-
"watchSyncEffect",
|
|
31
|
-
"effectScope",
|
|
32
|
-
"getCurrentScope",
|
|
33
|
-
"onScopeDispose",
|
|
34
|
-
"toRef",
|
|
35
|
-
"toRefs",
|
|
36
|
-
"unref",
|
|
37
|
-
"toValue",
|
|
38
|
-
"triggerRef",
|
|
39
|
-
"toRaw",
|
|
40
|
-
"markRaw",
|
|
41
|
-
"isRef",
|
|
42
|
-
"isReactive",
|
|
43
|
-
"isShallowRef",
|
|
44
|
-
"isShallowReactive",
|
|
45
|
-
"isRaw",
|
|
46
|
-
"isReadonly",
|
|
47
|
-
"isProxy",
|
|
48
|
-
"nextTick",
|
|
49
|
-
"useAsyncDerivation",
|
|
50
|
-
"effect",
|
|
51
|
-
"stop",
|
|
52
|
-
"batch",
|
|
53
|
-
"startBatch",
|
|
54
|
-
"endBatch",
|
|
55
|
-
"traverse",
|
|
56
|
-
"onLaunch",
|
|
57
|
-
"onShow",
|
|
58
|
-
"onHide",
|
|
59
|
-
"onError",
|
|
60
|
-
"onPageNotFound",
|
|
61
|
-
"onUnhandledRejection",
|
|
62
|
-
"onThemeChange",
|
|
63
|
-
"onMemoryWarning",
|
|
64
|
-
"onLoad",
|
|
65
|
-
"onReady",
|
|
66
|
-
"onUnload",
|
|
67
|
-
"onPullDownRefresh",
|
|
68
|
-
"onReachBottom",
|
|
69
|
-
"onPageScroll",
|
|
70
|
-
"onRouteDone",
|
|
71
|
-
"onTabItemTap",
|
|
72
|
-
"onResize",
|
|
73
|
-
"onShareAppMessage",
|
|
74
|
-
"onShareTimeline",
|
|
75
|
-
"onAddToFavorites",
|
|
76
|
-
"onSaveExitState",
|
|
77
|
-
"onAttached",
|
|
78
|
-
"onDetached",
|
|
79
|
-
"onMoved",
|
|
80
|
-
"onBeforeMount",
|
|
81
|
-
"onMounted",
|
|
82
|
-
"onBeforeUpdate",
|
|
83
|
-
"onUpdated",
|
|
84
|
-
"onBeforeUnmount",
|
|
85
|
-
"onUnmounted",
|
|
86
|
-
"onActivated",
|
|
87
|
-
"onDeactivated",
|
|
88
|
-
"onErrorCaptured",
|
|
89
|
-
"onServerPrefetch",
|
|
90
|
-
"getCurrentInstance",
|
|
91
|
-
"getCurrentSetupContext",
|
|
92
|
-
"provide",
|
|
93
|
-
"inject",
|
|
94
|
-
"hasInjectionContext",
|
|
95
|
-
"provideGlobal",
|
|
96
|
-
"injectGlobal",
|
|
97
|
-
"useNativeInstance",
|
|
98
|
-
"useBindModel",
|
|
99
|
-
"useChangeModel",
|
|
100
|
-
"useIntersectionObserver",
|
|
101
|
-
"useElementIntersectionObserver",
|
|
102
|
-
"useSelectorQuery",
|
|
103
|
-
"useBoundingClientRect",
|
|
104
|
-
"useSelectorFields",
|
|
105
|
-
"useScrollOffset",
|
|
106
|
-
"useDisposables",
|
|
107
|
-
"usePageLayout",
|
|
108
|
-
"setPageLayout",
|
|
109
|
-
"usePageStack",
|
|
110
|
-
"getCurrentPageStackSnapshot",
|
|
111
|
-
"useNavigationBarMetrics",
|
|
112
|
-
"getNavigationBarMetrics",
|
|
113
|
-
"usePageScrollThrottle",
|
|
114
|
-
"useUpdatePerformanceListener",
|
|
115
|
-
"useAsyncPullDownRefresh",
|
|
116
|
-
"use",
|
|
117
|
-
"mergeModels",
|
|
118
|
-
"useModel",
|
|
119
|
-
"useAttrs",
|
|
120
|
-
"useSlots",
|
|
121
|
-
"useTemplateRef",
|
|
122
|
-
"setWevuDefaults",
|
|
123
|
-
"resetWevuDefaults",
|
|
124
|
-
"markNoSetData",
|
|
125
|
-
"isNoSetData",
|
|
126
|
-
"addMutationRecorder",
|
|
127
|
-
"removeMutationRecorder"
|
|
128
|
-
] };
|
|
129
|
-
//#endregion
|
|
130
|
-
export { wevu as t };
|