weapp-vite 6.16.33 → 6.16.35

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-DxZoDRL0.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-DxZoDRL0.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-D5ALdQXr.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, 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, 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";
18
18
  import { promisify } from "node:util";
19
19
  import { brotliCompressSync, gzipSync } from "node:zlib";
20
20
  import { resolveCommand } from "package-manager-detector/commands";
@@ -85,7 +85,7 @@ async function tryExecuteWechatIdeCliCommandByAutomator(argv, projectPath) {
85
85
  }
86
86
  return false;
87
87
  }
88
- async function tryExecuteWechatIdeCliCommandByHttp(argv, projectPath) {
88
+ async function tryExecuteWechatIdeCliCommandByHttp(argv, projectPath, engineBuildFallbackToCli = false) {
89
89
  const command = argv[0];
90
90
  if (!command) return false;
91
91
  if (command === "compile") {
@@ -101,7 +101,10 @@ async function tryExecuteWechatIdeCliCommandByHttp(argv, projectPath) {
101
101
  if (command === "engine" && argv[1] === "build") {
102
102
  const engineProjectPath = argv[2] || projectPath;
103
103
  if (!engineProjectPath) return false;
104
- await runWechatIdeEngineBuild(engineProjectPath, { logPath: readArgOption(argv, "--logPath", "-l") });
104
+ await runWechatIdeEngineBuild(engineProjectPath, {
105
+ fallbackToCli: engineBuildFallbackToCli,
106
+ logPath: readArgOption(argv, "--logPath", "-l")
107
+ });
105
108
  return true;
106
109
  }
107
110
  return false;
@@ -129,12 +132,12 @@ async function tryExecuteWechatIdeCliCommandByHelper(argv) {
129
132
  * @description 统一执行 weapp-ide-cli 命令,并在登录失效时复用同一套重试交互。
130
133
  */
131
134
  async function executeWechatIdeCliCommand(argv, options = {}) {
132
- const { automatorMode = "prefer", cancelLevel = "warn", httpMode = "prefer", onNonLoginError, onRetry, projectPath } = options;
135
+ const { automatorMode = "prefer", cancelLevel = "warn", engineBuildFallbackToCli = false, httpMode = "prefer", onNonLoginError, onRetry, projectPath } = options;
133
136
  await runWithSuspendedSharedInput(async () => {
134
137
  if (httpMode !== "skip") try {
135
- if (await tryExecuteWechatIdeCliCommandByHttp(argv, projectPath)) return;
138
+ if (await tryExecuteWechatIdeCliCommandByHttp(argv, projectPath, engineBuildFallbackToCli)) return;
136
139
  } catch (error) {
137
- if (httpMode === "require") throw error;
140
+ if (httpMode === "require" || isWechatIdeEngineBuildEndpointMissingError(error)) throw error;
138
141
  }
139
142
  try {
140
143
  if (await tryExecuteWechatIdeCliCommandByAutomator(argv, projectPath)) return;
@@ -360,15 +363,20 @@ async function stabilizeOpenedWechatIdeProject(projectPath, servicePortEnabled)
360
363
  onNonLoginError: (error) => logger_default.error(error),
361
364
  projectPath
362
365
  });
363
- await executeWechatIdeCliCommand([
364
- "engine",
365
- "build",
366
- projectPath
367
- ], {
368
- httpMode: "prefer",
369
- onNonLoginError: (error) => logger_default.error(error),
370
- projectPath
371
- });
366
+ try {
367
+ await executeWechatIdeCliCommand([
368
+ "engine",
369
+ "build",
370
+ projectPath
371
+ ], {
372
+ httpMode: "prefer",
373
+ onNonLoginError: (error) => logger_default.error(error),
374
+ projectPath
375
+ });
376
+ } catch (error) {
377
+ if (!isWechatIdeEngineBuildEndpointMissingError(error)) throw error;
378
+ logger_default.warn("当前微信开发者工具不支持自动 engine build 刷新,已跳过该步骤;如模拟器显示旧状态,可在开发者工具内手动编译。");
379
+ }
372
380
  try {
373
381
  await executeWechatIdeCliCommand(["compile"], {
374
382
  automatorMode: "require",
@@ -3708,7 +3716,7 @@ function resolveRunnableHotkeyDefinition(input) {
3708
3716
  }
3709
3717
  //#endregion
3710
3718
  //#region package.json
3711
- var version = "6.16.33";
3719
+ var version = "6.16.35";
3712
3720
  //#endregion
3713
3721
  //#region src/cli/devHotkeys/format.ts
3714
3722
  const FULLWIDTH_ASCII_START = 65281;
@@ -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-D5ALdQXr.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";
@@ -11499,7 +11499,8 @@ function createBuildService(ctx) {
11499
11499
  logger_default.info("检测到 Vite 配置变更,正在重启小程序开发构建...");
11500
11500
  resetRuntimeStateForConfigRestart();
11501
11501
  await configService.load(configService.loadOptions);
11502
- await scanService.loadAppEntry().catch(() => {});
11502
+ await scanService.loadAppEntry();
11503
+ scanService.loadSubPackages();
11503
11504
  logger_default.success("Vite 配置已重新加载,小程序开发构建已重启。");
11504
11505
  await runDev(target);
11505
11506
  }
@@ -21387,6 +21388,10 @@ function loadScopedSlotModule(id, scopedSlotModules) {
21387
21388
  //#endregion
21388
21389
  //#region src/plugins/vue/transform/bundle/shared/assets.ts
21389
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
+ }
21390
21395
  function resolveVueBundleAssetContext(configService) {
21391
21396
  const outputExtensions = configService.outputExtensions;
21392
21397
  const bundleOutputExtensions = resolveBundleOutputExtensions(outputExtensions);
@@ -21411,9 +21416,9 @@ function emitSharedVueEntryJsonAsset(options) {
21411
21416
  });
21412
21417
  emitSfcJsonAsset(options.pluginCtx, options.bundle, options.relativeBase, { config: normalizedConfig }, options.jsonOptions);
21413
21418
  }
21414
- function emitSharedFallbackPageAssets(options) {
21415
- const { bundle, pluginCtx, relativeBase, result, outputExtensions, platformAssetOptions, styleExtension, jsonExtension, jsonDefaults, jsonMergeStrategy } = options;
21416
- 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);
21417
21422
  emitSharedVueEntryJsonAsset({
21418
21423
  bundle,
21419
21424
  pluginCtx,
@@ -21483,7 +21488,7 @@ function emitBundleVueEntryAssets(options) {
21483
21488
  });
21484
21489
  return { jsonConfig };
21485
21490
  }
21486
- function emitFallbackPageBundleAssets(options) {
21491
+ async function emitFallbackPageBundleAssets(options) {
21487
21492
  const { jsonConfig } = emitBundleVueEntryAssets({
21488
21493
  bundle: options.bundle,
21489
21494
  pluginCtx: options.pluginCtx,
@@ -21497,9 +21502,10 @@ function emitFallbackPageBundleAssets(options) {
21497
21502
  outputExtensions: options.outputExtensions,
21498
21503
  platformAssetOptions: options.platformAssetOptions
21499
21504
  });
21500
- emitSharedFallbackPageAssets({
21505
+ await emitSharedFallbackPageAssets({
21501
21506
  bundle: options.bundle,
21502
21507
  pluginCtx: options.pluginCtx,
21508
+ configService: options.configService,
21503
21509
  relativeBase: options.relativeBase,
21504
21510
  result: options.result,
21505
21511
  outputExtensions: options.outputExtensions,
@@ -21510,7 +21516,7 @@ function emitFallbackPageBundleAssets(options) {
21510
21516
  jsonMergeStrategy: jsonConfig?.mergeStrategy
21511
21517
  });
21512
21518
  }
21513
- function emitCompiledEntryBundleAssets(options) {
21519
+ async function emitCompiledEntryBundleAssets(options) {
21514
21520
  const isAppVue = APP_VUE_LIKE_FILE_RE$1.test(options.filename);
21515
21521
  const hmrState = options.ctx.runtimeState?.build?.hmr;
21516
21522
  const shouldEmitComponentJson = !isAppVue && !options.isPage;
@@ -21533,7 +21539,10 @@ function emitCompiledEntryBundleAssets(options) {
21533
21539
  outputExtensions: options.outputExtensions,
21534
21540
  platformAssetOptions: options.platformAssetOptions
21535
21541
  });
21536
- 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
+ }
21537
21546
  if (options.result.config || shouldEmitComponentJson) emitSharedVueEntryJsonAsset({
21538
21547
  bundle: options.bundle,
21539
21548
  pluginCtx: options.pluginCtx,
@@ -21640,6 +21649,9 @@ function isWevuMinifyEnabled(config, isDev = false) {
21640
21649
  }
21641
21650
  //#endregion
21642
21651
  //#region src/plugins/vue/transform/compileOptions.ts
21652
+ function hasVueExtension(id) {
21653
+ return Boolean(id?.endsWith(".vue"));
21654
+ }
21643
21655
  function getCompileVueFileOptionsCacheKey(vuePath, isPage, isApp) {
21644
21656
  return `${vuePath}::${isPage ? "page" : "component"}::${isApp ? "app" : "entry"}`;
21645
21657
  }
@@ -21696,19 +21708,47 @@ function buildCompileVueFileOptions(ctx, pluginCtx, vuePath, isPage, isApp, conf
21696
21708
  const wevuDefaults = resolveWevuDefaultsWithPreset(configService.weappViteConfig);
21697
21709
  const wevuMinify = isWevuMinifyEnabled(configService.weappViteConfig, configService.isDev);
21698
21710
  const jsonKind = isApp ? "app" : isPage ? "page" : "component";
21711
+ async function resolvePotentialVueSfcEntryId(candidate) {
21712
+ const trimmed = candidate?.trim();
21713
+ if (!trimmed) return;
21714
+ const entryResolveOptions = createCachedEntryResolveOptions(configService, { kind: "default" });
21715
+ const localCandidate = path.isAbsolute(trimmed) ? trimmed : trimmed.startsWith(".") ? path.resolve(path.dirname(vuePath), trimmed) : !trimmed.includes(":") && !trimmed.startsWith("@") ? path.resolve(configService.absoluteSrcRoot, trimmed) : void 0;
21716
+ if (localCandidate) {
21717
+ const normalized = normalizeFsResolvedId(localCandidate);
21718
+ if (hasVueExtension(normalized)) return normalized;
21719
+ const resolvedEntry = !normalized || isSkippableResolvedId(normalized) ? void 0 : await resolveEntryPath(normalized, entryResolveOptions);
21720
+ if (hasVueExtension(resolvedEntry)) return resolvedEntry;
21721
+ }
21722
+ const resolveCandidates = path.extname(trimmed) ? [trimmed] : [
21723
+ trimmed,
21724
+ `${trimmed}.vue`,
21725
+ `${trimmed}/index.vue`
21726
+ ];
21727
+ for (const resolveCandidate of resolveCandidates) {
21728
+ const resolved = await pluginCtx.resolve?.(resolveCandidate, vuePath);
21729
+ const normalized = resolved?.id ? normalizeFsResolvedId(resolved.id) : void 0;
21730
+ if (!normalized || isSkippableResolvedId(normalized)) continue;
21731
+ if (hasVueExtension(normalized)) return normalized;
21732
+ if (path.isAbsolute(normalized)) {
21733
+ const resolvedEntry = await resolveEntryPath(normalized, entryResolveOptions);
21734
+ if (hasVueExtension(resolvedEntry)) return resolvedEntry;
21735
+ }
21736
+ }
21737
+ }
21699
21738
  async function resolveAutoImportComponentSourceType(match) {
21700
21739
  if (match.kind === "local") {
21701
21740
  const resolvedId = match.entry.templatePath;
21702
21741
  return {
21703
21742
  resolvedId,
21704
- sourceType: resolvedId?.endsWith(".vue") ? "wevu-sfc" : "native"
21743
+ sourceType: hasVueExtension(resolvedId) ? "wevu-sfc" : "native"
21705
21744
  };
21706
21745
  }
21707
21746
  const explicitSourceType = match.value.sourceType;
21708
21747
  const explicitResolvedId = match.value.resolvedId;
21709
- if (explicitSourceType || explicitResolvedId?.endsWith(".vue") || match.value.from.endsWith(".vue")) return {
21710
- resolvedId: explicitResolvedId,
21711
- sourceType: explicitSourceType ?? (explicitResolvedId?.endsWith(".vue") || match.value.from.endsWith(".vue") ? "wevu-sfc" : "native")
21748
+ const resolvedExplicitVueId = await resolvePotentialVueSfcEntryId(explicitResolvedId);
21749
+ if (explicitSourceType || resolvedExplicitVueId || hasVueExtension(explicitResolvedId) || hasVueExtension(match.value.from)) return {
21750
+ resolvedId: resolvedExplicitVueId ?? explicitResolvedId,
21751
+ sourceType: explicitSourceType ?? (resolvedExplicitVueId || hasVueExtension(explicitResolvedId) || hasVueExtension(match.value.from) ? "wevu-sfc" : "native")
21712
21752
  };
21713
21753
  let localSourceBase;
21714
21754
  if (match.value.from.startsWith("/")) localSourceBase = path.join(configService.absoluteSrcRoot, match.value.from.slice(1));
@@ -21720,7 +21760,7 @@ function buildCompileVueFileOptions(ctx, pluginCtx, vuePath, isPage, isApp, conf
21720
21760
  const resolvedId = await resolveEntryPath(localSourceBase, createCachedEntryResolveOptions(configService, { kind: "default" }));
21721
21761
  return {
21722
21762
  resolvedId,
21723
- sourceType: resolvedId?.endsWith(".vue") ? "wevu-sfc" : "native"
21763
+ sourceType: hasVueExtension(resolvedId) ? "wevu-sfc" : "native"
21724
21764
  };
21725
21765
  }
21726
21766
  return {
@@ -23016,7 +23056,7 @@ async function emitResolvedCompiledVueEntryAssets(options) {
23016
23056
  kind: "page-layout",
23017
23057
  template: result.template
23018
23058
  });
23019
- const { shouldEmitComponentJson } = emitCompiledEntryBundleAssets({
23059
+ const { shouldEmitComponentJson } = await emitCompiledEntryBundleAssets({
23020
23060
  bundle,
23021
23061
  pluginCtx,
23022
23062
  ctx,
@@ -23143,7 +23183,7 @@ async function emitResolvedFallbackPageEntryAssets(options) {
23143
23183
  }
23144
23184
  });
23145
23185
  applyAppShell(result, options.entryFilePath, options.appShell);
23146
- emitFallbackPageBundleAssets({
23186
+ await emitFallbackPageBundleAssets({
23147
23187
  bundle: options.bundle,
23148
23188
  pluginCtx: options.pluginCtx,
23149
23189
  ctx: options.ctx,
@@ -24701,7 +24741,7 @@ async function loadAppEntry(ctx, scanState) {
24701
24741
  const vueAppPath = await findVueEntry(appBasename);
24702
24742
  let configFromVue;
24703
24743
  if (!appConfigFile && vueAppPath) {
24704
- const { extractConfigFromVue } = await import("./file-CAsLsVdT.mjs");
24744
+ const { extractConfigFromVue } = await import("./file-BGjDGA3Q.mjs");
24705
24745
  configFromVue = await extractConfigFromVue(vueAppPath);
24706
24746
  if (configFromVue) appConfigFile = vueAppPath;
24707
24747
  }
@@ -24754,7 +24794,7 @@ async function loadAppEntry(ctx, scanState) {
24754
24794
  }
24755
24795
  throw new Error("`app.json` 解析失败,请确保 `app.json` 文件格式正确");
24756
24796
  }
24757
- throw new Error(`在 ${appDirname} 目录下没有找到 \`app.json\` 或 \`app.vue\`,请确保你初始化了小程序项目,或者在 \`vite.config.ts\` / \`weapp-vite.config.ts\` 中设置正确的 \`weapp.srcRoot\` 配置路径`);
24797
+ throw new Error(`在 ${appDirname} 目录下没有找到 \`app.json\`、\`app.json.ts\` 或 \`app.vue\`,请确保你初始化了小程序项目,或者在 \`vite.config.ts\` / \`weapp-vite.config.ts\` 中设置正确的 \`weapp.srcRoot\` 配置路径`);
24758
24798
  }
24759
24799
  //#endregion
24760
24800
  //#region src/runtime/scanPlugin/styleEntries/config.ts
@@ -25071,7 +25111,7 @@ function loadSubPackages(ctx) {
25071
25111
  scanState.isDirty = false;
25072
25112
  } else for (const meta of subPackageMap.values()) meta.entries = resolveSubPackageEntries(meta.subPackage);
25073
25113
  if (scanState.appEntry) return [...subPackageMap.values()];
25074
- throw new Error(`在 ${configService.absoluteSrcRoot} 目录下没有找到 \`app.json\`, 请确保你初始化了小程序项目,或者在 \`vite.config.ts\` / \`weapp-vite.config.ts\` 中设置正确的 \`weapp.srcRoot\` 配置路径`);
25114
+ throw new Error(`在 ${configService.absoluteSrcRoot} 目录下没有找到 \`app.json\`、\`app.json.ts\` \`app.vue\`,请确保你初始化了小程序项目,或者在 \`vite.config.ts\` / \`weapp-vite.config.ts\` 中设置正确的 \`weapp.srcRoot\` 配置路径`);
25075
25115
  }
25076
25116
  //#endregion
25077
25117
  //#region src/runtime/scanPlugin/service/index.ts
@@ -84,7 +84,7 @@ function resolveAutoRoutesMacroImportPath() {
84
84
  }
85
85
  async function resolveAutoRoutesInlineSnapshot() {
86
86
  try {
87
- const { getCompilerContext } = await import("./getInstance-NP3CPo-d.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-DxZoDRL0.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.33",
4
+ "version": "6.16.35",
5
5
  "description": "weapp-vite 一个现代化的小程序打包工具",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -118,28 +118,28 @@
118
118
  "vue": "^3.5.35",
119
119
  "vue-tsc": "^3.3.3",
120
120
  "@weapp-core/constants": "0.1.12",
121
- "@weapp-core/init": "6.0.9",
122
121
  "@weapp-core/logger": "3.1.1",
123
122
  "@weapp-core/schematics": "6.0.4",
123
+ "@weapp-core/init": "6.0.9",
124
124
  "@weapp-core/shared": "3.0.4",
125
- "@weapp-vite/ast": "6.16.33",
126
- "@weapp-vite/mcp": "1.3.6",
127
- "@weapp-vite/miniprogram-automator": "1.1.3",
125
+ "@weapp-vite/ast": "6.16.35",
126
+ "@weapp-vite/miniprogram-automator": "1.2.0",
128
127
  "@weapp-vite/volar": "2.1.0",
129
128
  "@weapp-vite/web": "1.3.29",
130
129
  "@wevu/api": "0.2.9",
131
- "@wevu/web-apis": "1.2.19",
130
+ "@weapp-vite/mcp": "1.4.0",
131
+ "@wevu/web-apis": "1.2.20",
132
132
  "rolldown-require": "2.0.18",
133
133
  "vite-plugin-performance": "2.0.1",
134
- "weapp-ide-cli": "5.3.2",
135
- "wevu": "6.16.33"
134
+ "weapp-ide-cli": "5.4.0",
135
+ "wevu": "6.16.35"
136
136
  },
137
137
  "publishConfig": {
138
138
  "access": "public",
139
139
  "registry": "https://registry.npmjs.org"
140
140
  },
141
141
  "devDependencies": {
142
- "oxc-parser": "^0.133.0",
142
+ "oxc-parser": "^0.134.0",
143
143
  "oxc-walker": "^1.0.0",
144
144
  "tailwindcss": "^4.3.0",
145
145
  "ts-morph": "^28.0.0"
@@ -1,2 +0,0 @@
1
- import { t as extractConfigFromVue } from "./file-D5ALdQXr.mjs";
2
- export { extractConfigFromVue };
@@ -1,2 +0,0 @@
1
- import { i as getCompilerContext } from "./createContext-DxZoDRL0.mjs";
2
- export { getCompilerContext };