weapp-vite 5.11.4 → 6.0.0-alpha.0

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.
Files changed (51) hide show
  1. package/README.md +60 -2
  2. package/dist/auto-import-components/resolvers.cjs +6 -6
  3. package/dist/auto-import-components/resolvers.mjs +1 -1
  4. package/dist/auto-routes.cjs +9 -8
  5. package/dist/auto-routes.mjs +5 -4
  6. package/dist/{chunk-K5QGB3YX.mjs → chunk-4P5KX3LT.mjs} +2785 -2376
  7. package/dist/{chunk-MDUMD5GP.mjs → chunk-5CBZRYDL.mjs} +1 -8
  8. package/dist/{chunk-INJNZ3X2.cjs → chunk-E34K6TPD.cjs} +2 -2
  9. package/dist/{chunk-Q4SMSDJY.cjs → chunk-EL4WI75Z.cjs} +2785 -2376
  10. package/dist/{chunk-NIUQMR6K.cjs → chunk-FB7KR7SH.cjs} +6 -6
  11. package/dist/chunk-IEICAJDZ.cjs +188 -0
  12. package/dist/chunk-MK4LDVBT.mjs +188 -0
  13. package/dist/{chunk-7KGGMLZZ.mjs → chunk-ML5KPLC5.mjs} +1 -1
  14. package/dist/{chunk-IVFT4TLR.mjs → chunk-O6633IWP.mjs} +1 -1
  15. package/dist/{chunk-MTUYQJIF.cjs → chunk-SJSLFDTA.cjs} +2 -2
  16. package/dist/{chunk-N5FVU7GR.cjs → chunk-TZGJRA2Y.cjs} +2 -9
  17. package/dist/chunk-UKTIE44Q.cjs +34 -0
  18. package/dist/{chunk-KZVQVHXZ.mjs → chunk-VKLSO3EM.mjs} +2 -2
  19. package/dist/chunk-WYYIFHJZ.cjs +6 -0
  20. package/dist/chunk-YIVKT2UN.mjs +34 -0
  21. package/dist/{chunk-46VA2TEF.mjs → chunk-YXFADQPY.mjs} +1 -1
  22. package/dist/cli.cjs +117 -92
  23. package/dist/cli.mjs +33 -8
  24. package/dist/{config-9JglUSN2.d.ts → config-B6T_L15M.d.ts} +48 -19
  25. package/dist/{config-D1eBLaq2.d.cts → config-D5ATg2Pv.d.cts} +48 -19
  26. package/dist/config.cjs +4 -4
  27. package/dist/config.d.cts +1 -2
  28. package/dist/config.d.ts +1 -2
  29. package/dist/config.mjs +3 -3
  30. package/dist/file-KXULPGWG.mjs +29 -0
  31. package/dist/file-S6QIP4VW.cjs +29 -0
  32. package/dist/index.cjs +18 -9
  33. package/dist/index.d.cts +4 -3
  34. package/dist/index.d.ts +4 -3
  35. package/dist/index.mjs +15 -6
  36. package/dist/json.cjs +3 -3
  37. package/dist/json.d.cts +1 -2
  38. package/dist/json.d.ts +1 -2
  39. package/dist/json.mjs +2 -2
  40. package/dist/runtime.cjs +11 -0
  41. package/dist/runtime.d.cts +29 -0
  42. package/dist/runtime.d.ts +29 -0
  43. package/dist/runtime.mjs +11 -0
  44. package/dist/types.cjs +9 -9
  45. package/dist/types.d.cts +2 -2
  46. package/dist/types.d.ts +2 -2
  47. package/dist/types.mjs +2 -2
  48. package/dist/volar.cjs +2 -2
  49. package/dist/volar.mjs +1 -1
  50. package/package.json +21 -15
  51. package/dist/chunk-2KCQ5UBK.cjs +0 -6
package/dist/cli.mjs CHANGED
@@ -1,20 +1,22 @@
1
1
  import {
2
2
  createCompilerContext
3
- } from "./chunk-KZVQVHXZ.mjs";
3
+ } from "./chunk-VKLSO3EM.mjs";
4
4
  import {
5
5
  DEFAULT_MP_PLATFORM,
6
6
  SHARED_CHUNK_VIRTUAL_PREFIX,
7
- VERSION,
8
7
  checkRuntime,
9
8
  createSharedBuildConfig,
10
9
  logger_default,
11
10
  normalizeMiniPlatform,
12
11
  resolveMiniPlatform,
13
12
  resolveWeappConfigFile
14
- } from "./chunk-K5QGB3YX.mjs";
13
+ } from "./chunk-4P5KX3LT.mjs";
14
+ import {
15
+ VERSION
16
+ } from "./chunk-MK4LDVBT.mjs";
15
17
  import {
16
18
  init_esm_shims
17
- } from "./chunk-MDUMD5GP.mjs";
19
+ } from "./chunk-5CBZRYDL.mjs";
18
20
 
19
21
  // src/cli.ts
20
22
  init_esm_shims();
@@ -1386,6 +1388,7 @@ function registerAnalyzeCommand(cli2) {
1386
1388
 
1387
1389
  // src/cli/commands/build.ts
1388
1390
  init_esm_shims();
1391
+ import process4 from "process";
1389
1392
 
1390
1393
  // src/cli/logBuildAppFinish.ts
1391
1394
  init_esm_shims();
@@ -1639,8 +1642,30 @@ function registerBuildCommand(cli2) {
1639
1642
  if (analyzeHandle) {
1640
1643
  await analyzeHandle.waitForExit();
1641
1644
  }
1645
+ ctx.watcherService?.closeAll();
1646
+ terminateStaleSassEmbeddedProcess();
1642
1647
  });
1643
1648
  }
1649
+ function terminateStaleSassEmbeddedProcess() {
1650
+ const getHandles = process4._getActiveHandles;
1651
+ const handles = typeof getHandles === "function" ? getHandles() : void 0;
1652
+ if (!Array.isArray(handles)) {
1653
+ return;
1654
+ }
1655
+ for (const handle of handles) {
1656
+ if (isSassEmbeddedChild(handle)) {
1657
+ try {
1658
+ handle.kill();
1659
+ } catch {
1660
+ }
1661
+ }
1662
+ }
1663
+ }
1664
+ function isSassEmbeddedChild(handle) {
1665
+ return Boolean(
1666
+ handle && typeof handle === "object" && "kill" in handle && "spawnfile" in handle && typeof handle.spawnfile === "string" && handle.spawnfile?.includes("sass-embedded")
1667
+ );
1668
+ }
1644
1669
 
1645
1670
  // src/cli/commands/create.ts
1646
1671
  init_esm_shims();
@@ -1657,7 +1682,7 @@ import path5 from "pathe";
1657
1682
 
1658
1683
  // src/schematics.ts
1659
1684
  init_esm_shims();
1660
- import process4 from "process";
1685
+ import process5 from "process";
1661
1686
  import { generateJs, generateJson, generateWxml, generateWxss } from "@weapp-core/schematics";
1662
1687
  import { defu } from "@weapp-core/shared";
1663
1688
  import fs4 from "fs-extra";
@@ -1710,7 +1735,7 @@ async function generate(options) {
1710
1735
  extensions: {
1711
1736
  ...defaultExtensions
1712
1737
  },
1713
- cwd: process4.cwd(),
1738
+ cwd: process5.cwd(),
1714
1739
  templates: void 0
1715
1740
  });
1716
1741
  if (fileName === void 0) {
@@ -1764,12 +1789,12 @@ async function generate(options) {
1764
1789
 
1765
1790
  // src/cli/loadConfig.ts
1766
1791
  init_esm_shims();
1767
- import process5 from "process";
1792
+ import process6 from "process";
1768
1793
  import { defu as defu2 } from "@weapp-core/shared";
1769
1794
  import path4 from "pathe";
1770
1795
  import { loadConfigFromFile } from "vite";
1771
1796
  async function loadConfig(configFile) {
1772
- const cwd = process5.cwd();
1797
+ const cwd = process6.cwd();
1773
1798
  let resolvedConfigFile = configFile;
1774
1799
  if (resolvedConfigFile && !path4.isAbsolute(resolvedConfigFile)) {
1775
1800
  resolvedConfigFile = path4.resolve(cwd, resolvedConfigFile);
@@ -1,8 +1,7 @@
1
- import { InlineConfig as InlineConfig$1, UserConfig as UserConfig$1, ViteDevServer, build, UserConfigFnObject, UserConfigExport } from 'vite';
1
+ import { InlineConfig, UserConfig as UserConfig$1, ViteDevServer, build, UserConfigFnObject, UserConfigExport } from 'vite';
2
2
  import { GenerateType, Component, Theme, Sitemap, App, Page, Plugin } from '@weapp-core/schematics';
3
3
  import { WeappWebPluginOptions } from '@weapp-vite/web';
4
4
  import { InputOption, RolldownOutput, RolldownWatcher } from 'rolldown';
5
- import { InlineConfig } from 'tsdown';
6
5
  import { WrapPluginOptions } from 'vite-plugin-performance';
7
6
  import { PluginOptions } from 'vite-tsconfig-paths';
8
7
  import { R as Resolver, a as ResolvedValue } from './types-3q1Qq6Fe.js';
@@ -13,6 +12,7 @@ import { Buffer } from 'node:buffer';
13
12
  import { LRUCache } from 'lru-cache';
14
13
  import { A as AutoRoutes } from './routes-C9hKJjXs.js';
15
14
 
15
+ type NpmBuildOptions = InlineConfig;
16
16
  interface Alias {
17
17
  find: string | RegExp;
18
18
  replacement: string;
@@ -55,7 +55,7 @@ interface SubPackage {
55
55
  entry?: string;
56
56
  name?: string;
57
57
  dependencies?: (string | RegExp)[];
58
- inlineConfig?: Partial<InlineConfig$1>;
58
+ inlineConfig?: Partial<InlineConfig>;
59
59
  }
60
60
  type SubPackageStyleScope = 'all' | 'pages' | 'components';
61
61
  interface SubPackageStyleConfigObject {
@@ -195,7 +195,7 @@ interface WeappWebConfig {
195
195
  /**
196
196
  * @description 额外合并到 Web 构建中的 Vite 内联配置
197
197
  */
198
- vite?: InlineConfig$1;
198
+ vite?: InlineConfig;
199
199
  }
200
200
  interface AutoImportComponents {
201
201
  /**
@@ -321,9 +321,9 @@ interface WeappViteConfig {
321
321
  */
322
322
  cache?: boolean;
323
323
  /**
324
- * @description 构建 npm 的配置,可以配置这个选项给 tsdown,让不同的包走不同的配置
324
+ * @description 构建 npm 的配置,可传入 Vite 的库模式配置,让不同的包走不同的配置
325
325
  */
326
- buildOptions?: (options: InlineConfig, pkgMeta: BuildNpmPackageMeta) => InlineConfig | undefined;
326
+ buildOptions?: (options: NpmBuildOptions, pkgMeta: BuildNpmPackageMeta) => NpmBuildOptions | undefined;
327
327
  };
328
328
  /**
329
329
  * @group 生成脚手架配置
@@ -416,6 +416,35 @@ interface WeappViteConfig {
416
416
  */
417
417
  entry?: string | string[];
418
418
  };
419
+ /**
420
+ * @description Vue 单文件组件支持配置
421
+ */
422
+ vue?: {
423
+ /**
424
+ * @description 是否启用 Vue 支持
425
+ * @default true
426
+ */
427
+ enable?: boolean;
428
+ /**
429
+ * @description 模板编译选项
430
+ */
431
+ template?: {
432
+ /**
433
+ * @description 是否移除注释
434
+ * @default true
435
+ */
436
+ removeComments?: boolean;
437
+ /**
438
+ * @description 是否简化空白符
439
+ * @default true
440
+ */
441
+ simplifyWhitespace?: boolean;
442
+ };
443
+ /**
444
+ * @description 是否自动导入 Vue 组件
445
+ */
446
+ autoImport?: boolean;
447
+ };
419
448
  /**
420
449
  * @description 共享代码拆分策略配置
421
450
  */
@@ -519,11 +548,11 @@ interface LoadConfigOptions {
519
548
  cwd: string;
520
549
  isDev: boolean;
521
550
  mode: string;
522
- inlineConfig?: InlineConfig$1;
551
+ inlineConfig?: InlineConfig;
523
552
  configFile?: string;
524
553
  }
525
554
  interface LoadConfigResult {
526
- config: InlineConfig$1;
555
+ config: InlineConfig;
527
556
  aliasEntries: ResolvedAlias[];
528
557
  outputExtensions: OutputExtensions;
529
558
  packageJson: PackageJson;
@@ -555,17 +584,17 @@ interface ConfigService {
555
584
  packageInfo: PackageInfo;
556
585
  setDefineEnv: (key: string, value: any) => void;
557
586
  load: (options?: Partial<LoadConfigOptions>) => Promise<LoadConfigResult>;
558
- mergeWorkers: (...configs: Partial<InlineConfig$1>[]) => InlineConfig$1;
559
- merge: (subPackageMeta?: SubPackageMetaValue, ...configs: Partial<InlineConfig$1 | undefined>[]) => InlineConfig$1;
560
- mergeWeb: (...configs: Partial<InlineConfig$1 | undefined>[]) => InlineConfig$1 | undefined;
561
- mergeInlineConfig: (...configs: Partial<InlineConfig$1>[]) => InlineConfig$1;
587
+ mergeWorkers: (...configs: Partial<InlineConfig>[]) => InlineConfig;
588
+ merge: (subPackageMeta?: SubPackageMetaValue, ...configs: Partial<InlineConfig | undefined>[]) => InlineConfig;
589
+ mergeWeb: (...configs: Partial<InlineConfig | undefined>[]) => InlineConfig | undefined;
590
+ mergeInlineConfig: (...configs: Partial<InlineConfig>[]) => InlineConfig;
562
591
  readonly defineImportMetaEnv: Record<string, any>;
563
592
  readonly cwd: string;
564
593
  readonly isDev: boolean;
565
594
  readonly mpDistRoot: string;
566
595
  readonly outDir: string;
567
- readonly inlineConfig: InlineConfig$1;
568
- readonly weappViteConfig: NonNullable<InlineConfig$1['weapp']>;
596
+ readonly inlineConfig: InlineConfig;
597
+ readonly weappViteConfig: NonNullable<InlineConfig['weapp']>;
569
598
  readonly packageJson: PackageJson;
570
599
  readonly projectConfig: Record<string, any>;
571
600
  readonly srcRoot: string;
@@ -592,7 +621,7 @@ interface ResolvedWeappWebConfig {
592
621
  pluginOptions: Omit<WeappWebPluginOptions, 'srcDir'> & {
593
622
  srcDir: string;
594
623
  };
595
- userConfig?: InlineConfig$1;
624
+ userConfig?: InlineConfig;
596
625
  source?: WeappWebConfig;
597
626
  }
598
627
 
@@ -633,7 +662,7 @@ interface NpmService {
633
662
  bundleBuild: (args: {
634
663
  entry: InputOption;
635
664
  name: string;
636
- options?: InlineConfig;
665
+ options?: NpmBuildOptions;
637
666
  outDir: string;
638
667
  }) => Promise<void>;
639
668
  copyBuild: (args: {
@@ -644,14 +673,14 @@ interface NpmService {
644
673
  buildPackage: (args: {
645
674
  dep: string;
646
675
  outDir: string;
647
- options?: InlineConfig;
676
+ options?: NpmBuildOptions;
648
677
  isDependenciesCacheOutdate: boolean;
649
678
  }) => Promise<void>;
650
679
  getPackNpmRelationList: () => {
651
680
  packageJsonPath: string;
652
681
  miniprogramNpmDistDir: string;
653
682
  }[];
654
- build: (options?: InlineConfig) => Promise<void>;
683
+ build: (options?: NpmBuildOptions) => Promise<void>;
655
684
  }
656
685
 
657
686
  interface Token {
@@ -873,4 +902,4 @@ declare function defineConfig(config: Promise<UserConfig$1>): Promise<UserConfig
873
902
  declare function defineConfig(config: UserConfigFnObject): UserConfigFnObject;
874
903
  declare function defineConfig(config: UserConfigExport): UserConfigExport;
875
904
 
876
- export { type PageEntry as $, type Alias as A, type AutoImportComponents as B, type CompilerContext as C, type AutoImportComponentsOption as D, type EnhanceWxmlOptions as E, type ScanWxmlOptions as F, type GenerateExtensionsOptions as G, type HandleWxmlOptions as H, type EnhanceOptions as I, type BuildNpmPackageMeta as J, type JsFormat as K, type LoadConfigOptions as L, type MpPlatform as M, type SharedChunkStrategy as N, type ChunksConfig as O, type ProjectConfig as P, type SubPackageMetaValue as Q, type ResolvedAlias as R, type SubPackage as S, type WxmlDep as T, type UserConfig as U, type ScanComponentItem as V, type WeappViteConfig as W, type ComponentsMap as X, type BaseEntry as Y, type Entry as Z, type AppEntry as _, defineAppJson as a, type ComponentEntry as a0, type EntryJsonFragment as a1, type WeappVitePluginApi as a2, type ChangeEvent as a3, definePageJson as b, defineComponentJson as c, defineConfig as d, defineSitemapJson as e, defineThemeJson as f, type AliasOptions as g, type SubPackageStyleScope as h, type SubPackageStyleConfigObject as i, type SubPackageStyleConfigEntry as j, type SubPackageStyleEntry as k, type GenerateDirsOptions as l, type GenerateFilenamesOptions as m, type GenerateFileType as n, type GenerateTemplateContext as o, type GenerateTemplateFileSource as p, type GenerateTemplateInlineSource as q, type GenerateTemplateFactory as r, type GenerateTemplate as s, type GenerateTemplateEntry as t, type GenerateTemplateScope as u, type GenerateTemplatesConfig as v, type GenerateOptions as w, type CopyOptions as x, type CopyGlobs as y, type WeappWebConfig as z };
905
+ export { type AppEntry as $, type Alias as A, type AutoImportComponents as B, type CompilerContext as C, type AutoImportComponentsOption as D, type EnhanceWxmlOptions as E, type ScanWxmlOptions as F, type GenerateExtensionsOptions as G, type HandleWxmlOptions as H, type EnhanceOptions as I, type BuildNpmPackageMeta as J, type JsFormat as K, type LoadConfigOptions as L, type MpPlatform as M, type NpmBuildOptions as N, type SharedChunkStrategy as O, type ChunksConfig as P, type ProjectConfig as Q, type ResolvedAlias as R, type SubPackage as S, type SubPackageMetaValue as T, type UserConfig as U, type WxmlDep as V, type WeappViteConfig as W, type ScanComponentItem as X, type ComponentsMap as Y, type BaseEntry as Z, type Entry as _, defineAppJson as a, type PageEntry as a0, type ComponentEntry as a1, type EntryJsonFragment as a2, type WeappVitePluginApi as a3, type ChangeEvent as a4, definePageJson as b, defineComponentJson as c, defineConfig as d, defineSitemapJson as e, defineThemeJson as f, type AliasOptions as g, type SubPackageStyleScope as h, type SubPackageStyleConfigObject as i, type SubPackageStyleConfigEntry as j, type SubPackageStyleEntry as k, type GenerateDirsOptions as l, type GenerateFilenamesOptions as m, type GenerateFileType as n, type GenerateTemplateContext as o, type GenerateTemplateFileSource as p, type GenerateTemplateInlineSource as q, type GenerateTemplateFactory as r, type GenerateTemplate as s, type GenerateTemplateEntry as t, type GenerateTemplateScope as u, type GenerateTemplatesConfig as v, type GenerateOptions as w, type CopyOptions as x, type CopyGlobs as y, type WeappWebConfig as z };
@@ -1,8 +1,7 @@
1
- import { InlineConfig as InlineConfig$1, UserConfig as UserConfig$1, ViteDevServer, build, UserConfigFnObject, UserConfigExport } from 'vite';
1
+ import { InlineConfig, UserConfig as UserConfig$1, ViteDevServer, build, UserConfigFnObject, UserConfigExport } from 'vite';
2
2
  import { GenerateType, Component, Theme, Sitemap, App, Page, Plugin } from '@weapp-core/schematics';
3
3
  import { WeappWebPluginOptions } from '@weapp-vite/web';
4
4
  import { InputOption, RolldownOutput, RolldownWatcher } from 'rolldown';
5
- import { InlineConfig } from 'tsdown';
6
5
  import { WrapPluginOptions } from 'vite-plugin-performance';
7
6
  import { PluginOptions } from 'vite-tsconfig-paths';
8
7
  import { R as Resolver, a as ResolvedValue } from './types-3q1Qq6Fe.cjs';
@@ -13,6 +12,7 @@ import { Buffer } from 'node:buffer';
13
12
  import { LRUCache } from 'lru-cache';
14
13
  import { A as AutoRoutes } from './routes-C9hKJjXs.cjs';
15
14
 
15
+ type NpmBuildOptions = InlineConfig;
16
16
  interface Alias {
17
17
  find: string | RegExp;
18
18
  replacement: string;
@@ -55,7 +55,7 @@ interface SubPackage {
55
55
  entry?: string;
56
56
  name?: string;
57
57
  dependencies?: (string | RegExp)[];
58
- inlineConfig?: Partial<InlineConfig$1>;
58
+ inlineConfig?: Partial<InlineConfig>;
59
59
  }
60
60
  type SubPackageStyleScope = 'all' | 'pages' | 'components';
61
61
  interface SubPackageStyleConfigObject {
@@ -195,7 +195,7 @@ interface WeappWebConfig {
195
195
  /**
196
196
  * @description 额外合并到 Web 构建中的 Vite 内联配置
197
197
  */
198
- vite?: InlineConfig$1;
198
+ vite?: InlineConfig;
199
199
  }
200
200
  interface AutoImportComponents {
201
201
  /**
@@ -321,9 +321,9 @@ interface WeappViteConfig {
321
321
  */
322
322
  cache?: boolean;
323
323
  /**
324
- * @description 构建 npm 的配置,可以配置这个选项给 tsdown,让不同的包走不同的配置
324
+ * @description 构建 npm 的配置,可传入 Vite 的库模式配置,让不同的包走不同的配置
325
325
  */
326
- buildOptions?: (options: InlineConfig, pkgMeta: BuildNpmPackageMeta) => InlineConfig | undefined;
326
+ buildOptions?: (options: NpmBuildOptions, pkgMeta: BuildNpmPackageMeta) => NpmBuildOptions | undefined;
327
327
  };
328
328
  /**
329
329
  * @group 生成脚手架配置
@@ -416,6 +416,35 @@ interface WeappViteConfig {
416
416
  */
417
417
  entry?: string | string[];
418
418
  };
419
+ /**
420
+ * @description Vue 单文件组件支持配置
421
+ */
422
+ vue?: {
423
+ /**
424
+ * @description 是否启用 Vue 支持
425
+ * @default true
426
+ */
427
+ enable?: boolean;
428
+ /**
429
+ * @description 模板编译选项
430
+ */
431
+ template?: {
432
+ /**
433
+ * @description 是否移除注释
434
+ * @default true
435
+ */
436
+ removeComments?: boolean;
437
+ /**
438
+ * @description 是否简化空白符
439
+ * @default true
440
+ */
441
+ simplifyWhitespace?: boolean;
442
+ };
443
+ /**
444
+ * @description 是否自动导入 Vue 组件
445
+ */
446
+ autoImport?: boolean;
447
+ };
419
448
  /**
420
449
  * @description 共享代码拆分策略配置
421
450
  */
@@ -519,11 +548,11 @@ interface LoadConfigOptions {
519
548
  cwd: string;
520
549
  isDev: boolean;
521
550
  mode: string;
522
- inlineConfig?: InlineConfig$1;
551
+ inlineConfig?: InlineConfig;
523
552
  configFile?: string;
524
553
  }
525
554
  interface LoadConfigResult {
526
- config: InlineConfig$1;
555
+ config: InlineConfig;
527
556
  aliasEntries: ResolvedAlias[];
528
557
  outputExtensions: OutputExtensions;
529
558
  packageJson: PackageJson;
@@ -555,17 +584,17 @@ interface ConfigService {
555
584
  packageInfo: PackageInfo;
556
585
  setDefineEnv: (key: string, value: any) => void;
557
586
  load: (options?: Partial<LoadConfigOptions>) => Promise<LoadConfigResult>;
558
- mergeWorkers: (...configs: Partial<InlineConfig$1>[]) => InlineConfig$1;
559
- merge: (subPackageMeta?: SubPackageMetaValue, ...configs: Partial<InlineConfig$1 | undefined>[]) => InlineConfig$1;
560
- mergeWeb: (...configs: Partial<InlineConfig$1 | undefined>[]) => InlineConfig$1 | undefined;
561
- mergeInlineConfig: (...configs: Partial<InlineConfig$1>[]) => InlineConfig$1;
587
+ mergeWorkers: (...configs: Partial<InlineConfig>[]) => InlineConfig;
588
+ merge: (subPackageMeta?: SubPackageMetaValue, ...configs: Partial<InlineConfig | undefined>[]) => InlineConfig;
589
+ mergeWeb: (...configs: Partial<InlineConfig | undefined>[]) => InlineConfig | undefined;
590
+ mergeInlineConfig: (...configs: Partial<InlineConfig>[]) => InlineConfig;
562
591
  readonly defineImportMetaEnv: Record<string, any>;
563
592
  readonly cwd: string;
564
593
  readonly isDev: boolean;
565
594
  readonly mpDistRoot: string;
566
595
  readonly outDir: string;
567
- readonly inlineConfig: InlineConfig$1;
568
- readonly weappViteConfig: NonNullable<InlineConfig$1['weapp']>;
596
+ readonly inlineConfig: InlineConfig;
597
+ readonly weappViteConfig: NonNullable<InlineConfig['weapp']>;
569
598
  readonly packageJson: PackageJson;
570
599
  readonly projectConfig: Record<string, any>;
571
600
  readonly srcRoot: string;
@@ -592,7 +621,7 @@ interface ResolvedWeappWebConfig {
592
621
  pluginOptions: Omit<WeappWebPluginOptions, 'srcDir'> & {
593
622
  srcDir: string;
594
623
  };
595
- userConfig?: InlineConfig$1;
624
+ userConfig?: InlineConfig;
596
625
  source?: WeappWebConfig;
597
626
  }
598
627
 
@@ -633,7 +662,7 @@ interface NpmService {
633
662
  bundleBuild: (args: {
634
663
  entry: InputOption;
635
664
  name: string;
636
- options?: InlineConfig;
665
+ options?: NpmBuildOptions;
637
666
  outDir: string;
638
667
  }) => Promise<void>;
639
668
  copyBuild: (args: {
@@ -644,14 +673,14 @@ interface NpmService {
644
673
  buildPackage: (args: {
645
674
  dep: string;
646
675
  outDir: string;
647
- options?: InlineConfig;
676
+ options?: NpmBuildOptions;
648
677
  isDependenciesCacheOutdate: boolean;
649
678
  }) => Promise<void>;
650
679
  getPackNpmRelationList: () => {
651
680
  packageJsonPath: string;
652
681
  miniprogramNpmDistDir: string;
653
682
  }[];
654
- build: (options?: InlineConfig) => Promise<void>;
683
+ build: (options?: NpmBuildOptions) => Promise<void>;
655
684
  }
656
685
 
657
686
  interface Token {
@@ -873,4 +902,4 @@ declare function defineConfig(config: Promise<UserConfig$1>): Promise<UserConfig
873
902
  declare function defineConfig(config: UserConfigFnObject): UserConfigFnObject;
874
903
  declare function defineConfig(config: UserConfigExport): UserConfigExport;
875
904
 
876
- export { type PageEntry as $, type Alias as A, type AutoImportComponents as B, type CompilerContext as C, type AutoImportComponentsOption as D, type EnhanceWxmlOptions as E, type ScanWxmlOptions as F, type GenerateExtensionsOptions as G, type HandleWxmlOptions as H, type EnhanceOptions as I, type BuildNpmPackageMeta as J, type JsFormat as K, type LoadConfigOptions as L, type MpPlatform as M, type SharedChunkStrategy as N, type ChunksConfig as O, type ProjectConfig as P, type SubPackageMetaValue as Q, type ResolvedAlias as R, type SubPackage as S, type WxmlDep as T, type UserConfig as U, type ScanComponentItem as V, type WeappViteConfig as W, type ComponentsMap as X, type BaseEntry as Y, type Entry as Z, type AppEntry as _, defineAppJson as a, type ComponentEntry as a0, type EntryJsonFragment as a1, type WeappVitePluginApi as a2, type ChangeEvent as a3, definePageJson as b, defineComponentJson as c, defineConfig as d, defineSitemapJson as e, defineThemeJson as f, type AliasOptions as g, type SubPackageStyleScope as h, type SubPackageStyleConfigObject as i, type SubPackageStyleConfigEntry as j, type SubPackageStyleEntry as k, type GenerateDirsOptions as l, type GenerateFilenamesOptions as m, type GenerateFileType as n, type GenerateTemplateContext as o, type GenerateTemplateFileSource as p, type GenerateTemplateInlineSource as q, type GenerateTemplateFactory as r, type GenerateTemplate as s, type GenerateTemplateEntry as t, type GenerateTemplateScope as u, type GenerateTemplatesConfig as v, type GenerateOptions as w, type CopyOptions as x, type CopyGlobs as y, type WeappWebConfig as z };
905
+ export { type AppEntry as $, type Alias as A, type AutoImportComponents as B, type CompilerContext as C, type AutoImportComponentsOption as D, type EnhanceWxmlOptions as E, type ScanWxmlOptions as F, type GenerateExtensionsOptions as G, type HandleWxmlOptions as H, type EnhanceOptions as I, type BuildNpmPackageMeta as J, type JsFormat as K, type LoadConfigOptions as L, type MpPlatform as M, type NpmBuildOptions as N, type SharedChunkStrategy as O, type ChunksConfig as P, type ProjectConfig as Q, type ResolvedAlias as R, type SubPackage as S, type SubPackageMetaValue as T, type UserConfig as U, type WxmlDep as V, type WeappViteConfig as W, type ScanComponentItem as X, type ComponentsMap as Y, type BaseEntry as Z, type Entry as _, defineAppJson as a, type PageEntry as a0, type ComponentEntry as a1, type EntryJsonFragment as a2, type WeappVitePluginApi as a3, type ChangeEvent as a4, definePageJson as b, defineComponentJson as c, defineConfig as d, defineSitemapJson as e, defineThemeJson as f, type AliasOptions as g, type SubPackageStyleScope as h, type SubPackageStyleConfigObject as i, type SubPackageStyleConfigEntry as j, type SubPackageStyleEntry as k, type GenerateDirsOptions as l, type GenerateFilenamesOptions as m, type GenerateFileType as n, type GenerateTemplateContext as o, type GenerateTemplateFileSource as p, type GenerateTemplateInlineSource as q, type GenerateTemplateFactory as r, type GenerateTemplate as s, type GenerateTemplateEntry as t, type GenerateTemplateScope as u, type GenerateTemplatesConfig as v, type GenerateOptions as w, type CopyOptions as x, type CopyGlobs as y, type WeappWebConfig as z };
package/dist/config.cjs CHANGED
@@ -1,14 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkINJNZ3X2cjs = require('./chunk-INJNZ3X2.cjs');
3
+ var _chunkE34K6TPDcjs = require('./chunk-E34K6TPD.cjs');
4
4
 
5
5
 
6
6
 
7
7
 
8
8
 
9
9
 
10
- var _chunkMTUYQJIFcjs = require('./chunk-MTUYQJIF.cjs');
11
- require('./chunk-N5FVU7GR.cjs');
10
+ var _chunkSJSLFDTAcjs = require('./chunk-SJSLFDTA.cjs');
11
+ require('./chunk-TZGJRA2Y.cjs');
12
12
 
13
13
 
14
14
 
@@ -16,4 +16,4 @@ require('./chunk-N5FVU7GR.cjs');
16
16
 
17
17
 
18
18
 
19
- exports.defineAppJson = _chunkMTUYQJIFcjs.defineAppJson; exports.defineComponentJson = _chunkMTUYQJIFcjs.defineComponentJson; exports.defineConfig = _chunkINJNZ3X2cjs.defineConfig; exports.definePageJson = _chunkMTUYQJIFcjs.definePageJson; exports.defineSitemapJson = _chunkMTUYQJIFcjs.defineSitemapJson; exports.defineThemeJson = _chunkMTUYQJIFcjs.defineThemeJson;
19
+ exports.defineAppJson = _chunkSJSLFDTAcjs.defineAppJson; exports.defineComponentJson = _chunkSJSLFDTAcjs.defineComponentJson; exports.defineConfig = _chunkE34K6TPDcjs.defineConfig; exports.definePageJson = _chunkSJSLFDTAcjs.definePageJson; exports.defineSitemapJson = _chunkSJSLFDTAcjs.defineSitemapJson; exports.defineThemeJson = _chunkSJSLFDTAcjs.defineThemeJson;
package/dist/config.d.cts CHANGED
@@ -1,9 +1,8 @@
1
1
  export { UserConfig, UserConfigExport, UserConfigFnObject } from 'vite';
2
- export { W as WeappViteConfig, a as defineAppJson, c as defineComponentJson, d as defineConfig, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-D1eBLaq2.cjs';
2
+ export { W as WeappViteConfig, a as defineAppJson, c as defineComponentJson, d as defineConfig, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-D5ATg2Pv.cjs';
3
3
  export { App, Component, Page, Sitemap, Theme } from '@weapp-core/schematics';
4
4
  import '@weapp-vite/web';
5
5
  import 'rolldown';
6
- import 'tsdown';
7
6
  import 'vite-plugin-performance';
8
7
  import 'vite-tsconfig-paths';
9
8
  import './types-3q1Qq6Fe.cjs';
package/dist/config.d.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  export { UserConfig, UserConfigExport, UserConfigFnObject } from 'vite';
2
- export { W as WeappViteConfig, a as defineAppJson, c as defineComponentJson, d as defineConfig, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-9JglUSN2.js';
2
+ export { W as WeappViteConfig, a as defineAppJson, c as defineComponentJson, d as defineConfig, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-B6T_L15M.js';
3
3
  export { App, Component, Page, Sitemap, Theme } from '@weapp-core/schematics';
4
4
  import '@weapp-vite/web';
5
5
  import 'rolldown';
6
- import 'tsdown';
7
6
  import 'vite-plugin-performance';
8
7
  import 'vite-tsconfig-paths';
9
8
  import './types-3q1Qq6Fe.js';
package/dist/config.mjs CHANGED
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  defineConfig
3
- } from "./chunk-46VA2TEF.mjs";
3
+ } from "./chunk-YXFADQPY.mjs";
4
4
  import {
5
5
  defineAppJson,
6
6
  defineComponentJson,
7
7
  definePageJson,
8
8
  defineSitemapJson,
9
9
  defineThemeJson
10
- } from "./chunk-IVFT4TLR.mjs";
11
- import "./chunk-MDUMD5GP.mjs";
10
+ } from "./chunk-O6633IWP.mjs";
11
+ import "./chunk-5CBZRYDL.mjs";
12
12
  export {
13
13
  defineAppJson,
14
14
  defineComponentJson,
@@ -0,0 +1,29 @@
1
+ import {
2
+ changeFileExtension,
3
+ extractConfigFromVue,
4
+ findCssEntry,
5
+ findJsEntry,
6
+ findJsonEntry,
7
+ findTemplateEntry,
8
+ findVueEntry,
9
+ isJsOrTs,
10
+ isTemplate,
11
+ isTemplateRequest,
12
+ touch,
13
+ touchSync
14
+ } from "./chunk-MK4LDVBT.mjs";
15
+ import "./chunk-5CBZRYDL.mjs";
16
+ export {
17
+ changeFileExtension,
18
+ extractConfigFromVue,
19
+ findCssEntry,
20
+ findJsEntry,
21
+ findJsonEntry,
22
+ findTemplateEntry,
23
+ findVueEntry,
24
+ isJsOrTs,
25
+ isTemplate,
26
+ isTemplateRequest,
27
+ touch,
28
+ touchSync
29
+ };
@@ -0,0 +1,29 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+ var _chunkIEICAJDZcjs = require('./chunk-IEICAJDZ.cjs');
15
+ require('./chunk-TZGJRA2Y.cjs');
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+ exports.changeFileExtension = _chunkIEICAJDZcjs.changeFileExtension; exports.extractConfigFromVue = _chunkIEICAJDZcjs.extractConfigFromVue; exports.findCssEntry = _chunkIEICAJDZcjs.findCssEntry; exports.findJsEntry = _chunkIEICAJDZcjs.findJsEntry; exports.findJsonEntry = _chunkIEICAJDZcjs.findJsonEntry; exports.findTemplateEntry = _chunkIEICAJDZcjs.findTemplateEntry; exports.findVueEntry = _chunkIEICAJDZcjs.findVueEntry; exports.isJsOrTs = _chunkIEICAJDZcjs.isJsOrTs; exports.isTemplate = _chunkIEICAJDZcjs.isTemplate; exports.isTemplateRequest = _chunkIEICAJDZcjs.isTemplateRequest; exports.touch = _chunkIEICAJDZcjs.touch; exports.touchSync = _chunkIEICAJDZcjs.touchSync;
package/dist/index.cjs CHANGED
@@ -1,24 +1,33 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-WYYIFHJZ.cjs');
2
2
 
3
- var _chunkNIUQMR6Kcjs = require('./chunk-NIUQMR6K.cjs');
4
- require('./chunk-Q4SMSDJY.cjs');
5
3
 
4
+ var _chunkFB7KR7SHcjs = require('./chunk-FB7KR7SH.cjs');
6
5
 
7
- var _chunkINJNZ3X2cjs = require('./chunk-INJNZ3X2.cjs');
8
6
 
9
7
 
8
+ var _chunkUKTIE44Qcjs = require('./chunk-UKTIE44Q.cjs');
9
+ require('./chunk-EL4WI75Z.cjs');
10
+ require('./chunk-IEICAJDZ.cjs');
10
11
 
11
12
 
13
+ var _chunkE34K6TPDcjs = require('./chunk-E34K6TPD.cjs');
12
14
 
13
15
 
14
- var _chunkMTUYQJIFcjs = require('./chunk-MTUYQJIF.cjs');
15
- require('./chunk-2KCQ5UBK.cjs');
16
16
 
17
17
 
18
- var _chunkN5FVU7GRcjs = require('./chunk-N5FVU7GR.cjs');
18
+
19
+
20
+ var _chunkSJSLFDTAcjs = require('./chunk-SJSLFDTA.cjs');
21
+
22
+
23
+ var _chunkTZGJRA2Ycjs = require('./chunk-TZGJRA2Y.cjs');
19
24
 
20
25
  // src/index.ts
21
- _chunkN5FVU7GRcjs.init_cjs_shims.call(void 0, );
26
+ _chunkTZGJRA2Ycjs.init_cjs_shims.call(void 0, );
27
+ var _wevu = require('wevu');
28
+
29
+
30
+
22
31
 
23
32
 
24
33
 
@@ -27,4 +36,4 @@ _chunkN5FVU7GRcjs.init_cjs_shims.call(void 0, );
27
36
 
28
37
 
29
38
 
30
- exports.createCompilerContext = _chunkNIUQMR6Kcjs.createCompilerContext; exports.defineAppJson = _chunkMTUYQJIFcjs.defineAppJson; exports.defineComponentJson = _chunkMTUYQJIFcjs.defineComponentJson; exports.defineConfig = _chunkINJNZ3X2cjs.defineConfig; exports.definePageJson = _chunkMTUYQJIFcjs.definePageJson; exports.defineSitemapJson = _chunkMTUYQJIFcjs.defineSitemapJson; exports.defineThemeJson = _chunkMTUYQJIFcjs.defineThemeJson;
39
+ exports.createCompilerContext = _chunkFB7KR7SHcjs.createCompilerContext; exports.createWevuComponent = _wevu.createWevuComponent; exports.defineAppJson = _chunkSJSLFDTAcjs.defineAppJson; exports.defineComponentJson = _chunkSJSLFDTAcjs.defineComponentJson; exports.defineConfig = _chunkE34K6TPDcjs.defineConfig; exports.defineEmits = _chunkUKTIE44Qcjs.defineEmits; exports.definePageJson = _chunkSJSLFDTAcjs.definePageJson; exports.defineProps = _chunkUKTIE44Qcjs.defineProps; exports.defineSitemapJson = _chunkSJSLFDTAcjs.defineSitemapJson; exports.defineThemeJson = _chunkSJSLFDTAcjs.defineThemeJson;
package/dist/index.d.cts CHANGED
@@ -1,10 +1,11 @@
1
- import { L as LoadConfigOptions, C as CompilerContext } from './config-D1eBLaq2.cjs';
2
- export { W as WeappViteConfig, a as defineAppJson, c as defineComponentJson, d as defineConfig, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-D1eBLaq2.cjs';
1
+ import { L as LoadConfigOptions, C as CompilerContext } from './config-D5ATg2Pv.cjs';
2
+ export { W as WeappViteConfig, a as defineAppJson, c as defineComponentJson, d as defineConfig, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-D5ATg2Pv.cjs';
3
+ export { WevuComponentOptions, defineEmits, defineProps } from './runtime.cjs';
3
4
  export { RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, WatchOptions as RolldownWatchOptions, RolldownWatcher } from 'rolldown';
4
5
  export { ConfigEnv, InlineConfig, Plugin, PluginOption, ResolvedConfig, UserConfig, UserConfigExport, UserConfigFnObject, ViteDevServer } from 'vite';
6
+ export { ComputedDefinitions, MethodDefinitions, Ref, createWevuComponent } from 'wevu';
5
7
  export { App, Component, Page, Sitemap, Theme } from '@weapp-core/schematics';
6
8
  import '@weapp-vite/web';
7
- import 'tsdown';
8
9
  import 'vite-plugin-performance';
9
10
  import 'vite-tsconfig-paths';
10
11
  import './types-3q1Qq6Fe.cjs';
package/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- import { L as LoadConfigOptions, C as CompilerContext } from './config-9JglUSN2.js';
2
- export { W as WeappViteConfig, a as defineAppJson, c as defineComponentJson, d as defineConfig, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-9JglUSN2.js';
1
+ import { L as LoadConfigOptions, C as CompilerContext } from './config-B6T_L15M.js';
2
+ export { W as WeappViteConfig, a as defineAppJson, c as defineComponentJson, d as defineConfig, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-B6T_L15M.js';
3
+ export { WevuComponentOptions, defineEmits, defineProps } from './runtime.js';
3
4
  export { RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, WatchOptions as RolldownWatchOptions, RolldownWatcher } from 'rolldown';
4
5
  export { ConfigEnv, InlineConfig, Plugin, PluginOption, ResolvedConfig, UserConfig, UserConfigExport, UserConfigFnObject, ViteDevServer } from 'vite';
6
+ export { ComputedDefinitions, MethodDefinitions, Ref, createWevuComponent } from 'wevu';
5
7
  export { App, Component, Page, Sitemap, Theme } from '@weapp-core/schematics';
6
8
  import '@weapp-vite/web';
7
- import 'tsdown';
8
9
  import 'vite-plugin-performance';
9
10
  import 'vite-tsconfig-paths';
10
11
  import './types-3q1Qq6Fe.js';