weapp-vite 6.11.1 → 6.11.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/dist/auto-routes.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as getCompilerContext } from "./createContext-
|
|
1
|
+
import { i as getCompilerContext } from "./createContext-DzgL8nmB.mjs";
|
|
2
2
|
import "./logger-gutcwWKE.mjs";
|
|
3
|
-
import "./file-
|
|
3
|
+
import "./file-D6dnM58g.mjs";
|
|
4
4
|
//#region src/auto-routes.ts
|
|
5
5
|
const ROUTE_RUNTIME_OVERRIDE_KEY = Symbol.for("weapp-vite.route-runtime");
|
|
6
6
|
function createGetter(resolver) {
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as normalizeMiniPlatform, d as SHARED_CHUNK_VIRTUAL_PREFIX, f as resolveWeappConfigFile, g as isPathInside, h as createCjsConfigLoadError, l as resolveMiniPlatform, m as getProjectConfigFileName, n as syncProjectSupportFiles, o as formatBytes, p as checkRuntime, r as syncManagedTsconfigBootstrapFiles, s as DEFAULT_MP_PLATFORM, t as createCompilerContext, u as createSharedBuildConfig } from "./createContext-DzgL8nmB.mjs";
|
|
2
2
|
import { r as logger_default, t as colors } from "./logger-gutcwWKE.mjs";
|
|
3
|
-
import { f as VERSION } from "./file-
|
|
3
|
+
import { f as VERSION } from "./file-D6dnM58g.mjs";
|
|
4
4
|
import { resolveWeappMcpConfig, startWeappViteMcpServer } from "./mcp.mjs";
|
|
5
5
|
import { defu } from "@weapp-core/shared";
|
|
6
6
|
import path, { posix } from "pathe";
|
|
@@ -1107,27 +1107,13 @@ function registerPrepareCommand(cli) {
|
|
|
1107
1107
|
cli.command("prepare [...input]", "generate .weapp-vite support files").action(async (input, options) => {
|
|
1108
1108
|
try {
|
|
1109
1109
|
filterDuplicateOptions(options);
|
|
1110
|
-
|
|
1110
|
+
await syncProjectSupportFiles(await createCompilerContext({
|
|
1111
1111
|
cwd: path.resolve(resolvePrepareRoot(input)),
|
|
1112
1112
|
isDev: false,
|
|
1113
1113
|
mode: typeof options.mode === "string" ? options.mode : "development",
|
|
1114
|
-
configFile: resolveConfigFile(options)
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
if (ctx.autoRoutesService.isEnabled()) await ctx.autoRoutesService.ensureFresh();
|
|
1118
|
-
const autoImportConfig = getAutoImportConfig(ctx.configService);
|
|
1119
|
-
if (autoImportConfig) {
|
|
1120
|
-
ctx.autoImportService.reset();
|
|
1121
|
-
const globs = autoImportConfig.globs;
|
|
1122
|
-
if (Array.isArray(globs) && globs.length > 0) {
|
|
1123
|
-
const files = await findAutoImportCandidates({
|
|
1124
|
-
ctx,
|
|
1125
|
-
resolvedConfig: { build: { outDir: ctx.configService.outDir } }
|
|
1126
|
-
}, globs);
|
|
1127
|
-
await Promise.all(files.map((file) => ctx.autoImportService.registerPotentialComponent(file)));
|
|
1128
|
-
} else if (!shouldBootstrapAutoImportWithoutGlobs(autoImportConfig)) logger_default.info("未检测到可预生成的 auto import 输出。");
|
|
1129
|
-
await ctx.autoImportService.awaitManifestWrites();
|
|
1130
|
-
}
|
|
1114
|
+
configFile: resolveConfigFile(options),
|
|
1115
|
+
syncSupportFiles: false
|
|
1116
|
+
}));
|
|
1131
1117
|
logger_default.info("已生成 .weapp-vite 支持文件。");
|
|
1132
1118
|
} catch (error) {
|
|
1133
1119
|
logger_default.warn(`[prepare] ${formatPrepareSkipMessage$1(error)}`);
|