weapp-vite 6.10.2 → 6.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,97 @@
1
+ export function isPrepareCommand(argv) {
2
+ return Array.isArray(argv) && argv[0] === 'prepare'
3
+ }
4
+
5
+ function getGlobalProcess() {
6
+ return Reflect.get(globalThis, 'process')
7
+ }
8
+
9
+ export function formatPrepareSkipMessage(error) {
10
+ const message = error instanceof Error ? error.message : String(error)
11
+ return `[prepare] 跳过 .weapp-vite 支持文件预生成:${message}`
12
+ }
13
+
14
+ export function guardPrepareProcessExit(argv) {
15
+ if (!isPrepareCommand(argv)) {
16
+ return () => {}
17
+ }
18
+
19
+ const currentProcess = getGlobalProcess()
20
+ const originalExit = currentProcess.exit.bind(currentProcess)
21
+ const originalGlobalProcessDescriptor = Object.getOwnPropertyDescriptor(globalThis, 'process')
22
+ const forceSuccessExitCode = () => {
23
+ if (currentProcess.exitCode != null && Number(currentProcess.exitCode) !== 0) {
24
+ currentProcess.exitCode = 0
25
+ }
26
+ }
27
+
28
+ const onBeforeExit = () => {
29
+ forceSuccessExitCode()
30
+ }
31
+
32
+ currentProcess.exit = () => {
33
+ currentProcess.exitCode = 0
34
+ return undefined
35
+ }
36
+ Object.defineProperty(globalThis, 'process', {
37
+ configurable: true,
38
+ enumerable: originalGlobalProcessDescriptor?.enumerable ?? false,
39
+ get() {
40
+ return new Proxy(currentProcess, {
41
+ get(target, property, receiver) {
42
+ if (property === 'exit') {
43
+ return target.exit
44
+ }
45
+ return Reflect.get(target, property, receiver)
46
+ },
47
+ set(target, property, value, receiver) {
48
+ if (property === 'exitCode') {
49
+ Reflect.set(target, property, value == null || Number(value) === 0 ? 0 : 0, receiver)
50
+ return true
51
+ }
52
+ return Reflect.set(target, property, value, receiver)
53
+ },
54
+ })
55
+ },
56
+ set(value) {
57
+ if (originalGlobalProcessDescriptor?.set) {
58
+ originalGlobalProcessDescriptor.set.call(globalThis, value)
59
+ }
60
+ },
61
+ })
62
+ currentProcess.on('beforeExit', onBeforeExit)
63
+
64
+ return () => {
65
+ currentProcess.exit = originalExit
66
+ currentProcess.off('beforeExit', onBeforeExit)
67
+ if (originalGlobalProcessDescriptor) {
68
+ Object.defineProperty(globalThis, 'process', originalGlobalProcessDescriptor)
69
+ }
70
+ }
71
+ }
72
+
73
+ export async function runWeappViteCLI(options = {}) {
74
+ const {
75
+ argv = getGlobalProcess().argv.slice(2),
76
+ importer = () => import('../dist/cli.mjs'),
77
+ write = message => getGlobalProcess().stderr.write(`\n WARN ${message}\n\n`),
78
+ } = options
79
+ const restorePrepareGuard = guardPrepareProcessExit(argv)
80
+
81
+ try {
82
+ await importer()
83
+ return true
84
+ }
85
+ catch (error) {
86
+ if (isPrepareCommand(argv)) {
87
+ write(formatPrepareSkipMessage(error))
88
+ return false
89
+ }
90
+ throw error
91
+ }
92
+ finally {
93
+ if (!isPrepareCommand(argv)) {
94
+ restorePrepareGuard()
95
+ }
96
+ }
97
+ }
@@ -0,0 +1,63 @@
1
+ import { describe, expect, it, vi } from 'vitest'
2
+ import { formatPrepareSkipMessage, guardPrepareProcessExit, runWeappViteCLI } from './bootstrap.js'
3
+
4
+ describe('bin bootstrap', () => {
5
+ it('guards process exit state for prepare at bin level', () => {
6
+ process.exitCode = 1
7
+ const restore = guardPrepareProcessExit(['prepare'])
8
+
9
+ process.exitCode = 2
10
+ expect(process.exitCode).toBe(0)
11
+
12
+ process.exit(3)
13
+ expect(process.exitCode).toBe(0)
14
+
15
+ // prepare keeps the guard for the current process lifetime
16
+ restore()
17
+ expect(process.exitCode).toBe(0)
18
+ })
19
+
20
+ it('swallows bootstrap failures for prepare', async () => {
21
+ const write = vi.fn()
22
+ const importer = vi.fn().mockRejectedValue(new Error('Cannot find module ../dist/cli.mjs'))
23
+
24
+ await expect(runWeappViteCLI({
25
+ argv: ['prepare'],
26
+ importer,
27
+ write,
28
+ })).resolves.toBe(false)
29
+
30
+ expect(write).toHaveBeenCalledWith(
31
+ '[prepare] 跳过 .weapp-vite 支持文件预生成:Cannot find module ../dist/cli.mjs',
32
+ )
33
+ })
34
+
35
+ it('keeps other commands failing during bootstrap', async () => {
36
+ const importer = vi.fn().mockRejectedValue(new Error('boom'))
37
+
38
+ await expect(runWeappViteCLI({
39
+ argv: ['build'],
40
+ importer,
41
+ })).rejects.toThrow('boom')
42
+ })
43
+
44
+ it('formats non-error values', () => {
45
+ expect(formatPrepareSkipMessage('boom')).toBe(
46
+ '[prepare] 跳过 .weapp-vite 支持文件预生成:boom',
47
+ )
48
+ })
49
+
50
+ it('prevents async prepare importers from leaving a failure exit code behind', async () => {
51
+ process.exitCode = undefined
52
+ const importer = vi.fn().mockImplementation(async () => {
53
+ process.exitCode = 1
54
+ })
55
+
56
+ await expect(runWeappViteCLI({
57
+ argv: ['prepare'],
58
+ importer,
59
+ })).resolves.toBe(true)
60
+
61
+ expect(process.exitCode).toBe(0)
62
+ })
63
+ })
package/bin/weapp-vite.js CHANGED
@@ -1,2 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import '../dist/cli.mjs'
2
+ import process from 'node:process'
3
+ import { runWeappViteCLI } from './bootstrap.js'
4
+
5
+ runWeappViteCLI().catch((error) => {
6
+ process.nextTick(() => {
7
+ throw error
8
+ })
9
+ })
package/client.d.ts CHANGED
@@ -42,6 +42,7 @@ declare global {
42
42
  type __WEAPP_APP_JSON__ = import('@weapp-core/schematics').App
43
43
  type __WEAPP_PAGE_JSON__ = import('@weapp-core/schematics').Page
44
44
  type __WEAPP_COMPONENT_JSON__ = import('@weapp-core/schematics').Component
45
+ type __WEAPP_PAGE_META__ = import('wevu').PageMeta
45
46
 
46
47
  function defineAppJson(config: () => __WEAPP_APP_JSON__): () => __WEAPP_APP_JSON__
47
48
  function defineAppJson(config: () => Promise<__WEAPP_APP_JSON__>): () => Promise<__WEAPP_APP_JSON__>
@@ -50,6 +51,7 @@ declare global {
50
51
  function definePageJson(config: () => __WEAPP_PAGE_JSON__): () => __WEAPP_PAGE_JSON__
51
52
  function definePageJson(config: () => Promise<__WEAPP_PAGE_JSON__>): () => Promise<__WEAPP_PAGE_JSON__>
52
53
  function definePageJson(config: __WEAPP_PAGE_JSON__): __WEAPP_PAGE_JSON__
54
+ function definePageMeta(meta: __WEAPP_PAGE_META__): void
53
55
 
54
56
  function defineComponentJson(config: () => __WEAPP_COMPONENT_JSON__): () => __WEAPP_COMPONENT_JSON__
55
57
  function defineComponentJson(config: () => Promise<__WEAPP_COMPONENT_JSON__>): () => Promise<__WEAPP_COMPONENT_JSON__>
@@ -1,6 +1,6 @@
1
- import { n as getCompilerContext } from "./createContext-Dzy3vlIP.mjs";
1
+ import { i as getCompilerContext } from "./createContext-DzgL8nmB.mjs";
2
2
  import "./logger-gutcwWKE.mjs";
3
- import "./file-DLpJ9tlX.mjs";
3
+ import "./file-D6dnM58g.mjs";
4
4
  //#region src/auto-routes.ts
5
5
  const ROUTE_RUNTIME_OVERRIDE_KEY = Symbol.for("weapp-vite.route-runtime");
6
6
  function createGetter(resolver) {
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { a as DEFAULT_MP_PLATFORM, c as createSharedBuildConfig, d as checkRuntime, f as getProjectConfigFileName, i as formatBytes, l as SHARED_CHUNK_VIRTUAL_PREFIX, m as isPathInside, o as normalizeMiniPlatform, p as createCjsConfigLoadError, s as resolveMiniPlatform, t as createCompilerContext, u as resolveWeappConfigFile } from "./createContext-Dzy3vlIP.mjs";
1
+ import { c as normalizeMiniPlatform, d as SHARED_CHUNK_VIRTUAL_PREFIX, f as resolveWeappConfigFile, g as isPathInside, h as createCjsConfigLoadError, l as resolveMiniPlatform, m as getProjectConfigFileName, n as syncProjectSupportFiles, o as formatBytes, p as checkRuntime, r as syncManagedTsconfigBootstrapFiles, s as DEFAULT_MP_PLATFORM, t as createCompilerContext, u as createSharedBuildConfig } from "./createContext-DzgL8nmB.mjs";
2
2
  import { r as logger_default, t as colors } from "./logger-gutcwWKE.mjs";
3
- import { f as VERSION } from "./file-DLpJ9tlX.mjs";
3
+ import { f as VERSION } from "./file-D6dnM58g.mjs";
4
4
  import { resolveWeappMcpConfig, startWeappViteMcpServer } from "./mcp.mjs";
5
5
  import { defu } from "@weapp-core/shared";
6
6
  import path, { posix } from "pathe";
@@ -429,7 +429,7 @@ async function startAnalyzeDashboard(result, options) {
429
429
  //#endregion
430
430
  //#region src/cli/options.ts
431
431
  function filterDuplicateOptions(options) {
432
- for (const [key, value] of Object.entries(options)) if (Array.isArray(value)) options[key] = value[value.length - 1];
432
+ for (const [key, value] of Object.entries(options)) if (Array.isArray(value)) options[key] = value.at(-1);
433
433
  }
434
434
  function resolveConfigFile(options) {
435
435
  if (typeof options.config === "string") return options.config;
@@ -1094,6 +1094,33 @@ function registerOpenCommand(cli) {
1094
1094
  });
1095
1095
  }
1096
1096
  //#endregion
1097
+ //#region src/cli/commands/prepare.ts
1098
+ function resolvePrepareRoot(input) {
1099
+ const values = Array.isArray(input) ? input.filter((item) => typeof item === "string" && item.length > 0) : [];
1100
+ if (values.length === 0) return ".";
1101
+ return (values[0] === "prepare" ? values.slice(1) : values)[0] ?? ".";
1102
+ }
1103
+ function formatPrepareSkipMessage$1(error) {
1104
+ return `跳过 .weapp-vite 支持文件预生成:${error instanceof Error ? error.message : String(error)}`;
1105
+ }
1106
+ function registerPrepareCommand(cli) {
1107
+ cli.command("prepare [...input]", "generate .weapp-vite support files").action(async (input, options) => {
1108
+ try {
1109
+ filterDuplicateOptions(options);
1110
+ await syncProjectSupportFiles(await createCompilerContext({
1111
+ cwd: path.resolve(resolvePrepareRoot(input)),
1112
+ isDev: false,
1113
+ mode: typeof options.mode === "string" ? options.mode : "development",
1114
+ configFile: resolveConfigFile(options),
1115
+ syncSupportFiles: false
1116
+ }));
1117
+ logger_default.info("已生成 .weapp-vite 支持文件。");
1118
+ } catch (error) {
1119
+ logger_default.warn(`[prepare] ${formatPrepareSkipMessage$1(error)}`);
1120
+ }
1121
+ });
1122
+ }
1123
+ //#endregion
1097
1124
  //#region src/cli/commands/serve.ts
1098
1125
  function registerServeCommand(cli) {
1099
1126
  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 | h5)`).option("--project-config <path>", `[string] project config path (miniprogram only)`).option("--host [host]", `[string] web dev server host`).option("--analyze", `[boolean] 启动分包分析仪表盘 (实验特性)`, { default: false }).action(async (root, options) => {
@@ -1298,6 +1325,20 @@ async function maybeAutoStartMcpServer(argv, cliOptions) {
1298
1325
  }
1299
1326
  }
1300
1327
  //#endregion
1328
+ //#region src/cli/prepareGuard.ts
1329
+ function isPrepareCommandArgs(args) {
1330
+ return Array.isArray(args) && args[0] === "prepare";
1331
+ }
1332
+ function formatPrepareSkipMessage(error) {
1333
+ return `[prepare] 跳过 .weapp-vite 支持文件预生成:${error instanceof Error ? error.message : String(error)}`;
1334
+ }
1335
+ function handlePrepareLifecycleError(args, error) {
1336
+ if (!isPrepareCommandArgs(args)) return false;
1337
+ logger_default.warn(formatPrepareSkipMessage(error));
1338
+ process.exitCode = 0;
1339
+ return true;
1340
+ }
1341
+ //#endregion
1301
1342
  //#region src/cli.ts
1302
1343
  const cli = cac("weapp-vite");
1303
1344
  try {
@@ -1313,18 +1354,48 @@ registerBuildCommand(cli);
1313
1354
  registerAnalyzeCommand(cli);
1314
1355
  registerInitCommand(cli);
1315
1356
  registerOpenCommand(cli);
1357
+ registerPrepareCommand(cli);
1316
1358
  registerNpmCommand(cli);
1317
1359
  registerGenerateCommand(cli);
1318
1360
  registerMcpCommand(cli);
1319
1361
  cli.help();
1320
1362
  cli.version(VERSION);
1363
+ const skipManagedTsconfigBootstrapCommands = new Set([
1364
+ "g",
1365
+ "generate",
1366
+ "init",
1367
+ "mcp",
1368
+ "npm"
1369
+ ]);
1370
+ function resolveManagedTsconfigBootstrapRoot(args) {
1371
+ const [firstArg, secondArg] = args;
1372
+ if (!firstArg || firstArg === "--help" || firstArg === "-h" || firstArg === "--version" || firstArg === "-v") return;
1373
+ if (firstArg.startsWith("-")) return process.cwd();
1374
+ if (skipManagedTsconfigBootstrapCommands.has(firstArg)) return;
1375
+ if ([
1376
+ "analyze",
1377
+ "build",
1378
+ "dev",
1379
+ "open",
1380
+ "prepare",
1381
+ "serve"
1382
+ ].includes(firstArg)) {
1383
+ if (secondArg && !secondArg.startsWith("-")) return path.resolve(secondArg);
1384
+ return process.cwd();
1385
+ }
1386
+ return path.resolve(firstArg);
1387
+ }
1321
1388
  try {
1322
1389
  Promise.resolve().then(async () => {
1323
- if (await tryRunIdeCommand(process.argv.slice(2))) return;
1390
+ const args = process.argv.slice(2);
1391
+ if (await tryRunIdeCommand(args)) return;
1392
+ const managedTsconfigBootstrapRoot = resolveManagedTsconfigBootstrapRoot(args);
1393
+ if (managedTsconfigBootstrapRoot) await syncManagedTsconfigBootstrapFiles(managedTsconfigBootstrapRoot);
1324
1394
  cli.parse(process.argv, { run: false });
1325
- await maybeAutoStartMcpServer(process.argv.slice(2), cli.options);
1395
+ await maybeAutoStartMcpServer(args, cli.options);
1326
1396
  await cli.runMatchedCommand();
1327
1397
  }).catch((error) => {
1398
+ if (handlePrepareLifecycleError(process.argv.slice(2), error)) return;
1328
1399
  handleCLIError(error);
1329
1400
  process.exitCode = 1;
1330
1401
  });
@@ -10,7 +10,7 @@ import { Buffer } from "node:buffer";
10
10
  import { PluginOptions } from "vite-tsconfig-paths";
11
11
  import { WrapPluginOptions } from "vite-plugin-performance";
12
12
  import PQueue from "p-queue";
13
- import { ComputedDefinitions as ComputedDefinitions$1, MethodDefinitions as MethodDefinitions$1, Ref, WevuDefaults } from "wevu";
13
+ import { ComputedDefinitions as ComputedDefinitions$1, MethodDefinitions as MethodDefinitions$1, PageLayoutMeta, Ref, WevuDefaults } from "wevu";
14
14
  import { App, App as App$1, Component, Component as Component$1, GenerateType, Page, Page as Page$1, Plugin, Sitemap, Sitemap as Sitemap$1, Theme, Theme as Theme$1 } from "@weapp-core/schematics";
15
15
  import { CompilerOptions } from "typescript";
16
16
  import { WeappWebPluginOptions } from "@weapp-vite/web/plugin";
@@ -192,6 +192,37 @@ interface WeappWebConfig {
192
192
  pluginOptions?: Partial<Omit<WeappWebPluginOptions, 'srcDir'>>;
193
193
  vite?: InlineConfig;
194
194
  }
195
+ interface WeappManagedSharedTsconfigConfig {
196
+ compilerOptions?: CompilerOptions;
197
+ include?: string[];
198
+ exclude?: string[];
199
+ files?: string[];
200
+ }
201
+ interface WeappManagedAppTsconfigConfig {
202
+ compilerOptions?: CompilerOptions;
203
+ vueCompilerOptions?: Record<string, any>;
204
+ include?: string[];
205
+ exclude?: string[];
206
+ files?: string[];
207
+ }
208
+ interface WeappManagedNodeTsconfigConfig {
209
+ compilerOptions?: CompilerOptions;
210
+ include?: string[];
211
+ exclude?: string[];
212
+ files?: string[];
213
+ }
214
+ interface WeappManagedServerTsconfigConfig {
215
+ compilerOptions?: CompilerOptions;
216
+ include?: string[];
217
+ exclude?: string[];
218
+ files?: string[];
219
+ }
220
+ interface WeappManagedTypeScriptConfig {
221
+ shared?: WeappManagedSharedTsconfigConfig;
222
+ app?: WeappManagedAppTsconfigConfig;
223
+ node?: WeappManagedNodeTsconfigConfig;
224
+ server?: WeappManagedServerTsconfigConfig;
225
+ }
195
226
  interface WeappLibEntryContext {
196
227
  name: string;
197
228
  input: string;
@@ -234,6 +265,9 @@ interface NpmSubPackageConfig {
234
265
  interface NpmMainPackageConfig {
235
266
  dependencies?: false | (string | RegExp)[];
236
267
  }
268
+ interface NpmPluginPackageConfig {
269
+ dependencies?: false | (string | RegExp)[];
270
+ }
237
271
  type JsFormat = 'cjs' | 'esm';
238
272
  type SharedChunkStrategy = 'hoist' | 'duplicate';
239
273
  type SharedChunkMode = 'common' | 'path' | 'inline';
@@ -385,6 +419,7 @@ interface WeappNpmConfig {
385
419
  enable?: boolean;
386
420
  cache?: boolean;
387
421
  mainPackage?: NpmMainPackageConfig;
422
+ pluginPackage?: NpmPluginPackageConfig;
388
423
  subPackages?: Record<string, NpmSubPackageConfig>;
389
424
  buildOptions?: (options: NpmBuildOptions, pkgMeta: BuildNpmPackageMeta) => NpmBuildOptions | undefined;
390
425
  alipayNpmMode?: AlipayNpmMode;
@@ -442,6 +477,10 @@ interface WeappWevuConfig {
442
477
  defaults?: WevuDefaults;
443
478
  autoSetDataPick?: boolean;
444
479
  }
480
+ interface WeappRouteRule {
481
+ appLayout?: PageLayoutMeta;
482
+ }
483
+ type WeappRouteRules = Record<string, WeappRouteRule>;
445
484
  //#endregion
446
485
  //#region src/types/config/main.d.ts
447
486
  /**
@@ -501,6 +540,7 @@ interface WeappViteConfig {
501
540
  subPackages?: Record<string, WeappSubPackageConfig>;
502
541
  copy?: CopyOptions;
503
542
  web?: WeappWebConfig;
543
+ typescript?: WeappManagedTypeScriptConfig;
504
544
  lib?: WeappLibConfig;
505
545
  isAdditionalWxml?: (wxmlFilePath: string) => boolean;
506
546
  platform?: MpPlatform;
@@ -520,6 +560,7 @@ interface WeappViteConfig {
520
560
  worker?: WeappWorkerConfig;
521
561
  vue?: WeappVueConfig;
522
562
  wevu?: WeappWevuConfig;
563
+ routeRules?: WeappRouteRules;
523
564
  injectWeapi?: boolean | WeappInjectWeapiConfig;
524
565
  mcp?: boolean | WeappMcpConfig;
525
566
  chunks?: ChunksConfig;
@@ -1397,4 +1438,4 @@ declare function defineConfig(config: UserConfigFnPromise): UserConfigFnPromise;
1397
1438
  declare function defineConfig(config: UserConfigFn): UserConfigFn;
1398
1439
  declare function defineConfig(config: UserConfigLoose): UserConfigLoose;
1399
1440
  //#endregion
1400
- export { WeappDebugConfig as $, SharedChunkOverride as $t, Ref as A, GenerateFilenamesOptions as At, BindingErrorLike as B, JsFormat as Bt, LoadConfigOptions as C, BuildNpmPackageMeta as Ct, MethodDefinitions$1 as D, GenerateDirsOptions as Dt, InlineConfig$1 as E, CopyOptions as Et, RolldownPlugin as F, GenerateTemplateFactory as Ft, EntryJsonFragment as G, JsonMergeStrategy as Gt, BaseEntry as H, JsonMergeContext as Ht, RolldownPluginOption as I, GenerateTemplateFileSource as It, ScanComponentItem as J, NpmMainPackageConfig as Jt, PageEntry as K, MpPlatform as Kt, RolldownWatchOptions as L, GenerateTemplateInlineSource as Lt, RolldownBuild as M, GenerateTemplate as Mt, RolldownOptions as N, GenerateTemplateContext as Nt, Plugin$1 as O, GenerateExtensionsOptions as Ot, RolldownOutput$1 as P, GenerateTemplateEntry as Pt, UserConfig$2 as Q, SharedChunkMode as Qt, RolldownWatcher$1 as R, GenerateTemplateScope as Rt, CompilerContext as S, AlipayNpmMode as St, ConfigEnv$1 as T, CopyGlobs as Tt, ComponentEntry as U, JsonMergeFunction as Ut, AppEntry as V, JsonConfig as Vt, Entry as W, JsonMergeStage as Wt, ProjectConfig as X, ResolvedAlias as Xt, WxmlDep as Y, NpmSubPackageConfig as Yt, SubPackageMetaValue as Z, SharedChunkDynamicImports as Zt, definePageJson as _, applyWeappViteHostMeta as _n, WeappVueTemplateConfig as _t, UserConfigFnNoEnvPlain as a, SubPackageStyleScope as an, HandleWxmlOptions as at, ChangeEvent as b, resolveWeappViteHostMeta as bn, Alias as bt, UserConfigFnPromise as c, WeappLibDtsOptions as cn, WeappAutoRoutesConfig as ct, Component$1 as d, WeappLibInternalDtsOptions as dn, WeappHmrConfig as dt, SharedChunkStrategy as en, WeappViteConfig as et, Page$1 as f, WeappLibVueTscOptions as fn, WeappInjectWeapiConfig as ft, defineComponentJson as g, WeappViteRuntime as gn, WeappVueConfig as gt, defineAppJson as h, WeappViteHostMeta as hn, WeappSubPackageConfig as ht, UserConfigFnNoEnv as i, SubPackageStyleEntry as in, EnhanceWxmlOptions as it, ResolvedConfig as j, GenerateOptions as jt, PluginOption as k, GenerateFileType as kt, defineConfig as l, WeappLibEntryContext as ln, WeappAutoRoutesInclude as lt, Theme$1 as m, WEAPP_VITE_HOST_NAME as mn, WeappNpmConfig as mt, UserConfigExport as n, SubPackageStyleConfigEntry as nn, AutoImportComponentsOption as nt, UserConfigFnObject as o, WeappLibComponentJson as on, MultiPlatformConfig as ot, Sitemap$1 as p, WeappWebConfig as pn, WeappMcpConfig as pt, ComponentsMap as q, NpmBuildOptions as qt, UserConfigFn as r, SubPackageStyleConfigObject as rn, EnhanceOptions as rt, UserConfigFnObjectPlain as s, WeappLibConfig as sn, ScanWxmlOptions as st, UserConfig$1 as t, SubPackage as tn, AutoImportComponents as tt, App$1 as u, WeappLibFileName as un, WeappAutoRoutesIncludePattern as ut, defineSitemapJson as v, createWeappViteHostMeta as vn, WeappWevuConfig as vt, ComputedDefinitions$1 as w, ChunksConfig as wt, WeappVitePluginApi as x, AliasOptions as xt, defineThemeJson as y, isWeappViteHost as yn, WeappWorkerConfig as yt, ViteDevServer$1 as z, GenerateTemplatesConfig as zt };
1441
+ export { WeappDebugConfig as $, ResolvedAlias as $t, Ref as A, GenerateExtensionsOptions as At, BindingErrorLike as B, GenerateTemplateScope as Bt, LoadConfigOptions as C, WeappViteHostMeta as Cn, AliasOptions as Ct, MethodDefinitions$1 as D, isWeappViteHost as Dn, CopyGlobs as Dt, InlineConfig$1 as E, createWeappViteHostMeta as En, ChunksConfig as Et, RolldownPlugin as F, GenerateTemplateContext as Ft, EntryJsonFragment as G, JsonMergeFunction as Gt, BaseEntry as H, JsFormat as Ht, RolldownPluginOption as I, GenerateTemplateEntry as It, ScanComponentItem as J, MpPlatform as Jt, PageEntry as K, JsonMergeStage as Kt, RolldownWatchOptions as L, GenerateTemplateFactory as Lt, RolldownBuild as M, GenerateFilenamesOptions as Mt, RolldownOptions as N, GenerateOptions as Nt, Plugin$1 as O, resolveWeappViteHostMeta as On, CopyOptions as Ot, RolldownOutput$1 as P, GenerateTemplate as Pt, UserConfig$2 as Q, NpmSubPackageConfig as Qt, RolldownWatcher$1 as R, GenerateTemplateFileSource as Rt, CompilerContext as S, WEAPP_VITE_HOST_NAME as Sn, Alias as St, ConfigEnv$1 as T, applyWeappViteHostMeta as Tn, BuildNpmPackageMeta as Tt, ComponentEntry as U, JsonConfig as Ut, AppEntry as V, GenerateTemplatesConfig as Vt, Entry as W, JsonMergeContext as Wt, ProjectConfig as X, NpmMainPackageConfig as Xt, WxmlDep as Y, NpmBuildOptions as Yt, SubPackageMetaValue as Z, NpmPluginPackageConfig as Zt, definePageJson as _, WeappManagedNodeTsconfigConfig as _n, WeappSubPackageConfig as _t, UserConfigFnNoEnvPlain as a, SubPackageStyleConfigEntry as an, HandleWxmlOptions as at, ChangeEvent as b, WeappManagedTypeScriptConfig as bn, WeappWevuConfig as bt, UserConfigFnPromise as c, SubPackageStyleScope as cn, WeappAutoRoutesConfig as ct, Component$1 as d, WeappLibDtsOptions as dn, WeappHmrConfig as dt, SharedChunkDynamicImports as en, WeappViteConfig as et, Page$1 as f, WeappLibEntryContext as fn, WeappInjectWeapiConfig as ft, defineComponentJson as g, WeappManagedAppTsconfigConfig as gn, WeappRouteRules as gt, defineAppJson as h, WeappLibVueTscOptions as hn, WeappRouteRule as ht, UserConfigFnNoEnv as i, SubPackage as in, EnhanceWxmlOptions as it, ResolvedConfig as j, GenerateFileType as jt, PluginOption as k, GenerateDirsOptions as kt, defineConfig as l, WeappLibComponentJson as ln, WeappAutoRoutesInclude as lt, Theme$1 as m, WeappLibInternalDtsOptions as mn, WeappNpmConfig as mt, UserConfigExport as n, SharedChunkOverride as nn, AutoImportComponentsOption as nt, UserConfigFnObject as o, SubPackageStyleConfigObject as on, MultiPlatformConfig as ot, Sitemap$1 as p, WeappLibFileName as pn, WeappMcpConfig as pt, ComponentsMap as q, JsonMergeStrategy as qt, UserConfigFn as r, SharedChunkStrategy as rn, EnhanceOptions as rt, UserConfigFnObjectPlain as s, SubPackageStyleEntry as sn, ScanWxmlOptions as st, UserConfig$1 as t, SharedChunkMode as tn, AutoImportComponents as tt, App$1 as u, WeappLibConfig as un, WeappAutoRoutesIncludePattern as ut, defineSitemapJson as v, WeappManagedServerTsconfigConfig as vn, WeappVueConfig as vt, ComputedDefinitions$1 as w, WeappViteRuntime as wn, AlipayNpmMode as wt, WeappVitePluginApi as x, WeappWebConfig as xn, WeappWorkerConfig as xt, defineThemeJson as y, WeappManagedSharedTsconfigConfig as yn, WeappVueTemplateConfig as yt, ViteDevServer$1 as z, GenerateTemplateInlineSource as zt };
package/dist/config.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as definePageJson, _n as applyWeappViteHostMeta, a as UserConfigFnNoEnvPlain, bn as resolveWeappViteHostMeta, c as UserConfigFnPromise, d as Component, et as WeappViteConfig, f as Page, g as defineComponentJson, gn as WeappViteRuntime, h as defineAppJson, hn as WeappViteHostMeta, i as UserConfigFnNoEnv, l as defineConfig, m as Theme, mn as WEAPP_VITE_HOST_NAME, n as UserConfigExport, o as UserConfigFnObject, p as Sitemap, r as UserConfigFn, s as UserConfigFnObjectPlain, t as UserConfig, u as App, v as defineSitemapJson, vn as createWeappViteHostMeta, y as defineThemeJson, yn as isWeappViteHost } from "./config-BGf7mIXW.mjs";
1
+ import { Cn as WeappViteHostMeta, Dn as isWeappViteHost, En as createWeappViteHostMeta, On as resolveWeappViteHostMeta, Sn as WEAPP_VITE_HOST_NAME, Tn as applyWeappViteHostMeta, _ as definePageJson, a as UserConfigFnNoEnvPlain, c as UserConfigFnPromise, d as Component, et as WeappViteConfig, 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, wn as WeappViteRuntime, y as defineThemeJson } from "./config-mYISi4CS.mjs";
2
2
  export { App, Component, Page, Sitemap, Theme, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnNoEnv, UserConfigFnNoEnvPlain, UserConfigFnObject, UserConfigFnObjectPlain, UserConfigFnPromise, WEAPP_VITE_HOST_NAME, WeappViteConfig, WeappViteHostMeta, WeappViteRuntime, applyWeappViteHostMeta, createWeappViteHostMeta, defineAppJson, defineComponentJson, defineConfig, definePageJson, defineSitemapJson, defineThemeJson, isWeappViteHost, resolveWeappViteHostMeta };