weapp-vite 6.16.34 → 6.16.37

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, i as getCompilerContext } from "./createContext-BZRrqhni.mjs";
1
+ import { g as getRouteRuntimeGlobalKeys, i as getCompilerContext } from "./createContext-29bA2ZmE.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, b as getProjectConfigFileName, f as resolveWeappViteTarget, h as resolveHmrProfileJsonPath, m as SHARED_CHUNK_VIRTUAL_PREFIX, n as syncProjectSupportFiles, p as createSharedBuildConfig, r as syncManagedTsconfigBootstrapFiles, s as formatBytes, t as createCompilerContext, v as resolveWeappConfigFile, w as getDefaultIdeProjectRoot, x as loadViteConfigFile, y as checkRuntime } from "./createContext-BZRrqhni.mjs";
1
+ import { C as createCjsConfigLoadError, E as isPathInside, S as parseCommentJson, T as shouldPassPlatformArgToIdeOpen, _ as createBuildScopeConfigFromCli, b as getProjectConfigFileName, f as resolveWeappViteTarget, h as resolveHmrProfileJsonPath, m as SHARED_CHUNK_VIRTUAL_PREFIX, n as syncProjectSupportFiles, p as createSharedBuildConfig, r as syncManagedTsconfigBootstrapFiles, s as formatBytes, t as createCompilerContext, v as resolveWeappConfigFile, w as getDefaultIdeProjectRoot, x as loadViteConfigFile, y as checkRuntime } from "./createContext-29bA2ZmE.mjs";
2
2
  import { r as logger_default, t as colors } from "./logger-mt4mSTqV.mjs";
3
- import { h as VERSION } from "./file-DuKnIngQ.mjs";
3
+ import { h as VERSION } from "./file--u6Mt5At.mjs";
4
4
  import { o as resolveWeappMcpConfig, s as startWeappViteMcpServer } from "./mcp-qmDOTH07.mjs";
5
5
  import { createRequire } from "node:module";
6
6
  import path, { posix } from "pathe";
@@ -14,7 +14,7 @@ import os from "node:os";
14
14
  import { execFile, spawn } from "node:child_process";
15
15
  import { Buffer } from "node:buffer";
16
16
  import { cac } from "cac";
17
- import { RETRY_CANCEL_KEYS, RETRY_CONFIRM_KEYS, bootstrapWechatDevtoolsSettings, buildWechatIdeNpm, clearWechatIdeCache, clearWechatIdeCacheByAutomator, closeSharedMiniProgram, closeWechatIdeProject, compileWechatIdeByAutomator, connectOpenedAutomator, createSharedInputSession, dispatchWechatCliCommand, formatAutomatorLoginError, getConfig, getWechatIdeTestAccounts, getWechatIdeTicket, getWechatIdeToolInfo, isAutomatorLoginError, isWeappIdeTopLevelCommand, isWechatIdeEngineBuildEndpointMissingError, isWechatIdeLoginRequiredError, launchAutomator, openWechatIdeProjectByHttp, parse, promptRetryKeypress, promptWechatIdeLoginRetry, quitWechatIde, refreshWechatIdeTicket, resetWechatIdeFileUtilsByHttp, runRetryableCommand, runWechatIdeEngineBuild, runWithSuspendedSharedInput, setWechatIdeTicket, startForwardConsole, takeScreenshot } from "weapp-ide-cli";
17
+ import { RETRY_CANCEL_KEYS, RETRY_CONFIRM_KEYS, bootstrapWechatDevtoolsSettings, buildWechatIdeNpm, clearWechatIdeCache, clearWechatIdeCacheByAutomator, closeSharedMiniProgram, closeWechatIdeProject, compileWechatIdeByAutomator, connectOpenedAutomator, createSharedInputSession, createWechatIdeLoginRequiredExitError, dispatchWechatCliCommand, formatAutomatorLoginError, getConfig, getWechatIdeTestAccounts, getWechatIdeTicket, getWechatIdeToolInfo, isAutomatorLoginError, isWeappIdeTopLevelCommand, isWechatIdeEngineBuildEndpointMissingError, isWechatIdeLoginRequiredError, isWechatIdeLoginRequiredExitError, launchAutomator, openWechatIdeProjectByHttp, parse, promptRetryKeypress, promptWechatIdeLoginRetry, quitWechatIde, refreshWechatIdeTicket, resetWechatIdeFileUtilsByHttp, runRetryableCommand, runWechatIdeEngineBuild, runWithSuspendedSharedInput, setWechatIdeTicket, startForwardConsole, takeScreenshot } from "weapp-ide-cli";
18
18
  import { promisify } from "node:util";
19
19
  import { brotliCompressSync, gzipSync } from "node:zlib";
20
20
  import { resolveCommand } from "package-manager-detector/commands";
@@ -132,7 +132,7 @@ async function tryExecuteWechatIdeCliCommandByHelper(argv) {
132
132
  * @description 统一执行 weapp-ide-cli 命令,并在登录失效时复用同一套重试交互。
133
133
  */
134
134
  async function executeWechatIdeCliCommand(argv, options = {}) {
135
- const { automatorMode = "prefer", cancelLevel = "warn", engineBuildFallbackToCli = false, httpMode = "prefer", onNonLoginError, onRetry, projectPath } = options;
135
+ const { automatorMode = "prefer", cancelLevel = "warn", engineBuildFallbackToCli = false, httpMode = "prefer", promptOpenIdeLogin = true, onNonLoginError, onRetry, projectPath } = options;
136
136
  await runWithSuspendedSharedInput(async () => {
137
137
  if (httpMode !== "skip") try {
138
138
  if (await tryExecuteWechatIdeCliCommandByHttp(argv, projectPath, engineBuildFallbackToCli)) return;
@@ -147,6 +147,7 @@ async function executeWechatIdeCliCommand(argv, options = {}) {
147
147
  try {
148
148
  if (await tryExecuteWechatIdeCliCommandByHelper(argv)) return;
149
149
  } catch (error) {
150
+ if (isWechatIdeLoginRequiredExitError(error)) throw error;
150
151
  if (onNonLoginError) {
151
152
  onNonLoginError(error);
152
153
  return;
@@ -154,12 +155,13 @@ async function executeWechatIdeCliCommand(argv, options = {}) {
154
155
  throw error;
155
156
  }
156
157
  await runRetryableCommand({
157
- createCancelError: () => /* @__PURE__ */ new Error("cancelled"),
158
+ createCancelError: (error) => createWechatIdeLoginRequiredExitError(error, "cancelled"),
158
159
  execute: async () => {
159
160
  try {
160
161
  await parse(argv);
161
162
  return null;
162
163
  } catch (error) {
164
+ if (isWechatIdeLoginRequiredExitError(error)) throw error;
163
165
  if (!isWechatIdeLoginRequiredError(error)) {
164
166
  if (onNonLoginError) {
165
167
  onNonLoginError(error);
@@ -178,7 +180,8 @@ async function executeWechatIdeCliCommand(argv, options = {}) {
178
180
  promptRetry: async (error) => await promptWechatIdeLoginRetry({
179
181
  cancelLevel,
180
182
  error,
181
- logger: logger_default
183
+ logger: logger_default,
184
+ promptOpenIdeLogin
182
185
  }),
183
186
  shouldRetry: (action) => action === "retry"
184
187
  });
@@ -313,7 +316,8 @@ async function runWechatIdeOpenWithRetry(argv) {
313
316
  onNonLoginError: (error) => logger_default.error(error),
314
317
  onRetry: () => {
315
318
  logger_default.info(colors.bold(colors.green("正在重试连接微信开发者工具...")));
316
- }
319
+ },
320
+ promptOpenIdeLogin: true
317
321
  });
318
322
  }
319
323
  /**
@@ -346,29 +350,35 @@ async function tryOpenWechatIdeByAutomator(projectPath, options) {
346
350
  /**
347
351
  * @description 打开后主动刷新微信开发者工具的项目索引,避免模拟器沿用过期 app 配置。
348
352
  */
349
- async function stabilizeOpenedWechatIdeProject(projectPath, servicePortEnabled) {
353
+ function appendLoginRetryArgv(argv, options) {
354
+ if (options.nonInteractive) argv.push("--non-interactive");
355
+ if (options.loginRetry) argv.push("--login-retry", options.loginRetry);
356
+ if (options.loginRetryTimeout) argv.push("--login-retry-timeout", options.loginRetryTimeout);
357
+ return argv;
358
+ }
359
+ async function stabilizeOpenedWechatIdeProject(projectPath, servicePortEnabled, options = {}) {
350
360
  if (servicePortEnabled === false) return;
351
361
  try {
352
- await executeWechatIdeCliCommand(["compile"], {
362
+ await executeWechatIdeCliCommand(appendLoginRetryArgv(["compile"], options), {
353
363
  httpMode: "prefer",
354
364
  onNonLoginError: (error) => logger_default.error(error),
355
365
  projectPath
356
366
  });
357
- await executeWechatIdeCliCommand([
367
+ await executeWechatIdeCliCommand(appendLoginRetryArgv([
358
368
  "reset-fileutils",
359
369
  "-p",
360
370
  projectPath
361
- ], {
371
+ ], options), {
362
372
  httpMode: "prefer",
363
373
  onNonLoginError: (error) => logger_default.error(error),
364
374
  projectPath
365
375
  });
366
376
  try {
367
- await executeWechatIdeCliCommand([
377
+ await executeWechatIdeCliCommand(appendLoginRetryArgv([
368
378
  "engine",
369
379
  "build",
370
380
  projectPath
371
- ], {
381
+ ], options), {
372
382
  httpMode: "prefer",
373
383
  onNonLoginError: (error) => logger_default.error(error),
374
384
  projectPath
@@ -378,7 +388,7 @@ async function stabilizeOpenedWechatIdeProject(projectPath, servicePortEnabled)
378
388
  logger_default.warn("当前微信开发者工具不支持自动 engine build 刷新,已跳过该步骤;如模拟器显示旧状态,可在开发者工具内手动编译。");
379
389
  }
380
390
  try {
381
- await executeWechatIdeCliCommand(["compile"], {
391
+ await executeWechatIdeCliCommand(appendLoginRetryArgv(["compile"], options), {
382
392
  automatorMode: "require",
383
393
  httpMode: "skip",
384
394
  projectPath
@@ -387,6 +397,7 @@ async function stabilizeOpenedWechatIdeProject(projectPath, servicePortEnabled)
387
397
  if (shouldLogAutomatorFallbackError()) logger_default.error(error);
388
398
  }
389
399
  } catch (error) {
400
+ if (isWechatIdeLoginRequiredExitError(error)) throw error;
390
401
  logger_default.warn("刷新微信开发者工具项目索引失败,已保留当前打开状态;如模拟器仍显示旧状态,可手动刷新一次。");
391
402
  if (shouldLogAutomatorFallbackError()) logger_default.error(error);
392
403
  }
@@ -396,6 +407,9 @@ function createIdeOpenArgv(platform, projectPath, options = {}) {
396
407
  if (projectPath) argv.push(projectPath);
397
408
  if (platform === "weapp" && options.trustProject !== false) argv.push("--trust-project");
398
409
  if (platform && shouldPassPlatformArgToIdeOpen(platform)) argv.push("--platform", platform);
410
+ if (options.nonInteractive) argv.push("--non-interactive");
411
+ if (options.loginRetry) argv.push("--login-retry", options.loginRetry);
412
+ if (options.loginRetryTimeout) argv.push("--login-retry-timeout", options.loginRetryTimeout);
399
413
  return argv;
400
414
  }
401
415
  async function openIde(platform, projectPath, options = {}) {
@@ -412,7 +426,7 @@ async function openIde(platform, projectPath, options = {}) {
412
426
  if (platform === "weapp" && projectPath && bootstrapResult?.servicePortEnabled === false) logger_default.warn("检测到微信开发者工具服务端口当前处于关闭状态,已保留用户设置并回退到普通 open 流程。");
413
427
  if (platform === "weapp" && projectPath && options.trustProject !== false && bootstrapResult?.servicePortEnabled !== false) try {
414
428
  if (await tryOpenWechatIdeByAutomator(projectPath, options)) {
415
- await stabilizeOpenedWechatIdeProject(projectPath, bootstrapResult?.servicePortEnabled);
429
+ await stabilizeOpenedWechatIdeProject(projectPath, bootstrapResult?.servicePortEnabled, options);
416
430
  return;
417
431
  }
418
432
  } catch (error) {
@@ -424,7 +438,7 @@ async function openIde(platform, projectPath, options = {}) {
424
438
  if (shouldLogAutomatorFallbackError()) logger_default.error(error);
425
439
  }
426
440
  await runWechatIdeOpenWithRetry(createIdeOpenArgv(platform, projectPath, options));
427
- if (platform === "weapp" && projectPath) await stabilizeOpenedWechatIdeProject(projectPath, bootstrapResult?.servicePortEnabled);
441
+ if (platform === "weapp" && projectPath) await stabilizeOpenedWechatIdeProject(projectPath, bootstrapResult?.servicePortEnabled, options);
428
442
  }
429
443
  /**
430
444
  * @description 解析 IDE 相关命令所需的平台、项目目录与配置上下文。
@@ -3450,7 +3464,7 @@ function registerNpmCommand(cli) {
3450
3464
  //#endregion
3451
3465
  //#region src/cli/commands/open.ts
3452
3466
  function registerOpenCommand(cli) {
3453
- cli.command("open [root]").option("-p, --platform <platform>", `[string] target platform (weapp | web)`).option("--trust-project", "[boolean] auto trust Wechat DevTools project on open", { default: true }).action(async (root, options) => {
3467
+ cli.command("open [root]").option("-p, --platform <platform>", `[string] target platform (weapp | web)`).option("--trust-project", "[boolean] auto trust Wechat DevTools project on open", { default: true }).option("--login-retry <mode>", "[string] login retry mode for Wechat DevTools (never | once | always)").option("--login-retry-timeout <ms>", "[number] login retry prompt timeout in milliseconds").option("--non-interactive", "[boolean] fail immediately when Wechat DevTools login has expired").action(async (root, options) => {
3454
3468
  filterDuplicateOptions(options);
3455
3469
  const configFile = resolveConfigFile(options);
3456
3470
  const targets = resolveRuntimeTargets(options);
@@ -3467,7 +3481,12 @@ function registerOpenCommand(cli) {
3467
3481
  weappViteConfig
3468
3482
  });
3469
3483
  if (latestHmrSummary) logger_default.info(latestHmrSummary.line);
3470
- await openIde(platform, projectPath ?? resolveIdeProjectRoot(mpDistRoot, process.cwd()), { trustProject: options.trustProject });
3484
+ await openIde(platform, projectPath ?? resolveIdeProjectRoot(mpDistRoot, process.cwd()), {
3485
+ loginRetry: options.loginRetry,
3486
+ loginRetryTimeout: options.loginRetryTimeout,
3487
+ nonInteractive: options.nonInteractive,
3488
+ trustProject: options.trustProject
3489
+ });
3471
3490
  });
3472
3491
  }
3473
3492
  //#endregion
@@ -3716,7 +3735,7 @@ function resolveRunnableHotkeyDefinition(input) {
3716
3735
  }
3717
3736
  //#endregion
3718
3737
  //#region package.json
3719
- var version = "6.16.34";
3738
+ var version = "6.16.37";
3720
3739
  //#endregion
3721
3740
  //#region src/cli/devHotkeys/format.ts
3722
3741
  const FULLWIDTH_ASCII_START = 65281;
@@ -4316,7 +4335,7 @@ function waitForServeShutdownSignal() {
4316
4335
  //#endregion
4317
4336
  //#region src/cli/commands/serve/index.ts
4318
4337
  function registerServeCommand(cli) {
4319
- cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--skipNpm", `[boolean] if skip npm build`).option("-o, --open", `[boolean] open ide`).option("-p, --platform <platform>", `[string] target platform (weapp | web | all)`).option("--project-config <path>", `[string] project config path (miniprogram only)`).option("--trust-project", "[boolean] auto trust Wechat DevTools project on open", { default: true }).option("--host [host]", `[string] web dev server host`).option("--ui", `[boolean] 启动调试 UI(当前提供分析视图)`, { default: false }).option("--analyze", `[boolean] 启动分包分析仪表盘 (实验特性)`, { default: false }).option("--scope <scope>", `[string] 局部构建范围,例如 main,packages/order`).action(async (root, options) => {
4338
+ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--skipNpm", `[boolean] if skip npm build`).option("-o, --open", `[boolean] open ide`).option("-p, --platform <platform>", `[string] target platform (weapp | web | all)`).option("--project-config <path>", `[string] project config path (miniprogram only)`).option("--trust-project", "[boolean] auto trust Wechat DevTools project on open", { default: true }).option("--login-retry <mode>", "[string] login retry mode for Wechat DevTools (never | once | always)").option("--login-retry-timeout <ms>", "[number] login retry prompt timeout in milliseconds").option("--non-interactive", "[boolean] fail immediately when Wechat DevTools login has expired").option("--host [host]", `[string] web dev server host`).option("--ui", `[boolean] 启动调试 UI(当前提供分析视图)`, { default: false }).option("--analyze", `[boolean] 启动分包分析仪表盘 (实验特性)`, { default: false }).option("--scope <scope>", `[string] 局部构建范围,例如 main,packages/order`).action(async (root, options) => {
4320
4339
  filterDuplicateOptions(options);
4321
4340
  const configFile = resolveConfigFile(options);
4322
4341
  const targets = resolveRuntimeTargets(options);
@@ -4370,6 +4389,9 @@ function registerServeCommand(cli) {
4370
4389
  fallbackProjectPath: configService.cwd,
4371
4390
  openIde: async (projectPath) => {
4372
4391
  await openIde(configService.platform, projectPath, {
4392
+ loginRetry: options.loginRetry,
4393
+ loginRetryTimeout: options.loginRetryTimeout,
4394
+ nonInteractive: options.nonInteractive,
4373
4395
  reuseOpenedProject: false,
4374
4396
  trustProject: options.trustProject
4375
4397
  });
@@ -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-DuKnIngQ.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--u6Mt5At.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";
@@ -21388,6 +21388,10 @@ function loadScopedSlotModule(id, scopedSlotModules) {
21388
21388
  //#endregion
21389
21389
  //#region src/plugins/vue/transform/bundle/shared/assets.ts
21390
21390
  const APP_VUE_LIKE_FILE_RE$1 = /[\\/]app\.(?:vue|jsx|tsx)$/;
21391
+ async function processVueResultStyle(style, configService) {
21392
+ if (!configService.platform) return style;
21393
+ return await processCssWithCache(style, configService);
21394
+ }
21391
21395
  function resolveVueBundleAssetContext(configService) {
21392
21396
  const outputExtensions = configService.outputExtensions;
21393
21397
  const bundleOutputExtensions = resolveBundleOutputExtensions(outputExtensions);
@@ -21412,9 +21416,9 @@ function emitSharedVueEntryJsonAsset(options) {
21412
21416
  });
21413
21417
  emitSfcJsonAsset(options.pluginCtx, options.bundle, options.relativeBase, { config: normalizedConfig }, options.jsonOptions);
21414
21418
  }
21415
- function emitSharedFallbackPageAssets(options) {
21416
- const { bundle, pluginCtx, relativeBase, result, outputExtensions, platformAssetOptions, styleExtension, jsonExtension, jsonDefaults, jsonMergeStrategy } = options;
21417
- if (result.style) emitSfcStyleIfMissing(pluginCtx, bundle, relativeBase, result.style, styleExtension);
21419
+ async function emitSharedFallbackPageAssets(options) {
21420
+ const { bundle, pluginCtx, configService, relativeBase, result, outputExtensions, platformAssetOptions, styleExtension, jsonExtension, jsonDefaults, jsonMergeStrategy } = options;
21421
+ if (result.style) emitSfcStyleIfMissing(pluginCtx, bundle, relativeBase, await processVueResultStyle(result.style, configService), styleExtension);
21418
21422
  emitSharedVueEntryJsonAsset({
21419
21423
  bundle,
21420
21424
  pluginCtx,
@@ -21484,7 +21488,7 @@ function emitBundleVueEntryAssets(options) {
21484
21488
  });
21485
21489
  return { jsonConfig };
21486
21490
  }
21487
- function emitFallbackPageBundleAssets(options) {
21491
+ async function emitFallbackPageBundleAssets(options) {
21488
21492
  const { jsonConfig } = emitBundleVueEntryAssets({
21489
21493
  bundle: options.bundle,
21490
21494
  pluginCtx: options.pluginCtx,
@@ -21498,9 +21502,10 @@ function emitFallbackPageBundleAssets(options) {
21498
21502
  outputExtensions: options.outputExtensions,
21499
21503
  platformAssetOptions: options.platformAssetOptions
21500
21504
  });
21501
- emitSharedFallbackPageAssets({
21505
+ await emitSharedFallbackPageAssets({
21502
21506
  bundle: options.bundle,
21503
21507
  pluginCtx: options.pluginCtx,
21508
+ configService: options.configService,
21504
21509
  relativeBase: options.relativeBase,
21505
21510
  result: options.result,
21506
21511
  outputExtensions: options.outputExtensions,
@@ -21511,7 +21516,7 @@ function emitFallbackPageBundleAssets(options) {
21511
21516
  jsonMergeStrategy: jsonConfig?.mergeStrategy
21512
21517
  });
21513
21518
  }
21514
- function emitCompiledEntryBundleAssets(options) {
21519
+ async function emitCompiledEntryBundleAssets(options) {
21515
21520
  const isAppVue = APP_VUE_LIKE_FILE_RE$1.test(options.filename);
21516
21521
  const hmrState = options.ctx.runtimeState?.build?.hmr;
21517
21522
  const shouldEmitComponentJson = !isAppVue && !options.isPage;
@@ -21534,7 +21539,10 @@ function emitCompiledEntryBundleAssets(options) {
21534
21539
  outputExtensions: options.outputExtensions,
21535
21540
  platformAssetOptions: options.platformAssetOptions
21536
21541
  });
21537
- if (shouldEmitSfcStyleAsset) emitSfcStyleIfMissing(options.pluginCtx, options.bundle, options.relativeBase, sfcStyle, options.outputExtensions.wxss, isAppVue ? { updateExisting: false } : void 0);
21542
+ if (shouldEmitSfcStyleAsset) {
21543
+ const style = await processVueResultStyle(sfcStyle, options.configService);
21544
+ emitSfcStyleIfMissing(options.pluginCtx, options.bundle, options.relativeBase, style, options.outputExtensions.wxss, isAppVue ? { updateExisting: false } : void 0);
21545
+ }
21538
21546
  if (options.result.config || shouldEmitComponentJson) emitSharedVueEntryJsonAsset({
21539
21547
  bundle: options.bundle,
21540
21548
  pluginCtx: options.pluginCtx,
@@ -23048,7 +23056,7 @@ async function emitResolvedCompiledVueEntryAssets(options) {
23048
23056
  kind: "page-layout",
23049
23057
  template: result.template
23050
23058
  });
23051
- const { shouldEmitComponentJson } = emitCompiledEntryBundleAssets({
23059
+ const { shouldEmitComponentJson } = await emitCompiledEntryBundleAssets({
23052
23060
  bundle,
23053
23061
  pluginCtx,
23054
23062
  ctx,
@@ -23175,7 +23183,7 @@ async function emitResolvedFallbackPageEntryAssets(options) {
23175
23183
  }
23176
23184
  });
23177
23185
  applyAppShell(result, options.entryFilePath, options.appShell);
23178
- emitFallbackPageBundleAssets({
23186
+ await emitFallbackPageBundleAssets({
23179
23187
  bundle: options.bundle,
23180
23188
  pluginCtx: options.pluginCtx,
23181
23189
  ctx: options.ctx,
@@ -24733,7 +24741,7 @@ async function loadAppEntry(ctx, scanState) {
24733
24741
  const vueAppPath = await findVueEntry(appBasename);
24734
24742
  let configFromVue;
24735
24743
  if (!appConfigFile && vueAppPath) {
24736
- const { extractConfigFromVue } = await import("./file-B0xt4gdk.mjs");
24744
+ const { extractConfigFromVue } = await import("./file-BGjDGA3Q.mjs");
24737
24745
  configFromVue = await extractConfigFromVue(vueAppPath);
24738
24746
  if (configFromVue) appConfigFile = vueAppPath;
24739
24747
  }
@@ -84,7 +84,7 @@ function resolveAutoRoutesMacroImportPath() {
84
84
  }
85
85
  async function resolveAutoRoutesInlineSnapshot() {
86
86
  try {
87
- const { getCompilerContext } = await import("./getInstance-BGkP2tgX.mjs");
87
+ const { getCompilerContext } = await import("./getInstance-JUJuJysh.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--u6Mt5At.mjs";
2
+ export { extractConfigFromVue };
@@ -0,0 +1,2 @@
1
+ import { i as getCompilerContext } from "./createContext-29bA2ZmE.mjs";
2
+ export { getCompilerContext };
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 WEB_PLATFORM_ALIASES, d as isWebPlatform, f as resolveWeappViteTarget, l as getSupportedWeappVitePlatforms, t as createCompilerContext, u as getSupportedWeappViteTargetDescriptors } from "./createContext-BZRrqhni.mjs";
4
+ import { c as WEB_PLATFORM_ALIASES, d as isWebPlatform, f as resolveWeappViteTarget, l as getSupportedWeappVitePlatforms, t as createCompilerContext, u as getSupportedWeappViteTargetDescriptors } from "./createContext-29bA2ZmE.mjs";
5
5
  import { i as createWevuComponent, n as defineProps, r as setPageLayout, t as defineEmits } from "./runtime-C3z9pDQB.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, resolveWeappViteHostMeta, resolveWeappViteTarget, setPageLayout };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "weapp-vite",
3
3
  "type": "module",
4
- "version": "6.16.34",
4
+ "version": "6.16.37",
5
5
  "description": "weapp-vite 一个现代化的小程序打包工具",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -119,20 +119,20 @@
119
119
  "vue-tsc": "^3.3.3",
120
120
  "@weapp-core/constants": "0.1.12",
121
121
  "@weapp-core/init": "6.0.9",
122
- "@weapp-core/logger": "3.1.1",
123
122
  "@weapp-core/schematics": "6.0.4",
124
123
  "@weapp-core/shared": "3.0.4",
125
- "@weapp-vite/ast": "6.16.34",
126
- "@weapp-vite/mcp": "1.3.6",
127
- "@weapp-vite/miniprogram-automator": "1.1.3",
128
- "@weapp-vite/volar": "2.1.0",
129
- "@weapp-vite/web": "1.3.29",
124
+ "@weapp-core/logger": "3.1.1",
125
+ "@weapp-vite/ast": "6.16.37",
126
+ "@weapp-vite/miniprogram-automator": "1.2.1",
127
+ "@weapp-vite/web": "1.3.30",
130
128
  "@wevu/api": "0.2.9",
131
- "@wevu/web-apis": "1.2.19",
129
+ "@wevu/web-apis": "1.2.20",
132
130
  "rolldown-require": "2.0.18",
131
+ "@weapp-vite/volar": "2.1.0",
133
132
  "vite-plugin-performance": "2.0.1",
134
- "weapp-ide-cli": "5.3.3",
135
- "wevu": "6.16.34"
133
+ "@weapp-vite/mcp": "1.4.1",
134
+ "weapp-ide-cli": "5.4.1",
135
+ "wevu": "6.16.37"
136
136
  },
137
137
  "publishConfig": {
138
138
  "access": "public",
@@ -1,2 +0,0 @@
1
- import { t as extractConfigFromVue } from "./file-DuKnIngQ.mjs";
2
- export { extractConfigFromVue };
@@ -1,2 +0,0 @@
1
- import { i as getCompilerContext } from "./createContext-BZRrqhni.mjs";
2
- export { getCompilerContext };