weapp-vite 6.13.0 → 6.13.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 +3 -0
- package/dist/auto-import-components/resolvers.d.mts +1 -1
- package/dist/auto-routes.d.mts +1 -1
- package/dist/auto-routes.mjs +1 -1
- package/dist/cli.mjs +2 -18
- package/dist/{config-B3HNOAZo.d.mts → config-CeCx5qMh.d.mts} +3 -2
- package/dist/config.d.mts +1 -1
- package/dist/{createContext-CZ7Kunvn.mjs → createContext-Dja7tL2g.mjs} +375 -156
- package/dist/docs/README.md +3 -0
- package/dist/{file-DwwblEq4.mjs → file-MiE605t6.mjs} +1 -1
- package/dist/index.d.mts +2 -3
- package/dist/index.mjs +2 -3
- package/dist/json.d.mts +1 -1
- package/dist/mcp.d.mts +1 -1
- package/dist/runtime-CpQutkhu.d.mts +39 -0
- package/dist/runtime-gyZnAGCZ.mjs +53 -0
- package/dist/runtime.d.mts +1 -30
- package/dist/runtime.mjs +1 -31
- package/dist/types.d.mts +3 -3
- package/package.json +7 -5
- /package/dist/{index-BQqQ_BLM.d.mts → index-B5wBsuYI.d.mts} +0 -0
- /package/dist/{routes-DUBjYF43.d.mts → routes-o20IHwXa.d.mts} +0 -0
package/README.md
CHANGED
|
@@ -166,10 +166,13 @@ wv ide logs --open
|
|
|
166
166
|
```sh
|
|
167
167
|
weapp-vite preview --project ./dist/build/mp-weixin
|
|
168
168
|
weapp-vite upload --project ./dist/build/mp-weixin -v 1.0.0 -d "release"
|
|
169
|
+
weapp-vite cache --clean compile
|
|
170
|
+
weapp-vite cache --clean all
|
|
169
171
|
weapp-vite config lang zh
|
|
170
172
|
weapp-vite navigate pages/index/index --project ./dist/build/mp-weixin
|
|
171
173
|
# 等价写法
|
|
172
174
|
wv preview --project ./dist/build/mp-weixin
|
|
175
|
+
wv cache --clean all
|
|
173
176
|
```
|
|
174
177
|
|
|
175
178
|
也支持命名空间写法:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ExternalMetadataFileCandidates, c as Resolver, d as ResolverObject, i as CreateResolver, l as ResolverFn, n as VantResolver, o as Options, r as TDesignResolver, s as ResolvedValue, t as WeuiResolver, u as ResolverMeta } from "../index-
|
|
1
|
+
import { a as ExternalMetadataFileCandidates, c as Resolver, d as ResolverObject, i as CreateResolver, l as ResolverFn, n as VantResolver, o as Options, r as TDesignResolver, s as ResolvedValue, t as WeuiResolver, u as ResolverMeta } from "../index-B5wBsuYI.mjs";
|
|
2
2
|
export { CreateResolver, ExternalMetadataFileCandidates, Options, ResolvedValue, Resolver, ResolverFn, ResolverMeta, ResolverObject, TDesignResolver, VantResolver, WeuiResolver };
|
package/dist/auto-routes.d.mts
CHANGED
package/dist/auto-routes.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getCompilerContext, l as getRouteRuntimeGlobalKeys } from "./createContext-
|
|
1
|
+
import { i as getCompilerContext, l as getRouteRuntimeGlobalKeys } from "./createContext-Dja7tL2g.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 { _ as getDefaultIdeProjectRoot, b as shouldPassPlatformArgToIdeOpen, c as SHARED_CHUNK_VIRTUAL_PREFIX, d as checkRuntime, f as getProjectConfigFileName, g as DEFAULT_MP_PLATFORM, h as createCjsConfigLoadError, m as parseCommentJson, n as syncProjectSupportFiles, o as formatBytes, p as loadViteConfigFile, r as syncManagedTsconfigBootstrapFiles, s as createSharedBuildConfig, t as createCompilerContext, u as resolveWeappConfigFile, v as normalizeMiniPlatform, x as isPathInside, y as resolveMiniPlatform } from "./createContext-
|
|
1
|
+
import { _ as getDefaultIdeProjectRoot, b as shouldPassPlatformArgToIdeOpen, c as SHARED_CHUNK_VIRTUAL_PREFIX, d as checkRuntime, f as getProjectConfigFileName, g as DEFAULT_MP_PLATFORM, h as createCjsConfigLoadError, m as parseCommentJson, n as syncProjectSupportFiles, o as formatBytes, p as loadViteConfigFile, r as syncManagedTsconfigBootstrapFiles, s as createSharedBuildConfig, t as createCompilerContext, u as resolveWeappConfigFile, v as normalizeMiniPlatform, x as isPathInside, y as resolveMiniPlatform } from "./createContext-Dja7tL2g.mjs";
|
|
2
2
|
import { r as logger_default, t as colors } from "./logger-gutcwWKE.mjs";
|
|
3
|
-
import { p as VERSION } from "./file-
|
|
3
|
+
import { p as VERSION } from "./file-MiE605t6.mjs";
|
|
4
4
|
import { resolveWeappMcpConfig, startWeappViteMcpServer } from "./mcp.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import { defu } from "@weapp-core/shared";
|
|
@@ -353,18 +353,6 @@ function readDashboardManifest(packageJsonPath) {
|
|
|
353
353
|
return;
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
-
function resolveDashboardSourceRoot(packageRoot, manifest) {
|
|
357
|
-
const devRoot = manifest?.weappViteDashboard?.devRoot ?? ".";
|
|
358
|
-
const devConfigFile = manifest?.weappViteDashboard?.devConfigFile ?? "vite.config.ts";
|
|
359
|
-
const resolvedRoot = path.resolve(packageRoot, devRoot);
|
|
360
|
-
const viteConfigPath = path.resolve(packageRoot, devConfigFile);
|
|
361
|
-
const srcRoot = path.join(resolvedRoot, "src");
|
|
362
|
-
if (!fs$2.existsSync(viteConfigPath) || !fs$2.existsSync(srcRoot)) return;
|
|
363
|
-
return {
|
|
364
|
-
root: resolvedRoot,
|
|
365
|
-
configFile: viteConfigPath
|
|
366
|
-
};
|
|
367
|
-
}
|
|
368
356
|
function resolveDashboardDistRoot(packageRoot, manifest) {
|
|
369
357
|
const distDir = manifest?.weappViteDashboard?.distDir ?? "dist";
|
|
370
358
|
const distRoot = path.resolve(packageRoot, distDir);
|
|
@@ -384,10 +372,6 @@ function resolveDashboardRoot(options) {
|
|
|
384
372
|
dashboardManifest = void 0;
|
|
385
373
|
}
|
|
386
374
|
if (dashboardPackageRoot) {
|
|
387
|
-
if (options?.watch) {
|
|
388
|
-
const sourceResolved = resolveDashboardSourceRoot(dashboardPackageRoot, dashboardManifest);
|
|
389
|
-
if (sourceResolved) return sourceResolved;
|
|
390
|
-
}
|
|
391
375
|
const distResolved = resolveDashboardDistRoot(dashboardPackageRoot, dashboardManifest);
|
|
392
376
|
if (distResolved) return distResolved;
|
|
393
377
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as Resolver, s as ResolvedValue } from "./index-
|
|
2
|
-
import { t as AutoRoutes } from "./routes-
|
|
1
|
+
import { c as Resolver, s as ResolvedValue } from "./index-B5wBsuYI.mjs";
|
|
2
|
+
import { t as AutoRoutes } from "./routes-o20IHwXa.mjs";
|
|
3
3
|
import { LRUCache } from "lru-cache";
|
|
4
4
|
import { LoggerConfig } from "@weapp-core/logger";
|
|
5
5
|
import { WeappAstConfig } from "@weapp-vite/ast";
|
|
@@ -1266,6 +1266,7 @@ interface RuntimeState {
|
|
|
1266
1266
|
};
|
|
1267
1267
|
autoImport: {
|
|
1268
1268
|
registry: Map<string, LocalAutoImportMatch>;
|
|
1269
|
+
resolvedResolverComponents: Map<string, string>;
|
|
1269
1270
|
matcher?: (input: string) => boolean;
|
|
1270
1271
|
matcherKey: string;
|
|
1271
1272
|
};
|
package/dist/config.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { An as createWeappViteHostMeta, Dn as WeappViteHostMeta, En as WEAPP_VITE_HOST_NAME, Mn as resolveWeappViteHostMeta, On as WeappViteRuntime, _ as definePageJson, a as UserConfigFnNoEnvPlain, c as UserConfigFnPromise, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, jn as isWeappViteHost, kn as applyWeappViteHostMeta, l as defineConfig, m as Theme, n as UserConfigExport, nt as WeappViteConfig, 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 { An as createWeappViteHostMeta, Dn as WeappViteHostMeta, En as WEAPP_VITE_HOST_NAME, Mn as resolveWeappViteHostMeta, On as WeappViteRuntime, _ as definePageJson, a as UserConfigFnNoEnvPlain, c as UserConfigFnPromise, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, jn as isWeappViteHost, kn as applyWeappViteHostMeta, l as defineConfig, m as Theme, n as UserConfigExport, nt as WeappViteConfig, 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-CeCx5qMh.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 };
|