weapp-vite 6.17.3 → 6.17.4
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 +1 -1
- package/dist/cli.mjs +3 -3
- package/dist/{config-Cxi7xvCa.d.mts → config-CaM_ZvH7.d.mts} +1 -0
- package/dist/config.d.mts +1 -1
- package/dist/{createContext-Bm3wVI4b.mjs → createContext-NJm1STBE.mjs} +102 -15
- package/dist/{file-kdAYpUO6.mjs → file-CACV6Tje.mjs} +1 -1
- package/dist/file-D2wi4SbQ.mjs +2 -0
- package/dist/getInstance-DXiqgBgg.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 +3 -3
- package/dist/file-BZkl3L_r.mjs +0 -2
- package/dist/getInstance-CQ6SnI35.mjs +0 -2
package/dist/auto-routes.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getRouteRuntimeGlobalKeys, n as getCompilerContext } from "./createContext-
|
|
1
|
+
import { g as getRouteRuntimeGlobalKeys, n as getCompilerContext } from "./createContext-NJm1STBE.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, a as formatBytes, b as getProjectConfigFileName, d as syncProjectSupportFiles, f as syncManagedTsconfigBootstrapFiles, h as resolveHmrProfileJsonPath, m as SHARED_CHUNK_VIRTUAL_PREFIX, p as createSharedBuildConfig, t as createCompilerContext, u as resolveWeappViteTarget, 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, a as formatBytes, b as getProjectConfigFileName, d as syncProjectSupportFiles, f as syncManagedTsconfigBootstrapFiles, h as resolveHmrProfileJsonPath, m as SHARED_CHUNK_VIRTUAL_PREFIX, p as createSharedBuildConfig, t as createCompilerContext, u as resolveWeappViteTarget, v as resolveWeappConfigFile, w as getDefaultIdeProjectRoot, x as loadViteConfigFile, y as checkRuntime } from "./createContext-NJm1STBE.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-CACV6Tje.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 path, { posix } from "pathe";
|
|
@@ -4122,7 +4122,7 @@ function resolveRunnableHotkeyDefinition(input) {
|
|
|
4122
4122
|
}
|
|
4123
4123
|
//#endregion
|
|
4124
4124
|
//#region package.json
|
|
4125
|
-
var version = "6.17.
|
|
4125
|
+
var version = "6.17.4";
|
|
4126
4126
|
//#endregion
|
|
4127
4127
|
//#region src/cli/devHotkeys/format.ts
|
|
4128
4128
|
const FULLWIDTH_ASCII_START = 65281;
|
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-CaM_ZvH7.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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as applyWeappViteHostMeta } from "./pluginHost--CaeyWpA.mjs";
|
|
2
2
|
import { n as configureLogger, r as logger_default } from "./logger-mt4mSTqV.mjs";
|
|
3
|
-
import { _ as jsExtensions, a as findJsonEntry, b as vueExtensions, c as isJsOrTs, d as touch, g as configExtensions, i as findJsEntry, l as isTemplate, n as changeFileExtension, o as findTemplateEntry, p as inlineAutoRoutesImports, r as findCssEntry, s as findVueEntry, t as extractConfigFromVue, v as supportedCssLangs, y as templateExtensions } from "./file-
|
|
3
|
+
import { _ as jsExtensions, a as findJsonEntry, b as vueExtensions, c as isJsOrTs, d as touch, g as configExtensions, i as findJsEntry, l as isTemplate, n as changeFileExtension, o as findTemplateEntry, p as inlineAutoRoutesImports, r as findCssEntry, s as findVueEntry, t as extractConfigFromVue, v as supportedCssLangs, y as templateExtensions } from "./file-CACV6Tje.mjs";
|
|
4
4
|
import { createRequire, isBuiltin } from "node:module";
|
|
5
5
|
import path, { posix } from "pathe";
|
|
6
6
|
import path$1, { normalize, relative, win32 } from "node:path";
|
|
@@ -9333,7 +9333,8 @@ function createRuntimeState() {
|
|
|
9333
9333
|
independent: { outputs: /* @__PURE__ */ new Map() },
|
|
9334
9334
|
output: {
|
|
9335
9335
|
emittedSource: /* @__PURE__ */ new Map(),
|
|
9336
|
-
wevuInternalRuntimeFileName: void 0
|
|
9336
|
+
wevuInternalRuntimeFileName: void 0,
|
|
9337
|
+
wevuInternalRuntimeFileNames: /* @__PURE__ */ new Map()
|
|
9337
9338
|
},
|
|
9338
9339
|
hmr: {
|
|
9339
9340
|
loadedEntrySet: /* @__PURE__ */ new Set(),
|
|
@@ -17886,6 +17887,28 @@ const REQUIRE_CALL_RE = /\brequire\((`[^`]+`|'[^']+'|"[^"]+")\)/g;
|
|
|
17886
17887
|
const WEVU_SRC_CHUNK_RE = /(?:^|\/)wevu-src\.js$/;
|
|
17887
17888
|
const WEVU_EXPORT_ALIASES = [["defineComponent", "__wevuDefineComponent"], ["createWevuComponent", "__wevuCreateWevuComponent"]];
|
|
17888
17889
|
const WEVU_INTERNAL_RUNTIME_EXPORTS = ["createApp", "setWevuDefaults"];
|
|
17890
|
+
const WEVU_INTERNAL_RUNTIME_EXPORT_SET = new Set(WEVU_INTERNAL_RUNTIME_EXPORTS);
|
|
17891
|
+
const WEVU_INTERNAL_MODULE_IDS = [
|
|
17892
|
+
"wevu/internal-runtime",
|
|
17893
|
+
"wevu/internal-reactivity",
|
|
17894
|
+
"wevu/internal-template"
|
|
17895
|
+
];
|
|
17896
|
+
const WEVU_INTERNAL_MODULE_EXPORT_MARKERS = {
|
|
17897
|
+
"wevu/internal-runtime": WEVU_INTERNAL_RUNTIME_EXPORTS,
|
|
17898
|
+
"wevu/internal-reactivity": [
|
|
17899
|
+
"ref",
|
|
17900
|
+
"reactive",
|
|
17901
|
+
"computed",
|
|
17902
|
+
"watch",
|
|
17903
|
+
"watchEffect",
|
|
17904
|
+
"nextTick"
|
|
17905
|
+
],
|
|
17906
|
+
"wevu/internal-template": [
|
|
17907
|
+
"normalizeClass",
|
|
17908
|
+
"normalizeStyle",
|
|
17909
|
+
"resolvePropValue"
|
|
17910
|
+
]
|
|
17911
|
+
};
|
|
17889
17912
|
const JS_IDENTIFIER_RE = /^[A-Z_$][\w$]*$/i;
|
|
17890
17913
|
function filterPluginBundleOutputs(bundle, configService) {
|
|
17891
17914
|
if (configService.pluginOnly) return;
|
|
@@ -18018,7 +18041,10 @@ function collectExistingExportNames(code) {
|
|
|
18018
18041
|
function collectChunkExportNames(chunk) {
|
|
18019
18042
|
return collectExistingExportNames(chunk.code);
|
|
18020
18043
|
}
|
|
18021
|
-
function
|
|
18044
|
+
function isWevuInternalModuleId(value) {
|
|
18045
|
+
return WEVU_INTERNAL_MODULE_IDS.includes(value);
|
|
18046
|
+
}
|
|
18047
|
+
function resolveWevuInternalChunk(bundle, importNames) {
|
|
18022
18048
|
const requiredNames = new Set(importNames);
|
|
18023
18049
|
if (!requiredNames.size) return;
|
|
18024
18050
|
return Object.values(bundle).find((output) => {
|
|
@@ -18027,6 +18053,28 @@ function resolveWevuInternalRuntimeChunk(bundle, importNames) {
|
|
|
18027
18053
|
return [...requiredNames].every((name) => exports.has(name));
|
|
18028
18054
|
});
|
|
18029
18055
|
}
|
|
18056
|
+
function resolveWevuInternalChunkByExportMarkers(bundle, markers, excludedFileNames) {
|
|
18057
|
+
const markerSet = new Set(markers);
|
|
18058
|
+
if (!markerSet.size) return;
|
|
18059
|
+
return Object.values(bundle).find((output) => {
|
|
18060
|
+
if (!output || output.type !== "chunk" || typeof output.code !== "string" || !output.fileName.startsWith("weapp-vendors/") || excludedFileNames.has(output.fileName)) return false;
|
|
18061
|
+
const exports = collectChunkExportNames(output);
|
|
18062
|
+
return [...markerSet].some((name) => exports.has(name));
|
|
18063
|
+
});
|
|
18064
|
+
}
|
|
18065
|
+
function rememberWevuInternalChunk(moduleId, chunk, options) {
|
|
18066
|
+
if (!chunk?.fileName) return;
|
|
18067
|
+
if (moduleId === "wevu/internal-runtime") options.onRuntimeFileName?.(chunk.fileName);
|
|
18068
|
+
options.onRuntimeModuleFileName?.(moduleId, chunk.fileName);
|
|
18069
|
+
}
|
|
18070
|
+
function rememberCurrentWevuInternalChunks(bundle, options) {
|
|
18071
|
+
const rememberedFileNames = /* @__PURE__ */ new Set();
|
|
18072
|
+
for (const moduleId of WEVU_INTERNAL_MODULE_IDS) {
|
|
18073
|
+
const chunk = resolveWevuInternalChunkByExportMarkers(bundle, WEVU_INTERNAL_MODULE_EXPORT_MARKERS[moduleId], rememberedFileNames);
|
|
18074
|
+
rememberWevuInternalChunk(moduleId, chunk, options);
|
|
18075
|
+
if (chunk?.fileName) rememberedFileNames.add(chunk.fileName);
|
|
18076
|
+
}
|
|
18077
|
+
}
|
|
18030
18078
|
function resolveOutputCode(output) {
|
|
18031
18079
|
if (output.type === "chunk") return output.code;
|
|
18032
18080
|
if (typeof output.source === "string") return output.source;
|
|
@@ -18046,9 +18094,11 @@ function formatNamedRequireBindings(bindings) {
|
|
|
18046
18094
|
}).join(", ");
|
|
18047
18095
|
}
|
|
18048
18096
|
function rewriteWevuInternalRuntimeImports(bundle, options = {}) {
|
|
18049
|
-
const importRe = /\bimport\s*\{([^}]*)\}\s*from\s*["']wevu
|
|
18050
|
-
const
|
|
18051
|
-
|
|
18097
|
+
const importRe = /\bimport\s*\{([^}]*)\}\s*from\s*["'](wevu(?:\/internal-(?:runtime|reactivity|template))?)["'];?/g;
|
|
18098
|
+
const requireRe = /\brequire\(\s*(`wevu(?:\/internal-(?:runtime|reactivity|template))?`|'wevu(?:\/internal-(?:runtime|reactivity|template))?'|"wevu(?:\/internal-(?:runtime|reactivity|template))?")\s*\)/g;
|
|
18099
|
+
const currentRuntimeChunk = resolveWevuInternalChunk(bundle, WEVU_INTERNAL_RUNTIME_EXPORTS);
|
|
18100
|
+
if (currentRuntimeChunk) rememberWevuInternalChunk("wevu/internal-runtime", currentRuntimeChunk, options);
|
|
18101
|
+
rememberCurrentWevuInternalChunks(bundle, options);
|
|
18052
18102
|
for (const output of Object.values(bundle)) {
|
|
18053
18103
|
if (!output || output.type !== "chunk" && output.type !== "asset") continue;
|
|
18054
18104
|
const code = resolveOutputCode(output);
|
|
@@ -18058,17 +18108,32 @@ function rewriteWevuInternalRuntimeImports(bundle, options = {}) {
|
|
|
18058
18108
|
let rewritten = code;
|
|
18059
18109
|
let changed = false;
|
|
18060
18110
|
const requiredRuntimeFileNames = /* @__PURE__ */ new Set();
|
|
18061
|
-
rewritten = rewritten.replace(importRe, (full, importClause) => {
|
|
18111
|
+
rewritten = rewritten.replace(importRe, (full, importClause, source) => {
|
|
18062
18112
|
const bindings = parseNamedImportBindings(importClause);
|
|
18063
|
-
const
|
|
18064
|
-
const
|
|
18113
|
+
const importedNames = bindings.map((binding) => binding.importedName);
|
|
18114
|
+
const runtimeChunk = resolveWevuInternalChunk(bundle, importedNames);
|
|
18115
|
+
const resolvedInternalModuleId = isWevuInternalModuleId(source) ? source : "wevu/internal-runtime";
|
|
18116
|
+
const canUseRememberedRuntime = resolvedInternalModuleId === "wevu/internal-runtime" && importedNames.every((importedName) => WEVU_INTERNAL_RUNTIME_EXPORT_SET.has(importedName));
|
|
18117
|
+
const rememberedRuntimeFileName = options.runtimeFileNames?.get(resolvedInternalModuleId) ?? (canUseRememberedRuntime ? options.runtimeFileName : void 0);
|
|
18118
|
+
const runtimeFileName = runtimeChunk?.fileName ?? rememberedRuntimeFileName;
|
|
18065
18119
|
if (!runtimeFileName) return full;
|
|
18066
|
-
|
|
18120
|
+
rememberWevuInternalChunk(resolvedInternalModuleId, runtimeChunk, options);
|
|
18067
18121
|
changed = true;
|
|
18068
18122
|
requiredRuntimeFileNames.add(runtimeFileName);
|
|
18069
18123
|
const specifier = normalizeRelativeRequireSpecifier(fileName, runtimeFileName);
|
|
18070
18124
|
return `const { ${formatNamedRequireBindings(bindings)} } = require(${JSON.stringify(specifier)});`;
|
|
18071
18125
|
});
|
|
18126
|
+
rewritten = rewritten.replace(requireRe, (full, rawSpecifier) => {
|
|
18127
|
+
const specifierValue = stripQuotes(rawSpecifier);
|
|
18128
|
+
const canUseRememberedRuntime = specifierValue === "wevu/internal-runtime" || specifierValue === "wevu" && WEVU_INTERNAL_RUNTIME_EXPORTS.some((exportName) => new RegExp(`\\b${exportName}\\b`).test(code));
|
|
18129
|
+
const rememberedRuntimeFileName = isWevuInternalModuleId(specifierValue) ? options.runtimeFileNames?.get(specifierValue) : void 0;
|
|
18130
|
+
const runtimeFileName = canUseRememberedRuntime ? currentRuntimeChunk?.fileName ?? rememberedRuntimeFileName ?? options.runtimeFileName : void 0;
|
|
18131
|
+
if (!runtimeFileName) return full;
|
|
18132
|
+
changed = true;
|
|
18133
|
+
requiredRuntimeFileNames.add(runtimeFileName);
|
|
18134
|
+
const specifier = normalizeRelativeRequireSpecifier(fileName, runtimeFileName);
|
|
18135
|
+
return `require(${JSON.stringify(specifier)})`;
|
|
18136
|
+
});
|
|
18072
18137
|
if (!changed) continue;
|
|
18073
18138
|
updateOutputCode(output, rewritten);
|
|
18074
18139
|
if (output.type !== "chunk") continue;
|
|
@@ -18083,14 +18148,15 @@ function rewriteWevuInternalRuntimeImports(bundle, options = {}) {
|
|
|
18083
18148
|
chunk.imports = [...nextImports];
|
|
18084
18149
|
}
|
|
18085
18150
|
}
|
|
18086
|
-
function rewriteWevuInternalRuntimeImportCode(fileName, code,
|
|
18087
|
-
|
|
18151
|
+
function rewriteWevuInternalRuntimeImportCode(fileName, code, runtimeFileNameOrOptions) {
|
|
18152
|
+
const options = typeof runtimeFileNameOrOptions === "string" ? { runtimeFileName: runtimeFileNameOrOptions } : runtimeFileNameOrOptions ?? {};
|
|
18153
|
+
if (!options.runtimeFileName && !options.runtimeFileNames?.size || !code.includes("wevu/internal-runtime") && !code.includes("wevu/internal-reactivity") && !code.includes("wevu/internal-template") && !code.includes("from 'wevu'") && !code.includes("from \"wevu\"") && !code.includes("require('wevu") && !code.includes("require(\"wevu") && !code.includes("require(`wevu")) return code;
|
|
18088
18154
|
const output = {
|
|
18089
18155
|
type: "asset",
|
|
18090
18156
|
fileName,
|
|
18091
18157
|
source: code
|
|
18092
18158
|
};
|
|
18093
|
-
rewriteWevuInternalRuntimeImports({ [fileName]: output },
|
|
18159
|
+
rewriteWevuInternalRuntimeImports({ [fileName]: output }, options);
|
|
18094
18160
|
return typeof output.source === "string" ? output.source : Buffer.from(output.source).toString();
|
|
18095
18161
|
}
|
|
18096
18162
|
function resolveRequireTarget(fromFile, specifier) {
|
|
@@ -19462,9 +19528,19 @@ function createOutputFinalizerPlugin(ctx) {
|
|
|
19462
19528
|
get runtimeFileName() {
|
|
19463
19529
|
return ctx.runtimeState?.build?.output?.wevuInternalRuntimeFileName;
|
|
19464
19530
|
},
|
|
19531
|
+
get runtimeFileNames() {
|
|
19532
|
+
return ctx.runtimeState?.build?.output?.wevuInternalRuntimeFileNames;
|
|
19533
|
+
},
|
|
19465
19534
|
onRuntimeFileName(fileName) {
|
|
19466
19535
|
const outputState = ctx.runtimeState?.build?.output;
|
|
19467
19536
|
if (outputState) outputState.wevuInternalRuntimeFileName = fileName;
|
|
19537
|
+
},
|
|
19538
|
+
onRuntimeModuleFileName(moduleId, fileName) {
|
|
19539
|
+
const outputState = ctx.runtimeState?.build?.output;
|
|
19540
|
+
if (outputState) {
|
|
19541
|
+
outputState.wevuInternalRuntimeFileNames ??= /* @__PURE__ */ new Map();
|
|
19542
|
+
outputState.wevuInternalRuntimeFileNames.set(moduleId, fileName);
|
|
19543
|
+
}
|
|
19468
19544
|
}
|
|
19469
19545
|
};
|
|
19470
19546
|
return {
|
|
@@ -20851,9 +20927,17 @@ function createGenerateBundleHook(state, isPluginBuild) {
|
|
|
20851
20927
|
if (injectRequestGlobalsOptions?.targets?.length) inlineRequestGlobalsAppRegisteredInstallerChunks(rolldownBundle, installerChunks, preservedRequestGlobalsInstallerChunks);
|
|
20852
20928
|
rewriteWevuInternalRuntimeImports(rolldownBundle, {
|
|
20853
20929
|
runtimeFileName: state.ctx.runtimeState?.build?.output?.wevuInternalRuntimeFileName,
|
|
20930
|
+
runtimeFileNames: state.ctx.runtimeState?.build?.output?.wevuInternalRuntimeFileNames,
|
|
20854
20931
|
onRuntimeFileName(fileName) {
|
|
20855
20932
|
const outputState = state.ctx.runtimeState?.build?.output;
|
|
20856
20933
|
if (outputState) outputState.wevuInternalRuntimeFileName = fileName;
|
|
20934
|
+
},
|
|
20935
|
+
onRuntimeModuleFileName(moduleId, fileName) {
|
|
20936
|
+
const outputState = state.ctx.runtimeState?.build?.output;
|
|
20937
|
+
if (outputState) {
|
|
20938
|
+
outputState.wevuInternalRuntimeFileNames ??= /* @__PURE__ */ new Map();
|
|
20939
|
+
outputState.wevuInternalRuntimeFileNames.set(moduleId, fileName);
|
|
20940
|
+
}
|
|
20857
20941
|
}
|
|
20858
20942
|
});
|
|
20859
20943
|
stabilizeWevuRuntimeChunkAccess(rolldownBundle);
|
|
@@ -24194,7 +24278,10 @@ async function emitResolvedCompiledVueEntryAssets(options) {
|
|
|
24194
24278
|
});
|
|
24195
24279
|
if (shouldReplaceAppScript && result.script?.trim()) {
|
|
24196
24280
|
const scriptFileName = `${relativeBase}.${options.scriptExtension}`;
|
|
24197
|
-
emitSfcScriptAssetReplacingBundleEntry(pluginCtx, bundle, relativeBase, rewriteWevuInternalRuntimeImportCode(scriptFileName, result.script,
|
|
24281
|
+
emitSfcScriptAssetReplacingBundleEntry(pluginCtx, bundle, relativeBase, rewriteWevuInternalRuntimeImportCode(scriptFileName, result.script, {
|
|
24282
|
+
runtimeFileName: ctx.runtimeState?.build?.output?.wevuInternalRuntimeFileName,
|
|
24283
|
+
runtimeFileNames: ctx.runtimeState?.build?.output?.wevuInternalRuntimeFileNames
|
|
24284
|
+
}), options.scriptExtension);
|
|
24198
24285
|
retainReplacedDevHmrScriptChunk(state, scriptFileName);
|
|
24199
24286
|
}
|
|
24200
24287
|
if (shouldEmitComponentJson && !result.script?.trim()) emitScriptlessComponentJsFallbackIfMissing({
|
|
@@ -25980,7 +26067,7 @@ async function loadAppEntry(ctx, scanState) {
|
|
|
25980
26067
|
const vueAppPath = await findVueEntry(appBasename);
|
|
25981
26068
|
let configFromVue;
|
|
25982
26069
|
if (!appConfigFile && vueAppPath) {
|
|
25983
|
-
const { extractConfigFromVue } = await import("./file-
|
|
26070
|
+
const { extractConfigFromVue } = await import("./file-D2wi4SbQ.mjs");
|
|
25984
26071
|
configFromVue = await extractConfigFromVue(vueAppPath);
|
|
25985
26072
|
if (configFromVue) appConfigFile = vueAppPath;
|
|
25986
26073
|
}
|
|
@@ -84,7 +84,7 @@ function resolveAutoRoutesMacroImportPath() {
|
|
|
84
84
|
}
|
|
85
85
|
async function resolveAutoRoutesInlineSnapshot() {
|
|
86
86
|
try {
|
|
87
|
-
const { getCompilerContext } = await import("./getInstance-
|
|
87
|
+
const { getCompilerContext } = await import("./getInstance-DXiqgBgg.mjs");
|
|
88
88
|
const compilerContext = getCompilerContext();
|
|
89
89
|
const service = compilerContext.autoRoutesService;
|
|
90
90
|
const reference = service?.getReference?.();
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $n as WebPlatform, A as Ref, Bn as WeappViteHostMeta, C as LoadConfigOptions, D as MethodDefinitions, E as InlineConfig, F as RolldownPlugin, Gn as ResolveWeappViteTargetOptions, Hn as createWeappViteHostMeta, I as RolldownPluginOption, Jn as WeappVitePlatform, Kn as ResolvedWeappViteTarget, L as RolldownWatchOptions, M as RolldownBuild, N as RolldownOptions, O as Plugin, P as RolldownOutput, Qn as WeappViteTargetKind, R as RolldownWatcher, S as CompilerContext, T as ConfigEnv, Un as isWeappViteHost, Vn as applyWeappViteHostMeta, Wn as resolveWeappViteHostMeta, Xn as WeappViteTargetDescriptor, Yn as WeappViteRuntime, Zn as WeappViteTargetInput, _ as definePageJson, a as UserConfigFnNoEnvPlain, at as WeappViteConfig, c as UserConfigFnPromise, d as Component, er as getSupportedWeappVitePlatforms, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, j as ResolvedConfig, k as PluginOption, l as defineConfig, m as Theme, n as UserConfigExport, nr as isWebPlatform, o as UserConfigFnObject, p as Sitemap, qn as WEB_PLATFORM_ALIASES, r as UserConfigFn, rr as resolveWeappViteTarget, s as UserConfigFnObjectPlain, t as UserConfig, tr as getSupportedWeappViteTargetDescriptors, u as App, v as defineSitemapJson, w as ComputedDefinitions, y as defineThemeJson, z as ViteDevServer, zn as WEAPP_VITE_HOST_NAME } from "./config-
|
|
1
|
+
import { $n as WebPlatform, A as Ref, Bn as WeappViteHostMeta, C as LoadConfigOptions, D as MethodDefinitions, E as InlineConfig, F as RolldownPlugin, Gn as ResolveWeappViteTargetOptions, Hn as createWeappViteHostMeta, I as RolldownPluginOption, Jn as WeappVitePlatform, Kn as ResolvedWeappViteTarget, L as RolldownWatchOptions, M as RolldownBuild, N as RolldownOptions, O as Plugin, P as RolldownOutput, Qn as WeappViteTargetKind, R as RolldownWatcher, S as CompilerContext, T as ConfigEnv, Un as isWeappViteHost, Vn as applyWeappViteHostMeta, Wn as resolveWeappViteHostMeta, Xn as WeappViteTargetDescriptor, Yn as WeappViteRuntime, Zn as WeappViteTargetInput, _ as definePageJson, a as UserConfigFnNoEnvPlain, at as WeappViteConfig, c as UserConfigFnPromise, d as Component, er as getSupportedWeappVitePlatforms, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, j as ResolvedConfig, k as PluginOption, l as defineConfig, m as Theme, n as UserConfigExport, nr as isWebPlatform, o as UserConfigFnObject, p as Sitemap, qn as WEB_PLATFORM_ALIASES, r as UserConfigFn, rr as resolveWeappViteTarget, s as UserConfigFnObjectPlain, t as UserConfig, tr as getSupportedWeappViteTargetDescriptors, u as App, v as defineSitemapJson, w as ComputedDefinitions, y as defineThemeJson, z as ViteDevServer, zn as WEAPP_VITE_HOST_NAME } from "./config-CaM_ZvH7.mjs";
|
|
2
2
|
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-xQwLUxkz.mjs";
|
|
3
3
|
|
|
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 getSupportedWeappViteTargetDescriptors, l as isWebPlatform, o as WEB_PLATFORM_ALIASES, s as getSupportedWeappVitePlatforms, t as createCompilerContext, u as resolveWeappViteTarget } from "./createContext-
|
|
4
|
+
import { c as getSupportedWeappViteTargetDescriptors, l as isWebPlatform, o as WEB_PLATFORM_ALIASES, s as getSupportedWeappVitePlatforms, t as createCompilerContext, u as resolveWeappViteTarget } from "./createContext-NJm1STBE.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-CRoKWQZn.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-CaM_ZvH7.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 { Et as WeappMcpConfig } from "./config-
|
|
1
|
+
import { Et as WeappMcpConfig } from "./config-CaM_ZvH7.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
|
|
|
4
4
|
//#region src/mcp.d.ts
|
package/dist/types.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { c as Resolver } from "./index-Bmclyjw8.mjs";
|
|
2
2
|
import { n as AutoRoutesSubPackage, t as AutoRoutes } from "./routes-C7fCmf92.mjs";
|
|
3
|
-
import { $ as WeappAnalyzeBudgetConfig, $t as GenerateTemplateFileSource, A as Ref, An as WeappLibFileName, At as WeappRouteRules, B as BindingErrorLike, Bn as WeappViteHostMeta, Bt as BuildNpmPackageMeta, Cn as SubPackageStyleConfigObject, Ct as WeappInjectWeapiConfig, D as MethodDefinitions, Dn as WeappLibConfig, Dt as WeappNpmConfig, E as InlineConfig, En as WeappLibComponentJson, Et as WeappMcpConfig, F as RolldownPlugin, Fn as WeappManagedServerTsconfigConfig, Ft as WeappWevuConfig, G as EntryJsonFragment, Gt as GenerateExtensionsOptions, H as BaseEntry, Ht as CopyGlobs, I as RolldownPluginOption, In as WeappManagedSharedTsconfigConfig, It as WeappWorkerConfig, J as ScanComponentItem, Jt as GenerateOptions, K as PageEntry, Kt as GenerateFileType, L as RolldownWatchOptions, Ln as WeappManagedTypeScriptConfig, Lt as Alias, M as RolldownBuild, Mn as WeappLibVueTscOptions, Mt as WeappVueConfig, N as RolldownOptions, Nn as WeappManagedAppTsconfigConfig, Nt as WeappVueTemplateConfig, O as Plugin, On as WeappLibDtsOptions, Ot as WeappRequestRuntimeConfig, P as RolldownOutput, Pn as WeappManagedNodeTsconfigConfig, Pt as WeappWebRuntimeConfig, Q as UserConfig, Qt as GenerateTemplateFactory, R as RolldownWatcher, Rn as WeappWebConfig, Rt as AliasOptions, Sn as SubPackageStyleConfigEntry, St as WeappInjectRequestGlobalsTarget, T as ConfigEnv, Tn as SubPackageStyleScope, Tt as WeappInjectWebRuntimeGlobalsTarget, U as ComponentEntry, Ut as CopyOptions, V as AppEntry, Vt as ChunksConfig, W as Entry, Wt as GenerateDirsOptions, X as ProjectConfig, Xt as GenerateTemplateContext, Y as WxmlDep, Yn as WeappViteRuntime, Yt as GenerateTemplate, Z as SubPackageMetaValue, Zt as GenerateTemplateEntry, _n as SharedChunkDynamicImports, _t as WeappAutoRoutesIncludePattern, an as JsonMergeContext, at as WeappViteConfig, b as ChangeEvent, bn as SharedChunkStrategy, bt as WeappHmrConfig, cn as JsonMergeStrategy, ct as EnhanceOptions, dn as NpmDependencyPattern, dt as MultiPlatformConfig, en as GenerateTemplateInlineSource, et as WeappAnalyzeConfig, fn as NpmMainPackageConfig, ft as ScanWxmlOptions, gn as ResolvedAlias, gt as WeappAutoRoutesInclude, hn as NpmSubPackageConfig, ht as WeappAutoRoutesConfig, in as JsonConfig, it as WeappForwardConsoleLogLevel, j as ResolvedConfig, jn as WeappLibInternalDtsOptions, jt as WeappSubPackageConfig, k as PluginOption, kn as WeappLibEntryContext, kt as WeappRouteRule, ln as MpPlatform, lt as EnhanceWxmlOptions, mn as NpmStrategy, mt as WeappAppPreludeMode, nn as GenerateTemplatesConfig, nt as WeappDebugConfig, on as JsonMergeFunction, ot as AutoImportComponents, pn as NpmPluginPackageConfig, pt as WeappAppPreludeConfig, q as ComponentsMap, qt as GenerateFilenamesOptions, rn as JsFormat, rt as WeappForwardConsoleConfig, sn as JsonMergeStage, st as AutoImportComponentsOption, tn as GenerateTemplateScope, tt as WeappAnalyzeHistoryConfig, un as NpmBuildOptions, ut as HandleWxmlOptions, vn as SharedChunkMode, vt as WeappBuildScopeConfig, w as ComputedDefinitions, wn as SubPackageStyleEntry, wt as WeappInjectWebRuntimeGlobalsConfig, x as WeappVitePluginApi, xn as SubPackage, xt as WeappInjectRequestGlobalsConfig, yn as SharedChunkOverride, yt as WeappBuildScopeObjectConfig, z as ViteDevServer, zt as AlipayNpmMode } from "./config-
|
|
3
|
+
import { $ as WeappAnalyzeBudgetConfig, $t as GenerateTemplateFileSource, A as Ref, An as WeappLibFileName, At as WeappRouteRules, B as BindingErrorLike, Bn as WeappViteHostMeta, Bt as BuildNpmPackageMeta, Cn as SubPackageStyleConfigObject, Ct as WeappInjectWeapiConfig, D as MethodDefinitions, Dn as WeappLibConfig, Dt as WeappNpmConfig, E as InlineConfig, En as WeappLibComponentJson, Et as WeappMcpConfig, F as RolldownPlugin, Fn as WeappManagedServerTsconfigConfig, Ft as WeappWevuConfig, G as EntryJsonFragment, Gt as GenerateExtensionsOptions, H as BaseEntry, Ht as CopyGlobs, I as RolldownPluginOption, In as WeappManagedSharedTsconfigConfig, It as WeappWorkerConfig, J as ScanComponentItem, Jt as GenerateOptions, K as PageEntry, Kt as GenerateFileType, L as RolldownWatchOptions, Ln as WeappManagedTypeScriptConfig, Lt as Alias, M as RolldownBuild, Mn as WeappLibVueTscOptions, Mt as WeappVueConfig, N as RolldownOptions, Nn as WeappManagedAppTsconfigConfig, Nt as WeappVueTemplateConfig, O as Plugin, On as WeappLibDtsOptions, Ot as WeappRequestRuntimeConfig, P as RolldownOutput, Pn as WeappManagedNodeTsconfigConfig, Pt as WeappWebRuntimeConfig, Q as UserConfig, Qt as GenerateTemplateFactory, R as RolldownWatcher, Rn as WeappWebConfig, Rt as AliasOptions, Sn as SubPackageStyleConfigEntry, St as WeappInjectRequestGlobalsTarget, T as ConfigEnv, Tn as SubPackageStyleScope, Tt as WeappInjectWebRuntimeGlobalsTarget, U as ComponentEntry, Ut as CopyOptions, V as AppEntry, Vt as ChunksConfig, W as Entry, Wt as GenerateDirsOptions, X as ProjectConfig, Xt as GenerateTemplateContext, Y as WxmlDep, Yn as WeappViteRuntime, Yt as GenerateTemplate, Z as SubPackageMetaValue, Zt as GenerateTemplateEntry, _n as SharedChunkDynamicImports, _t as WeappAutoRoutesIncludePattern, an as JsonMergeContext, at as WeappViteConfig, b as ChangeEvent, bn as SharedChunkStrategy, bt as WeappHmrConfig, cn as JsonMergeStrategy, ct as EnhanceOptions, dn as NpmDependencyPattern, dt as MultiPlatformConfig, en as GenerateTemplateInlineSource, et as WeappAnalyzeConfig, fn as NpmMainPackageConfig, ft as ScanWxmlOptions, gn as ResolvedAlias, gt as WeappAutoRoutesInclude, hn as NpmSubPackageConfig, ht as WeappAutoRoutesConfig, in as JsonConfig, it as WeappForwardConsoleLogLevel, j as ResolvedConfig, jn as WeappLibInternalDtsOptions, jt as WeappSubPackageConfig, k as PluginOption, kn as WeappLibEntryContext, kt as WeappRouteRule, ln as MpPlatform, lt as EnhanceWxmlOptions, mn as NpmStrategy, mt as WeappAppPreludeMode, nn as GenerateTemplatesConfig, nt as WeappDebugConfig, on as JsonMergeFunction, ot as AutoImportComponents, pn as NpmPluginPackageConfig, pt as WeappAppPreludeConfig, q as ComponentsMap, qt as GenerateFilenamesOptions, rn as JsFormat, rt as WeappForwardConsoleConfig, sn as JsonMergeStage, st as AutoImportComponentsOption, tn as GenerateTemplateScope, tt as WeappAnalyzeHistoryConfig, un as NpmBuildOptions, ut as HandleWxmlOptions, vn as SharedChunkMode, vt as WeappBuildScopeConfig, w as ComputedDefinitions, wn as SubPackageStyleEntry, wt as WeappInjectWebRuntimeGlobalsConfig, x as WeappVitePluginApi, xn as SubPackage, xt as WeappInjectRequestGlobalsConfig, yn as SharedChunkOverride, yt as WeappBuildScopeObjectConfig, z as ViteDevServer, zt as AlipayNpmMode } from "./config-CaM_ZvH7.mjs";
|
|
4
4
|
export { Alias, AliasOptions, AlipayNpmMode, AppEntry, AutoImportComponents, AutoImportComponentsOption, AutoRoutes, AutoRoutesSubPackage, BaseEntry, BindingErrorLike, BuildNpmPackageMeta, ChangeEvent, ChunksConfig, ComponentEntry, ComponentsMap, type ComputedDefinitions, type ConfigEnv, CopyGlobs, CopyOptions, 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, 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, SubPackage, SubPackageMetaValue, SubPackageStyleConfigEntry, SubPackageStyleConfigObject, SubPackageStyleEntry, SubPackageStyleScope, UserConfig, type ViteDevServer, WeappAnalyzeBudgetConfig, WeappAnalyzeConfig, WeappAnalyzeHistoryConfig, WeappAppPreludeConfig, WeappAppPreludeMode, WeappAutoRoutesConfig, WeappAutoRoutesInclude, WeappAutoRoutesIncludePattern, WeappBuildScopeConfig, WeappBuildScopeObjectConfig, WeappDebugConfig, WeappForwardConsoleConfig, WeappForwardConsoleLogLevel, WeappHmrConfig, WeappInjectRequestGlobalsConfig, WeappInjectRequestGlobalsTarget, WeappInjectWeapiConfig, WeappInjectWebRuntimeGlobalsConfig, WeappInjectWebRuntimeGlobalsTarget, WeappLibComponentJson, WeappLibConfig, WeappLibDtsOptions, WeappLibEntryContext, WeappLibFileName, WeappLibInternalDtsOptions, WeappLibVueTscOptions, WeappManagedAppTsconfigConfig, WeappManagedNodeTsconfigConfig, WeappManagedServerTsconfigConfig, WeappManagedSharedTsconfigConfig, WeappManagedTypeScriptConfig, WeappMcpConfig, WeappNpmConfig, WeappRequestRuntimeConfig, WeappRouteRule, WeappRouteRules, WeappSubPackageConfig, WeappViteConfig, type WeappViteHostMeta, WeappVitePluginApi, type WeappViteRuntime, WeappVueConfig, WeappVueTemplateConfig, WeappWebConfig, WeappWebRuntimeConfig, WeappWevuConfig, WeappWorkerConfig, WxmlDep };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.17.
|
|
4
|
+
"version": "6.17.4",
|
|
5
5
|
"description": "weapp-vite 一个现代化的小程序打包工具",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"@weapp-core/logger": "3.1.1",
|
|
125
125
|
"@weapp-core/schematics": "6.0.4",
|
|
126
126
|
"@weapp-core/shared": "3.0.5",
|
|
127
|
-
"@weapp-vite/ast": "6.17.
|
|
127
|
+
"@weapp-vite/ast": "6.17.4",
|
|
128
128
|
"@weapp-vite/mcp": "1.4.6",
|
|
129
129
|
"@weapp-vite/miniprogram-automator": "1.2.5",
|
|
130
130
|
"@weapp-vite/volar": "2.1.0",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"rolldown-require": "2.0.19",
|
|
135
135
|
"vite-plugin-performance": "2.0.1",
|
|
136
136
|
"weapp-ide-cli": "5.4.10",
|
|
137
|
-
"wevu": "6.17.
|
|
137
|
+
"wevu": "6.17.4"
|
|
138
138
|
},
|
|
139
139
|
"publishConfig": {
|
|
140
140
|
"access": "public",
|
package/dist/file-BZkl3L_r.mjs
DELETED