weapp-vite 6.17.2 → 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.
@@ -1,4 +1,4 @@
1
- import { g as getRouteRuntimeGlobalKeys, n as getCompilerContext } from "./createContext-Bm3wVI4b.mjs";
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-Bm3wVI4b.mjs";
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-kdAYpUO6.mjs";
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";
@@ -23,7 +23,7 @@ import { generateJs, generateJson, generateWxml, generateWxss } from "@weapp-cor
23
23
  import { determineAgent } from "@vercel/detect-agent";
24
24
  import { initConfig } from "@weapp-core/init";
25
25
  import { createInterface } from "node:readline/promises";
26
- import { clearTimeout, setTimeout as setTimeout$1 } from "node:timers";
26
+ import { clearTimeout as clearTimeout$1, setTimeout as setTimeout$1 } from "node:timers";
27
27
  import net from "node:net";
28
28
  //#region src/cli/runtime.ts
29
29
  function logRuntimeTarget(targets, options = {}) {
@@ -277,12 +277,28 @@ function logWechatIdeServicePortDisabledHint(projectPath) {
277
277
  }
278
278
  //#endregion
279
279
  //#region src/cli/openIde/reuse.ts
280
+ const OPENED_PROJECT_HEALTH_CHECK_TIMEOUT = 3e3;
280
281
  function formatReuseOpenedWechatIdePrompt() {
281
- return `目标项目已在微信开发者工具中打开,已跳过重复打开。按 ${colors.bold(colors.green("r"))} 关闭当前窗口后重新打开。`;
282
+ return `目标项目已在微信开发者工具中打开,已跳过重复打开。按 ${RETRY_CONFIRM_KEYS.map((key) => colors.bold(colors.green(key))).join(" / ")} 关闭当前窗口后重新打开。`;
282
283
  }
283
284
  function disconnectMiniProgram(miniProgram) {
284
285
  miniProgram.disconnect();
285
286
  }
287
+ function withTimeout(task, timeoutMs) {
288
+ let timer;
289
+ const timeout = new Promise((_, reject) => {
290
+ timer = setTimeout(() => {
291
+ reject(/* @__PURE__ */ new Error(`opened automator health check timed out after ${timeoutMs}ms`));
292
+ }, timeoutMs);
293
+ });
294
+ return Promise.race([task, timeout]).finally(() => {
295
+ if (timer) clearTimeout(timer);
296
+ });
297
+ }
298
+ async function verifyOpenedProjectHealth(miniProgram) {
299
+ if (typeof miniProgram.screenshot !== "function") return;
300
+ await withTimeout(miniProgram.screenshot({ timeout: OPENED_PROJECT_HEALTH_CHECK_TIMEOUT }), OPENED_PROJECT_HEALTH_CHECK_TIMEOUT);
301
+ }
286
302
  async function openWechatIdeByAutomator(projectPath) {
287
303
  disconnectMiniProgram(await launchAutomator({
288
304
  persistAsDefaultSession: true,
@@ -293,13 +309,17 @@ async function openWechatIdeByAutomator(projectPath) {
293
309
  }));
294
310
  }
295
311
  async function connectOpenedProject(projectPath) {
312
+ let miniProgram = null;
296
313
  try {
297
- return await connectOpenedAutomator({
314
+ miniProgram = await connectOpenedAutomator({
298
315
  projectPath,
299
316
  port: resolveProjectAutomatorPort(projectPath),
300
317
  timeout: 3e3
301
318
  });
319
+ await verifyOpenedProjectHealth(miniProgram);
320
+ return miniProgram;
302
321
  } catch {
322
+ if (miniProgram) disconnectMiniProgram(miniProgram);
303
323
  return null;
304
324
  }
305
325
  }
@@ -444,6 +464,32 @@ async function prepareOpenedWechatIdeAutomatorSession(projectPath, options) {
444
464
  };
445
465
  }
446
466
  }
467
+ async function connectOpenedWechatIdeAutomatorSession(projectPath) {
468
+ try {
469
+ (await connectOpenedAutomator({
470
+ projectPath,
471
+ port: resolveProjectAutomatorPort(projectPath),
472
+ timeout: PREPARE_AUTOMATOR_SESSION_TIMEOUT
473
+ })).disconnect?.();
474
+ return { ok: true };
475
+ } catch (error) {
476
+ logger_default.warn("连接当前项目的微信开发者工具自动化会话失败,截图、MCP 或 IDE 联动命令首次运行时将重新连接。");
477
+ logWechatIdeRecoveryHint({
478
+ projectPath,
479
+ reason: "当前项目已完成打开流程,但尚未连接到可复用的自动化会话。"
480
+ });
481
+ if (shouldLogAutomatorFallbackError()) logger_default.error(error);
482
+ return {
483
+ ok: false,
484
+ reason: "automator-session-failed",
485
+ error
486
+ };
487
+ }
488
+ }
489
+ async function prepareWechatIdeAutomatorSession(projectPath, options) {
490
+ if (options.prepareAutomatorSession === "connect-opened") return await connectOpenedWechatIdeAutomatorSession(projectPath);
491
+ return await prepareOpenedWechatIdeAutomatorSession(projectPath, options);
492
+ }
447
493
  async function stabilizeOpenedWechatIdeProject(projectPath, servicePortEnabled, options = {}) {
448
494
  if (servicePortEnabled === false) return {
449
495
  ok: false,
@@ -478,7 +524,7 @@ async function stabilizeOpenedWechatIdeProject(projectPath, servicePortEnabled,
478
524
  if (!isWechatIdeEngineBuildEndpointMissingError(error)) throw error;
479
525
  logger_default.warn("当前微信开发者工具不支持自动 engine build 刷新,已跳过该步骤;如模拟器显示旧状态,可在开发者工具内手动编译。");
480
526
  }
481
- if (options.useAutomatorOpen !== false) try {
527
+ if (options.useAutomatorOpen !== false && options.skipAutomatorCompile !== true) try {
482
528
  await executeWechatIdeCliCommand(appendLoginRetryArgv(["compile"], options), {
483
529
  automatorMode: "require",
484
530
  httpMode: "skip",
@@ -572,7 +618,7 @@ async function openIde(platform, projectPath, options = {}) {
572
618
  if (!await closeIde()) logger_default.warn("关闭当前微信开发者工具失败,仍继续尝试打开目标项目。");
573
619
  }
574
620
  await runWechatIdeOpenWithRetry(createIdeOpenArgv(platform, projectPath, normalizedOptions));
575
- if (platform === "weapp" && projectPath && normalizedOptions.prepareAutomatorSession) await prepareOpenedWechatIdeAutomatorSession(projectPath, normalizedOptions);
621
+ if (platform === "weapp" && projectPath && normalizedOptions.prepareAutomatorSession) await prepareWechatIdeAutomatorSession(projectPath, normalizedOptions);
576
622
  if (platform === "weapp" && projectPath && !normalizedOptions.skipPostOpenHealthCheck) await verifyAndRecoverOpenedWechatIdeProject(platform, projectPath, bootstrapResult?.servicePortEnabled, normalizedOptions);
577
623
  }
578
624
  /**
@@ -2861,6 +2907,7 @@ const DEFAULT_FORWARD_CONSOLE_LEVELS = [
2861
2907
  "error"
2862
2908
  ];
2863
2909
  let activeForwardConsoleSession;
2910
+ let activeForwardConsoleBridgeOptions;
2864
2911
  const FORWARD_CONSOLE_RETRY_DELAY_MS = 1e3;
2865
2912
  const FORWARD_CONSOLE_RETRY_TIMES = 5;
2866
2913
  async function detectAgent() {
@@ -2975,6 +3022,31 @@ async function startForwardConsoleBridge(options) {
2975
3022
  });
2976
3023
  }
2977
3024
  /**
3025
+ * @description 暂停当前 DevTools 日志桥,并返回恢复函数。
3026
+ */
3027
+ async function pauseActiveForwardConsole() {
3028
+ const session = activeForwardConsoleSession;
3029
+ const bridgeOptions = activeForwardConsoleBridgeOptions;
3030
+ if (!session || !bridgeOptions) return;
3031
+ activeForwardConsoleSession = void 0;
3032
+ activeForwardConsoleBridgeOptions = void 0;
3033
+ await session.close();
3034
+ return async () => {
3035
+ if (activeForwardConsoleSession) return true;
3036
+ try {
3037
+ activeForwardConsoleSession = await startForwardConsoleBridge(bridgeOptions);
3038
+ activeForwardConsoleBridgeOptions = bridgeOptions;
3039
+ return true;
3040
+ } catch (error) {
3041
+ activeForwardConsoleSession = void 0;
3042
+ activeForwardConsoleBridgeOptions = void 0;
3043
+ const message = error instanceof Error ? error.message : String(error);
3044
+ logger_default.warn(`[forwardConsole] 恢复失败:${message}`);
3045
+ return false;
3046
+ }
3047
+ };
3048
+ }
3049
+ /**
2978
3050
  * @description 在 weapp 开发态按需启动控制台转发。
2979
3051
  */
2980
3052
  async function maybeStartForwardConsole(options) {
@@ -2996,10 +3068,12 @@ async function maybeStartForwardConsole(options) {
2996
3068
  };
2997
3069
  try {
2998
3070
  activeForwardConsoleSession = await startForwardConsoleBridge(bridgeOptions);
3071
+ activeForwardConsoleBridgeOptions = bridgeOptions;
2999
3072
  return true;
3000
3073
  } catch (error) {
3001
3074
  if (!isDevtoolsPortNotReadyError(error)) {
3002
3075
  activeForwardConsoleSession = void 0;
3076
+ activeForwardConsoleBridgeOptions = void 0;
3003
3077
  const message = error instanceof Error ? error.message : String(error);
3004
3078
  logger_default.warn(`[forwardConsole] 启动失败,回退到普通 IDE 打开流程:${message}`);
3005
3079
  return false;
@@ -3010,9 +3084,15 @@ async function maybeStartForwardConsole(options) {
3010
3084
  openedOnly: true,
3011
3085
  port: void 0
3012
3086
  });
3087
+ activeForwardConsoleBridgeOptions = {
3088
+ ...bridgeOptions,
3089
+ openedOnly: true,
3090
+ port: void 0
3091
+ };
3013
3092
  return true;
3014
3093
  } catch (fallbackError) {
3015
3094
  activeForwardConsoleSession = void 0;
3095
+ activeForwardConsoleBridgeOptions = void 0;
3016
3096
  const message = fallbackError instanceof Error ? fallbackError.message : String(fallbackError);
3017
3097
  logger_default.warn(`[forwardConsole] 启动失败,回退到普通 IDE 打开流程:${message}`);
3018
3098
  return false;
@@ -3365,7 +3445,7 @@ async function probeHttpEndpoint(url) {
3365
3445
  } catch {
3366
3446
  return false;
3367
3447
  } finally {
3368
- clearTimeout(timer);
3448
+ clearTimeout$1(timer);
3369
3449
  controller.abort();
3370
3450
  }
3371
3451
  }
@@ -3876,7 +3956,7 @@ async function runOpenIdeAction(options) {
3876
3956
  //#endregion
3877
3957
  //#region src/cli/devHotkeys/screenshot.ts
3878
3958
  const DEV_SCREENSHOT_DIR = ".weapp-vite/dev-screenshots";
3879
- const DEFAULT_SCREENSHOT_TIMEOUT = 3e4;
3959
+ const DEFAULT_SCREENSHOT_TIMEOUT = 12e4;
3880
3960
  /**
3881
3961
  * @description 生成开发态截图输出路径。
3882
3962
  */
@@ -3892,24 +3972,42 @@ function formatLogPath(cwd, targetPath) {
3892
3972
  function formatResolvedScreenshotPath(cwd, fallbackPath, result) {
3893
3973
  return formatLogPath(cwd, result.path ?? fallbackPath);
3894
3974
  }
3975
+ async function resolveDefaultScreenshotPage(cwd) {
3976
+ try {
3977
+ const raw = await fs$2.readFile(path.join(cwd, "app.json"), "utf8");
3978
+ const appJson = JSON.parse(raw);
3979
+ const [firstPage] = Array.isArray(appJson.pages) ? appJson.pages : [];
3980
+ return typeof firstPage === "string" && firstPage.trim() ? firstPage : void 0;
3981
+ } catch {
3982
+ return;
3983
+ }
3984
+ }
3895
3985
  /**
3896
3986
  * @description 执行当前页面截图并输出结果日志。
3897
3987
  */
3898
3988
  async function runScreenshotAction(options) {
3899
3989
  const outputPath = resolveDevScreenshotOutputPath(options.cwd);
3900
3990
  await fs$2.mkdir(path.dirname(outputPath), { recursive: true });
3991
+ const page = await resolveDefaultScreenshotPage(options.cwd);
3901
3992
  logger_default.info(`[dev action] 正在截图当前页面,输出到 ${colors.cyan(formatLogPath(options.cwd, outputPath))}`);
3902
- const result = await takeScreenshot({
3903
- fullPage: true,
3904
- projectPath: options.projectPath,
3905
- preserveProjectRoot: true,
3906
- sharedSession: true,
3907
- outputPath,
3908
- timeout: DEFAULT_SCREENSHOT_TIMEOUT
3909
- });
3910
- const resolvedPath = formatResolvedScreenshotPath(options.cwd, outputPath, result);
3911
- logger_default.success(`[dev action] 当前页面截图完成:${colors.cyan(resolvedPath)}`);
3912
- return resolvedPath;
3993
+ const resumeForwardConsole = await pauseActiveForwardConsole();
3994
+ try {
3995
+ const result = await takeScreenshot({
3996
+ projectPath: options.projectPath,
3997
+ fullPage: true,
3998
+ ...page ? { page } : {},
3999
+ preserveProjectRoot: true,
4000
+ port: resolveProjectAutomatorPort(options.projectPath),
4001
+ retryWithFreshSession: false,
4002
+ outputPath,
4003
+ timeout: DEFAULT_SCREENSHOT_TIMEOUT
4004
+ });
4005
+ const resolvedPath = formatResolvedScreenshotPath(options.cwd, outputPath, result);
4006
+ logger_default.success(`[dev action] 当前页面截图完成:${colors.cyan(resolvedPath)}`);
4007
+ return resolvedPath;
4008
+ } finally {
4009
+ await resumeForwardConsole?.();
4010
+ }
3913
4011
  }
3914
4012
  //#endregion
3915
4013
  //#region src/cli/devHotkeys/actions.ts
@@ -4024,7 +4122,7 @@ function resolveRunnableHotkeyDefinition(input) {
4024
4122
  }
4025
4123
  //#endregion
4026
4124
  //#region package.json
4027
- var version = "6.17.2";
4125
+ var version = "6.17.4";
4028
4126
  //#endregion
4029
4127
  //#region src/cli/devHotkeys/format.ts
4030
4128
  const FULLWIDTH_ASCII_START = 65281;
@@ -4640,6 +4738,12 @@ function createAnalyzeController(options) {
4640
4738
  }
4641
4739
  //#endregion
4642
4740
  //#region src/cli/commands/serve/shared.ts
4741
+ function startBackgroundForwardConsoleReuse(tryReuseForwardConsole) {
4742
+ if (!tryReuseForwardConsole) return;
4743
+ try {
4744
+ tryReuseForwardConsole().catch(() => {});
4745
+ } catch {}
4746
+ }
4643
4747
  function resolveWebHost(host) {
4644
4748
  if (host === void 0) return;
4645
4749
  if (typeof host === "boolean") return host;
@@ -4656,7 +4760,7 @@ function createServeMiniProgramDevActions(options) {
4656
4760
  openIde: async (openOptions = {}) => {
4657
4761
  if (!openOptions.forceOpen && await options.tryReuseForwardConsole?.()) return "已通过控制台转发复用当前开发者工具会话";
4658
4762
  await options.openIde(projectPath, openOptions);
4659
- await options.tryReuseForwardConsole?.();
4763
+ startBackgroundForwardConsoleReuse(options.tryReuseForwardConsole);
4660
4764
  return openOptions.forceReopen ? "已重新打开微信开发者工具项目" : "已打开或复用微信开发者工具项目";
4661
4765
  },
4662
4766
  rebuild: async () => {
@@ -4724,6 +4828,7 @@ function registerServeCommand(cli) {
4724
4828
  configFile,
4725
4829
  inlineConfig,
4726
4830
  cliPlatform: targets.rawPlatform,
4831
+ preloadAppEntry: false,
4727
4832
  projectConfigPath: options.projectConfig
4728
4833
  });
4729
4834
  const { buildService, configService, webService } = ctx;
@@ -4738,16 +4843,18 @@ function registerServeCommand(cli) {
4738
4843
  },
4739
4844
  fallbackProjectPath: configService.cwd,
4740
4845
  openIde: async (projectPath, openOptions) => {
4846
+ const forceReopen = openOptions?.forceReopen === true;
4741
4847
  await openIde(configService.platform, projectPath, {
4742
4848
  loginRetry: options.loginRetry,
4743
4849
  loginRetryTimeout: options.loginRetryTimeout,
4744
4850
  nonInteractive: options.nonInteractive,
4745
4851
  openRecovery: false,
4746
- prepareAutomatorSession: true,
4747
- reuseOpenedProject: !openOptions?.forceReopen,
4852
+ prepareAutomatorSession: forceReopen ? true : "connect-opened",
4853
+ reuseOpenedProject: !forceReopen,
4854
+ skipAutomatorCompile: !forceReopen,
4748
4855
  skipPostOpenHealthCheck: true,
4749
4856
  trustProject: options.trustProject,
4750
- useAutomatorOpen: true
4857
+ useAutomatorOpen: forceReopen
4751
4858
  });
4752
4859
  writePostOpenSeparator();
4753
4860
  },
@@ -1526,6 +1526,7 @@ interface RuntimeState {
1526
1526
  output: {
1527
1527
  emittedSource: Map<string, string>;
1528
1528
  wevuInternalRuntimeFileName?: string;
1529
+ wevuInternalRuntimeFileNames?: Map<string, string>;
1529
1530
  };
1530
1531
  hmr: {
1531
1532
  loadedEntrySet: Set<string>;
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-Cxi7xvCa.mjs";
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-kdAYpUO6.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-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 resolveWevuInternalRuntimeChunk(bundle, importNames) {
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\/internal-runtime["'];?/g;
18050
- const currentRuntimeChunk = resolveWevuInternalRuntimeChunk(bundle, WEVU_INTERNAL_RUNTIME_EXPORTS);
18051
- if (currentRuntimeChunk) options.onRuntimeFileName?.(currentRuntimeChunk.fileName);
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 runtimeChunk = resolveWevuInternalRuntimeChunk(bundle, bindings.map((binding) => binding.importedName));
18064
- const runtimeFileName = runtimeChunk?.fileName ?? options.runtimeFileName;
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
- if (runtimeChunk?.fileName) options.onRuntimeFileName?.(runtimeChunk.fileName);
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, runtimeFileName) {
18087
- if (!runtimeFileName || !code.includes("wevu/internal-runtime")) return code;
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 }, { runtimeFileName });
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, ctx.runtimeState?.build?.output?.wevuInternalRuntimeFileName), options.scriptExtension);
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-BZkl3L_r.mjs");
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-CQ6SnI35.mjs");
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?.();
@@ -0,0 +1,2 @@
1
+ import { t as extractConfigFromVue } from "./file-CACV6Tje.mjs";
2
+ export { extractConfigFromVue };
@@ -0,0 +1,2 @@
1
+ import { n as getCompilerContext } from "./createContext-NJm1STBE.mjs";
2
+ export { getCompilerContext };
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-Cxi7xvCa.mjs";
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-Bm3wVI4b.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-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-Cxi7xvCa.mjs";
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-Cxi7xvCa.mjs";
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-Cxi7xvCa.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-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.2",
4
+ "version": "6.17.4",
5
5
  "description": "weapp-vite 一个现代化的小程序打包工具",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -111,30 +111,30 @@
111
111
  "pathe": "^2.0.3",
112
112
  "picomatch": "^4.0.4",
113
113
  "postcss": "^8.5.15",
114
- "rolldown": "1.1.2",
114
+ "rolldown": "1.1.3",
115
115
  "rolldown-plugin-dts": "0.26.0",
116
116
  "semver": "^7.8.5",
117
117
  "typescript": "^6.0.3",
118
- "vite": "8.0.16",
118
+ "vite": "8.1.0",
119
119
  "vite-tsconfig-paths": "^6.1.1",
120
120
  "vue": "^3.5.38",
121
121
  "vue-tsc": "^3.3.5",
122
+ "@weapp-core/constants": "0.1.12",
122
123
  "@weapp-core/init": "6.0.11",
123
124
  "@weapp-core/logger": "3.1.1",
124
125
  "@weapp-core/schematics": "6.0.4",
125
- "@weapp-core/constants": "0.1.12",
126
126
  "@weapp-core/shared": "3.0.5",
127
- "@weapp-vite/ast": "6.17.2",
127
+ "@weapp-vite/ast": "6.17.4",
128
128
  "@weapp-vite/mcp": "1.4.6",
129
- "@weapp-vite/volar": "2.1.0",
130
129
  "@weapp-vite/miniprogram-automator": "1.2.5",
130
+ "@weapp-vite/volar": "2.1.0",
131
131
  "@weapp-vite/web": "1.3.33",
132
132
  "@wevu/api": "0.2.11",
133
133
  "@wevu/web-apis": "1.2.25",
134
134
  "rolldown-require": "2.0.19",
135
135
  "vite-plugin-performance": "2.0.1",
136
- "weapp-ide-cli": "5.4.9",
137
- "wevu": "6.17.2"
136
+ "weapp-ide-cli": "5.4.10",
137
+ "wevu": "6.17.4"
138
138
  },
139
139
  "publishConfig": {
140
140
  "access": "public",
@@ -1,2 +0,0 @@
1
- import { t as extractConfigFromVue } from "./file-kdAYpUO6.mjs";
2
- export { extractConfigFromVue };
@@ -1,2 +0,0 @@
1
- import { n as getCompilerContext } from "./createContext-Bm3wVI4b.mjs";
2
- export { getCompilerContext };