weapp-vite 5.1.4 → 5.1.5

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.
@@ -6087,7 +6087,7 @@ import fs from "fs-extra";
6087
6087
  import path from "pathe";
6088
6088
  function isJsOrTs(name) {
6089
6089
  if (typeof name === "string") {
6090
- return jsExtensions.some((x4) => name.endsWith(`.${x4}`));
6090
+ return /\.[jt]s$/.test(name);
6091
6091
  }
6092
6092
  return false;
6093
6093
  }
@@ -8189,7 +8189,7 @@ var esm_default = {
8189
8189
  FSWatcher
8190
8190
  };
8191
8191
 
8192
- // ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/index.js
8192
+ // ../../node_modules/.pnpm/p-queue@8.1.1/node_modules/p-queue/dist/index.js
8193
8193
  init_esm_shims();
8194
8194
 
8195
8195
  // ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs
@@ -8293,10 +8293,10 @@ function pTimeout(promise, options) {
8293
8293
  }
8294
8294
  __name(pTimeout, "pTimeout");
8295
8295
 
8296
- // ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/priority-queue.js
8296
+ // ../../node_modules/.pnpm/p-queue@8.1.1/node_modules/p-queue/dist/priority-queue.js
8297
8297
  init_esm_shims();
8298
8298
 
8299
- // ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/lower-bound.js
8299
+ // ../../node_modules/.pnpm/p-queue@8.1.1/node_modules/p-queue/dist/lower-bound.js
8300
8300
  init_esm_shims();
8301
8301
  function lowerBound(array, value, comparator) {
8302
8302
  let first = 0;
@@ -8315,7 +8315,7 @@ function lowerBound(array, value, comparator) {
8315
8315
  }
8316
8316
  __name(lowerBound, "lowerBound");
8317
8317
 
8318
- // ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/priority-queue.js
8318
+ // ../../node_modules/.pnpm/p-queue@8.1.1/node_modules/p-queue/dist/priority-queue.js
8319
8319
  var PriorityQueue = class {
8320
8320
  static {
8321
8321
  __name(this, "PriorityQueue");
@@ -8361,7 +8361,7 @@ var PriorityQueue = class {
8361
8361
  }
8362
8362
  };
8363
8363
 
8364
- // ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/index.js
8364
+ // ../../node_modules/.pnpm/p-queue@8.1.1/node_modules/p-queue/dist/index.js
8365
8365
  var PQueue = class extends import_index.default {
8366
8366
  static {
8367
8367
  __name(this, "PQueue");
@@ -8572,9 +8572,9 @@ var PQueue = class extends import_index.default {
8572
8572
  return new Promise((resolve8, reject) => {
8573
8573
  this.#queue.enqueue(async () => {
8574
8574
  this.#pending++;
8575
- this.#intervalCount++;
8576
8575
  try {
8577
8576
  options.signal?.throwIfAborted();
8577
+ this.#intervalCount++;
8578
8578
  let operation = function_({
8579
8579
  signal: options.signal
8580
8580
  });
@@ -22685,7 +22685,7 @@ __name(getCssRealPath, "getCssRealPath");
22685
22685
  init_esm_shims();
22686
22686
  import { defu as defu2 } from "@weapp-core/shared";
22687
22687
 
22688
- // ../../node_modules/.pnpm/magic-string@0.30.18/node_modules/magic-string/dist/magic-string.es.mjs
22688
+ // ../../node_modules/.pnpm/magic-string@0.30.19/node_modules/magic-string/dist/magic-string.es.mjs
22689
22689
  init_esm_shims();
22690
22690
 
22691
22691
  // ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
@@ -22776,7 +22776,7 @@ function encode(decoded) {
22776
22776
  }
22777
22777
  __name(encode, "encode");
22778
22778
 
22779
- // ../../node_modules/.pnpm/magic-string@0.30.18/node_modules/magic-string/dist/magic-string.es.mjs
22779
+ // ../../node_modules/.pnpm/magic-string@0.30.19/node_modules/magic-string/dist/magic-string.es.mjs
22780
22780
  var BitSet = class _BitSet {
22781
22781
  static {
22782
22782
  __name(this, "BitSet");
@@ -23233,6 +23233,9 @@ var MagicString = class _MagicString {
23233
23233
  }
23234
23234
  if (chunk.outro.length) mappings.advance(chunk.outro);
23235
23235
  });
23236
+ if (this.outro) {
23237
+ mappings.advance(this.outro);
23238
+ }
23236
23239
  return {
23237
23240
  file: options.file ? options.file.split(/[/\\]/).pop() : void 0,
23238
23241
  sources: [
@@ -23745,7 +23748,12 @@ var MagicString = class _MagicString {
23745
23748
  const { original } = this;
23746
23749
  const index = original.indexOf(string);
23747
23750
  if (index !== -1) {
23748
- this.overwrite(index, index + string.length, replacement);
23751
+ if (typeof replacement === "function") {
23752
+ replacement = replacement(string, index, original);
23753
+ }
23754
+ if (string !== replacement) {
23755
+ this.overwrite(index, index + string.length, replacement);
23756
+ }
23749
23757
  }
23750
23758
  return this;
23751
23759
  }
@@ -23760,7 +23768,11 @@ var MagicString = class _MagicString {
23760
23768
  const stringLength = string.length;
23761
23769
  for (let index = original.indexOf(string); index !== -1; index = original.indexOf(string, index + stringLength)) {
23762
23770
  const previous = original.slice(index, index + stringLength);
23763
- if (previous !== replacement) this.overwrite(index, index + stringLength, replacement);
23771
+ let _replacement = replacement;
23772
+ if (typeof replacement === "function") {
23773
+ _replacement = replacement(previous, index, original);
23774
+ }
23775
+ if (previous !== _replacement) this.overwrite(index, index + stringLength, _replacement);
23764
23776
  }
23765
23777
  return this;
23766
23778
  }
@@ -24279,6 +24291,18 @@ function weappVite(ctx, subPackageMeta) {
24279
24291
  const requireAsyncEmittedChunks = /* @__PURE__ */ new Set();
24280
24292
  let pq = [];
24281
24293
  return [
24294
+ {
24295
+ name: "weapp-vite:pre:wxss",
24296
+ enforce: "pre",
24297
+ resolveId: {
24298
+ filter: {
24299
+ id: /\.wxss$/
24300
+ },
24301
+ handler(id) {
24302
+ return id.replace(/\.wxss$/, ".css?wxss");
24303
+ }
24304
+ }
24305
+ },
24282
24306
  {
24283
24307
  name: "weapp-vite:pre",
24284
24308
  enforce: "pre",
@@ -24326,12 +24350,15 @@ function weappVite(ctx, subPackageMeta) {
24326
24350
  }
24327
24351
  options.input = scanedInput;
24328
24352
  },
24329
- resolveId(id) {
24330
- configService.weappViteConfig?.debug?.resolveId?.(id, subPackageMeta);
24331
- if (id.endsWith(".wxss")) {
24332
- return id.replace(/\.wxss$/, ".css?wxss");
24333
- }
24334
- },
24353
+ // resolveId: {
24354
+ // filter: {
24355
+ // id: /\.wxss$/,
24356
+ // },
24357
+ // handler(id) {
24358
+ // configService.weappViteConfig?.debug?.resolveId?.(id, subPackageMeta)
24359
+ // return id.replace(/\.wxss$/, '.css?wxss')
24360
+ // },
24361
+ // },
24335
24362
  // 触发时机
24336
24363
  // https://github.com/rollup/rollup/blob/328fa2d18285185a20bf9b6fde646c3c28f284ae/src/ModuleLoader.ts#L284
24337
24364
  // 假如返回的是 null, 这时候才会往下添加到 this.graph.watchFiles
@@ -24458,14 +24485,14 @@ function weappVite(ctx, subPackageMeta) {
24458
24485
  {
24459
24486
  name: "weapp-vite:post",
24460
24487
  enforce: "post",
24461
- transform(code, id) {
24462
- if (isJsOrTs(id)) {
24488
+ transform: {
24489
+ filter: {
24490
+ id: /\.[jt]s$/
24491
+ },
24492
+ handler(code) {
24463
24493
  try {
24464
24494
  const ast = this.parse(code);
24465
- const { requireTokens } = collectRequireTokens(
24466
- // @ts-ignore
24467
- ast
24468
- );
24495
+ const { requireTokens } = collectRequireTokens(ast);
24469
24496
  return {
24470
24497
  code,
24471
24498
  ast,
@@ -6088,7 +6088,7 @@ var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsex
6088
6088
  var _pathe = require('pathe'); var _pathe2 = _interopRequireDefault(_pathe);
6089
6089
  function isJsOrTs(name) {
6090
6090
  if (typeof name === "string") {
6091
- return jsExtensions.some((x4) => name.endsWith(`.${x4}`));
6091
+ return /\.[jt]s$/.test(name);
6092
6092
  }
6093
6093
  return false;
6094
6094
  }
@@ -8190,7 +8190,7 @@ var esm_default = {
8190
8190
  FSWatcher
8191
8191
  };
8192
8192
 
8193
- // ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/index.js
8193
+ // ../../node_modules/.pnpm/p-queue@8.1.1/node_modules/p-queue/dist/index.js
8194
8194
  _chunkYO2542IPcjs.init_cjs_shims.call(void 0, );
8195
8195
 
8196
8196
  // ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs
@@ -8294,10 +8294,10 @@ function pTimeout(promise, options) {
8294
8294
  }
8295
8295
  _chunkYO2542IPcjs.__name.call(void 0, pTimeout, "pTimeout");
8296
8296
 
8297
- // ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/priority-queue.js
8297
+ // ../../node_modules/.pnpm/p-queue@8.1.1/node_modules/p-queue/dist/priority-queue.js
8298
8298
  _chunkYO2542IPcjs.init_cjs_shims.call(void 0, );
8299
8299
 
8300
- // ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/lower-bound.js
8300
+ // ../../node_modules/.pnpm/p-queue@8.1.1/node_modules/p-queue/dist/lower-bound.js
8301
8301
  _chunkYO2542IPcjs.init_cjs_shims.call(void 0, );
8302
8302
  function lowerBound(array, value, comparator) {
8303
8303
  let first = 0;
@@ -8316,7 +8316,7 @@ function lowerBound(array, value, comparator) {
8316
8316
  }
8317
8317
  _chunkYO2542IPcjs.__name.call(void 0, lowerBound, "lowerBound");
8318
8318
 
8319
- // ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/priority-queue.js
8319
+ // ../../node_modules/.pnpm/p-queue@8.1.1/node_modules/p-queue/dist/priority-queue.js
8320
8320
  var PriorityQueue = class {
8321
8321
  static {
8322
8322
  _chunkYO2542IPcjs.__name.call(void 0, this, "PriorityQueue");
@@ -8362,7 +8362,7 @@ var PriorityQueue = class {
8362
8362
  }
8363
8363
  };
8364
8364
 
8365
- // ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/index.js
8365
+ // ../../node_modules/.pnpm/p-queue@8.1.1/node_modules/p-queue/dist/index.js
8366
8366
  var PQueue = class extends import_index.default {
8367
8367
  static {
8368
8368
  _chunkYO2542IPcjs.__name.call(void 0, this, "PQueue");
@@ -8573,9 +8573,9 @@ var PQueue = class extends import_index.default {
8573
8573
  return new Promise((resolve8, reject) => {
8574
8574
  this.#queue.enqueue(async () => {
8575
8575
  this.#pending++;
8576
- this.#intervalCount++;
8577
8576
  try {
8578
8577
  _optionalChain([options, 'access', _150 => _150.signal, 'optionalAccess', _151 => _151.throwIfAborted, 'call', _152 => _152()]);
8578
+ this.#intervalCount++;
8579
8579
  let operation = function_({
8580
8580
  signal: options.signal
8581
8581
  });
@@ -22686,7 +22686,7 @@ _chunkYO2542IPcjs.__name.call(void 0, getCssRealPath, "getCssRealPath");
22686
22686
  _chunkYO2542IPcjs.init_cjs_shims.call(void 0, );
22687
22687
 
22688
22688
 
22689
- // ../../node_modules/.pnpm/magic-string@0.30.18/node_modules/magic-string/dist/magic-string.es.mjs
22689
+ // ../../node_modules/.pnpm/magic-string@0.30.19/node_modules/magic-string/dist/magic-string.es.mjs
22690
22690
  _chunkYO2542IPcjs.init_cjs_shims.call(void 0, );
22691
22691
 
22692
22692
  // ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
@@ -22777,7 +22777,7 @@ function encode(decoded) {
22777
22777
  }
22778
22778
  _chunkYO2542IPcjs.__name.call(void 0, encode, "encode");
22779
22779
 
22780
- // ../../node_modules/.pnpm/magic-string@0.30.18/node_modules/magic-string/dist/magic-string.es.mjs
22780
+ // ../../node_modules/.pnpm/magic-string@0.30.19/node_modules/magic-string/dist/magic-string.es.mjs
22781
22781
  var BitSet = class _BitSet {
22782
22782
  static {
22783
22783
  _chunkYO2542IPcjs.__name.call(void 0, this, "BitSet");
@@ -23234,6 +23234,9 @@ var MagicString = class _MagicString {
23234
23234
  }
23235
23235
  if (chunk.outro.length) mappings.advance(chunk.outro);
23236
23236
  });
23237
+ if (this.outro) {
23238
+ mappings.advance(this.outro);
23239
+ }
23237
23240
  return {
23238
23241
  file: options.file ? options.file.split(/[/\\]/).pop() : void 0,
23239
23242
  sources: [
@@ -23746,7 +23749,12 @@ var MagicString = class _MagicString {
23746
23749
  const { original } = this;
23747
23750
  const index = original.indexOf(string);
23748
23751
  if (index !== -1) {
23749
- this.overwrite(index, index + string.length, replacement);
23752
+ if (typeof replacement === "function") {
23753
+ replacement = replacement(string, index, original);
23754
+ }
23755
+ if (string !== replacement) {
23756
+ this.overwrite(index, index + string.length, replacement);
23757
+ }
23750
23758
  }
23751
23759
  return this;
23752
23760
  }
@@ -23761,7 +23769,11 @@ var MagicString = class _MagicString {
23761
23769
  const stringLength = string.length;
23762
23770
  for (let index = original.indexOf(string); index !== -1; index = original.indexOf(string, index + stringLength)) {
23763
23771
  const previous = original.slice(index, index + stringLength);
23764
- if (previous !== replacement) this.overwrite(index, index + stringLength, replacement);
23772
+ let _replacement = replacement;
23773
+ if (typeof replacement === "function") {
23774
+ _replacement = replacement(previous, index, original);
23775
+ }
23776
+ if (previous !== _replacement) this.overwrite(index, index + stringLength, _replacement);
23765
23777
  }
23766
23778
  return this;
23767
23779
  }
@@ -24280,6 +24292,18 @@ function weappVite(ctx, subPackageMeta) {
24280
24292
  const requireAsyncEmittedChunks = /* @__PURE__ */ new Set();
24281
24293
  let pq = [];
24282
24294
  return [
24295
+ {
24296
+ name: "weapp-vite:pre:wxss",
24297
+ enforce: "pre",
24298
+ resolveId: {
24299
+ filter: {
24300
+ id: /\.wxss$/
24301
+ },
24302
+ handler(id) {
24303
+ return id.replace(/\.wxss$/, ".css?wxss");
24304
+ }
24305
+ }
24306
+ },
24283
24307
  {
24284
24308
  name: "weapp-vite:pre",
24285
24309
  enforce: "pre",
@@ -24327,18 +24351,21 @@ function weappVite(ctx, subPackageMeta) {
24327
24351
  }
24328
24352
  options.input = scanedInput;
24329
24353
  },
24330
- resolveId(id) {
24331
- _optionalChain([configService, 'access', _347 => _347.weappViteConfig, 'optionalAccess', _348 => _348.debug, 'optionalAccess', _349 => _349.resolveId, 'optionalCall', _350 => _350(id, subPackageMeta)]);
24332
- if (id.endsWith(".wxss")) {
24333
- return id.replace(/\.wxss$/, ".css?wxss");
24334
- }
24335
- },
24354
+ // resolveId: {
24355
+ // filter: {
24356
+ // id: /\.wxss$/,
24357
+ // },
24358
+ // handler(id) {
24359
+ // configService.weappViteConfig?.debug?.resolveId?.(id, subPackageMeta)
24360
+ // return id.replace(/\.wxss$/, '.css?wxss')
24361
+ // },
24362
+ // },
24336
24363
  // 触发时机
24337
24364
  // https://github.com/rollup/rollup/blob/328fa2d18285185a20bf9b6fde646c3c28f284ae/src/ModuleLoader.ts#L284
24338
24365
  // 假如返回的是 null, 这时候才会往下添加到 this.graph.watchFiles
24339
24366
  // https://github.com/rollup/rollup/blob/328fa2d18285185a20bf9b6fde646c3c28f284ae/src/utils/PluginDriver.ts#L153
24340
24367
  async load(id) {
24341
- _optionalChain([configService, 'access', _351 => _351.weappViteConfig, 'optionalAccess', _352 => _352.debug, 'optionalAccess', _353 => _353.load, 'optionalCall', _354 => _354(id, subPackageMeta)]);
24368
+ _optionalChain([configService, 'access', _347 => _347.weappViteConfig, 'optionalAccess', _348 => _348.debug, 'optionalAccess', _349 => _349.load, 'optionalCall', _350 => _350(id, subPackageMeta)]);
24342
24369
  const relativeBasename = _shared.removeExtensionDeep.call(void 0, configService.relativeAbsoluteSrcRoot(id));
24343
24370
  if (isCSSRequest(id)) {
24344
24371
  const parsed = parseRequest(id);
@@ -24353,7 +24380,7 @@ function weappVite(ctx, subPackageMeta) {
24353
24380
  }
24354
24381
  }
24355
24382
  return null;
24356
- } else if (loadedEntrySet.has(id) || _optionalChain([subPackageMeta, 'optionalAccess', _355 => _355.entries, 'access', _356 => _356.includes, 'call', _357 => _357(relativeBasename)])) {
24383
+ } else if (loadedEntrySet.has(id) || _optionalChain([subPackageMeta, 'optionalAccess', _351 => _351.entries, 'access', _352 => _352.includes, 'call', _353 => _353(relativeBasename)])) {
24357
24384
  return await loadEntry.call(
24358
24385
  // @ts-ignore
24359
24386
  this,
@@ -24441,7 +24468,7 @@ function weappVite(ctx, subPackageMeta) {
24441
24468
  }
24442
24469
  }
24443
24470
  }
24444
- if (_optionalChain([configService, 'access', _358 => _358.weappViteConfig, 'optionalAccess', _359 => _359.debug, 'optionalAccess', _360 => _360.watchFiles]) && typeof this.getWatchFiles === "function") {
24471
+ if (_optionalChain([configService, 'access', _354 => _354.weappViteConfig, 'optionalAccess', _355 => _355.debug, 'optionalAccess', _356 => _356.watchFiles]) && typeof this.getWatchFiles === "function") {
24445
24472
  const watchFiles = this.getWatchFiles();
24446
24473
  configService.weappViteConfig.debug.watchFiles(watchFiles, subPackageMeta);
24447
24474
  }
@@ -24453,20 +24480,20 @@ function weappVite(ctx, subPackageMeta) {
24453
24480
  // }
24454
24481
  // },
24455
24482
  buildEnd() {
24456
- _optionalChain([debug3, 'optionalCall', _361 => _361(`${subPackageMeta ? `\u72EC\u7ACB\u5206\u5305 ${subPackageMeta.subPackage.root}` : "\u4E3B\u5305"} ${Array.from(this.getModuleIds()).length} \u4E2A\u6A21\u5757\u88AB\u7F16\u8BD1`)]);
24483
+ _optionalChain([debug3, 'optionalCall', _357 => _357(`${subPackageMeta ? `\u72EC\u7ACB\u5206\u5305 ${subPackageMeta.subPackage.root}` : "\u4E3B\u5305"} ${Array.from(this.getModuleIds()).length} \u4E2A\u6A21\u5757\u88AB\u7F16\u8BD1`)]);
24457
24484
  }
24458
24485
  },
24459
24486
  {
24460
24487
  name: "weapp-vite:post",
24461
24488
  enforce: "post",
24462
- transform(code, id) {
24463
- if (isJsOrTs(id)) {
24489
+ transform: {
24490
+ filter: {
24491
+ id: /\.[jt]s$/
24492
+ },
24493
+ handler(code) {
24464
24494
  try {
24465
24495
  const ast = this.parse(code);
24466
- const { requireTokens } = collectRequireTokens(
24467
- // @ts-ignore
24468
- ast
24469
- );
24496
+ const { requireTokens } = collectRequireTokens(ast);
24470
24497
  return {
24471
24498
  code,
24472
24499
  ast,
@@ -24663,10 +24690,10 @@ function preflight({ configService }) {
24663
24690
  enforce: "pre",
24664
24691
  configResolved(config) {
24665
24692
  for (const removePlugin of removePlugins) {
24666
- const idx = _optionalChain([config, 'access', _362 => _362.plugins, 'optionalAccess', _363 => _363.findIndex, 'call', _364 => _364((x4) => x4.name === removePlugin)]);
24693
+ const idx = _optionalChain([config, 'access', _358 => _358.plugins, 'optionalAccess', _359 => _359.findIndex, 'call', _360 => _360((x4) => x4.name === removePlugin)]);
24667
24694
  if (idx > -1) {
24668
24695
  const plugin = config.plugins.splice(idx, 1);
24669
- plugin[0] && _optionalChain([debug4, 'optionalCall', _365 => _365("remove plugin", plugin[0].name)]);
24696
+ plugin[0] && _optionalChain([debug4, 'optionalCall', _361 => _361("remove plugin", plugin[0].name)]);
24670
24697
  }
24671
24698
  }
24672
24699
  }
@@ -24698,9 +24725,9 @@ function workers({ configService, scanService }) {
24698
24725
  name: "weapp-vite:workers",
24699
24726
  enforce: "pre",
24700
24727
  async options(options) {
24701
- const workerOptions = _optionalChain([configService, 'access', _366 => _366.weappViteConfig, 'optionalAccess', _367 => _367.worker]);
24702
- const entries = (Array.isArray(_optionalChain([workerOptions, 'optionalAccess', _368 => _368.entry])) ? _optionalChain([workerOptions, 'optionalAccess', _369 => _369.entry]) : [
24703
- _optionalChain([workerOptions, 'optionalAccess', _370 => _370.entry])
24728
+ const workerOptions = _optionalChain([configService, 'access', _362 => _362.weappViteConfig, 'optionalAccess', _363 => _363.worker]);
24729
+ const entries = (Array.isArray(_optionalChain([workerOptions, 'optionalAccess', _364 => _364.entry])) ? _optionalChain([workerOptions, 'optionalAccess', _365 => _365.entry]) : [
24730
+ _optionalChain([workerOptions, 'optionalAccess', _366 => _366.entry])
24704
24731
  ]).filter((x4) => x4);
24705
24732
  const pq = await Promise.all(entries.map(async (entry) => {
24706
24733
  const relativeEnrtyPath = _pathe2.default.join(scanService.workersDir, entry);
@@ -24774,7 +24801,7 @@ function wxs({ configService, wxmlService }) {
24774
24801
  const { result, importees } = transformWxsCode(rawCode, {
24775
24802
  filename: wxsPath
24776
24803
  });
24777
- if (typeof _optionalChain([result, 'optionalAccess', _371 => _371.code]) === "string") {
24804
+ if (typeof _optionalChain([result, 'optionalAccess', _367 => _367.code]) === "string") {
24778
24805
  code = result.code;
24779
24806
  }
24780
24807
  await Promise.all(importees.map(({ source }) => {
@@ -24845,7 +24872,7 @@ function vitePluginWeapp(ctx, subPackageMeta) {
24845
24872
  if (subPackageMeta) {
24846
24873
  return plugins;
24847
24874
  }
24848
- const inspectOptions = _optionalChain([ctx, 'access', _372 => _372.configService, 'access', _373 => _373.weappViteConfig, 'optionalAccess', _374 => _374.debug, 'optionalAccess', _375 => _375.inspect]);
24875
+ const inspectOptions = _optionalChain([ctx, 'access', _368 => _368.configService, 'access', _369 => _369.weappViteConfig, 'optionalAccess', _370 => _370.debug, 'optionalAccess', _371 => _371.inspect]);
24849
24876
  return inspectOptions ? _vitepluginperformance.wrapPlugin.call(void 0, plugins, inspectOptions) : plugins;
24850
24877
  }
24851
24878
  _chunkYO2542IPcjs.__name.call(void 0, vitePluginWeapp, "vitePluginWeapp");
@@ -24854,7 +24881,7 @@ function vitePluginWeappWorkers(ctx) {
24854
24881
  ...preflight(ctx)
24855
24882
  ];
24856
24883
  plugins.push(...workers(ctx));
24857
- const inspectOptions = _optionalChain([ctx, 'access', _376 => _376.configService, 'access', _377 => _377.weappViteConfig, 'optionalAccess', _378 => _378.debug, 'optionalAccess', _379 => _379.inspect]);
24884
+ const inspectOptions = _optionalChain([ctx, 'access', _372 => _372.configService, 'access', _373 => _373.weappViteConfig, 'optionalAccess', _374 => _374.debug, 'optionalAccess', _375 => _375.inspect]);
24858
24885
  return inspectOptions ? _vitepluginperformance.wrapPlugin.call(void 0, plugins, inspectOptions) : plugins;
24859
24886
  }
24860
24887
  _chunkYO2542IPcjs.__name.call(void 0, vitePluginWeappWorkers, "vitePluginWeappWorkers");
@@ -24921,8 +24948,8 @@ var ConfigService2 = class {
24921
24948
  command: isDev ? "serve" : "build",
24922
24949
  mode
24923
24950
  }, void 0, cwd);
24924
- const loadedConfig = _optionalChain([loaded, 'optionalAccess', _380 => _380.config]);
24925
- const srcRoot = _nullishCoalesce(_optionalChain([loadedConfig, 'optionalAccess', _381 => _381.weapp, 'optionalAccess', _382 => _382.srcRoot]), () => ( ""));
24951
+ const loadedConfig = _optionalChain([loaded, 'optionalAccess', _376 => _376.config]);
24952
+ const srcRoot = _nullishCoalesce(_optionalChain([loadedConfig, 'optionalAccess', _377 => _377.weapp, 'optionalAccess', _378 => _378.srcRoot]), () => ( ""));
24926
24953
  function relativeSrcRoot(p3) {
24927
24954
  if (srcRoot) {
24928
24955
  return _pathe2.default.relative(srcRoot, p3);
@@ -24950,11 +24977,11 @@ var ConfigService2 = class {
24950
24977
  logLevel: "warn",
24951
24978
  weapp: getWeappViteConfig()
24952
24979
  });
24953
- const platform = _nullishCoalesce(_optionalChain([config, 'access', _383 => _383.weapp, 'optionalAccess', _384 => _384.platform]), () => ( "weapp"));
24980
+ const platform = _nullishCoalesce(_optionalChain([config, 'access', _379 => _379.weapp, 'optionalAccess', _380 => _380.platform]), () => ( "weapp"));
24954
24981
  const outputExtensions = getOutputExtensions(platform);
24955
24982
  config.plugins ??= [];
24956
- _optionalChain([config, 'access', _385 => _385.plugins, 'optionalAccess', _386 => _386.push, 'call', _387 => _387(_vitetsconfigpaths2.default.call(void 0, _optionalChain([config, 'access', _388 => _388.weapp, 'optionalAccess', _389 => _389.tsconfigPaths])))]);
24957
- const aliasEntries = getAliasEntries(_optionalChain([config, 'access', _390 => _390.weapp, 'optionalAccess', _391 => _391.jsonAlias]));
24983
+ _optionalChain([config, 'access', _381 => _381.plugins, 'optionalAccess', _382 => _382.push, 'call', _383 => _383(_vitetsconfigpaths2.default.call(void 0, _optionalChain([config, 'access', _384 => _384.weapp, 'optionalAccess', _385 => _385.tsconfigPaths])))]);
24984
+ const aliasEntries = getAliasEntries(_optionalChain([config, 'access', _386 => _386.weapp, 'optionalAccess', _387 => _387.jsonAlias]));
24958
24985
  return {
24959
24986
  config,
24960
24987
  aliasEntries,
@@ -25023,7 +25050,7 @@ var ConfigService2 = class {
25023
25050
  return this.options.srcRoot;
25024
25051
  }
25025
25052
  get pluginRoot() {
25026
- return _optionalChain([this, 'access', _392 => _392.weappViteConfig, 'optionalAccess', _393 => _393.pluginRoot]);
25053
+ return _optionalChain([this, 'access', _388 => _388.weappViteConfig, 'optionalAccess', _389 => _389.pluginRoot]);
25027
25054
  }
25028
25055
  get absolutePluginRoot() {
25029
25056
  if (this.pluginRoot) {
@@ -25258,7 +25285,7 @@ var JsonService2 = class {
25258
25285
  return resultJson;
25259
25286
  } catch (error) {
25260
25287
  logger_default.error(`\u6B8B\u7834\u7684JSON\u6587\u4EF6: ${filepath}`);
25261
- _optionalChain([debug, 'optionalCall', _394 => _394(error)]);
25288
+ _optionalChain([debug, 'optionalCall', _390 => _390(error)]);
25262
25289
  }
25263
25290
  }
25264
25291
  resolve(entry) {
@@ -25320,7 +25347,7 @@ var NpmService2 = class {
25320
25347
  return !isOutdated && await _fsextra2.default.exists(outDir);
25321
25348
  }
25322
25349
  writeDependenciesCache(root) {
25323
- if (_optionalChain([this, 'access', _395 => _395.configService, 'access', _396 => _396.weappViteConfig, 'optionalAccess', _397 => _397.npm, 'optionalAccess', _398 => _398.cache])) {
25350
+ if (_optionalChain([this, 'access', _391 => _391.configService, 'access', _392 => _392.weappViteConfig, 'optionalAccess', _393 => _393.npm, 'optionalAccess', _394 => _394.cache])) {
25324
25351
  return _fsextra2.default.outputJSON(this.getDependenciesCacheFilePath(root), {
25325
25352
  hash: this.dependenciesCacheHash
25326
25353
  });
@@ -25335,7 +25362,7 @@ var NpmService2 = class {
25335
25362
  }
25336
25363
  }
25337
25364
  async checkDependenciesCacheOutdate(root) {
25338
- if (_optionalChain([this, 'access', _399 => _399.configService, 'access', _400 => _400.weappViteConfig, 'optionalAccess', _401 => _401.npm, 'optionalAccess', _402 => _402.cache])) {
25365
+ if (_optionalChain([this, 'access', _395 => _395.configService, 'access', _396 => _396.weappViteConfig, 'optionalAccess', _397 => _397.npm, 'optionalAccess', _398 => _398.cache])) {
25339
25366
  const json = await this.readDependenciesCache(root);
25340
25367
  if (_shared.isObject.call(void 0, json)) {
25341
25368
  return this.dependenciesCacheHash !== json.hash;
@@ -25372,7 +25399,7 @@ var NpmService2 = class {
25372
25399
  target: "es6",
25373
25400
  external: []
25374
25401
  });
25375
- const resolvedOptions = _optionalChain([this, 'access', _403 => _403.configService, 'access', _404 => _404.weappViteConfig, 'optionalAccess', _405 => _405.npm, 'optionalAccess', _406 => _406.buildOptions, 'optionalCall', _407 => _407(mergedOptions, {
25402
+ const resolvedOptions = _optionalChain([this, 'access', _399 => _399.configService, 'access', _400 => _400.weappViteConfig, 'optionalAccess', _401 => _401.npm, 'optionalAccess', _402 => _402.buildOptions, 'optionalCall', _403 => _403(mergedOptions, {
25376
25403
  name,
25377
25404
  entry
25378
25405
  })]);
@@ -25449,7 +25476,7 @@ var NpmService2 = class {
25449
25476
  }
25450
25477
  getPackNpmRelationList() {
25451
25478
  let packNpmRelationList = [];
25452
- if (_optionalChain([this, 'access', _408 => _408.configService, 'access', _409 => _409.projectConfig, 'access', _410 => _410.setting, 'optionalAccess', _411 => _411.packNpmManually]) && Array.isArray(this.configService.projectConfig.setting.packNpmRelationList)) {
25479
+ if (_optionalChain([this, 'access', _404 => _404.configService, 'access', _405 => _405.projectConfig, 'access', _406 => _406.setting, 'optionalAccess', _407 => _407.packNpmManually]) && Array.isArray(this.configService.projectConfig.setting.packNpmRelationList)) {
25453
25480
  packNpmRelationList = this.configService.projectConfig.setting.packNpmRelationList;
25454
25481
  } else {
25455
25482
  packNpmRelationList = [
@@ -25462,10 +25489,10 @@ var NpmService2 = class {
25462
25489
  return packNpmRelationList;
25463
25490
  }
25464
25491
  async build(options) {
25465
- if (!_optionalChain([this, 'access', _412 => _412.configService, 'access', _413 => _413.weappViteConfig, 'optionalAccess', _414 => _414.npm, 'optionalAccess', _415 => _415.enable])) {
25492
+ if (!_optionalChain([this, 'access', _408 => _408.configService, 'access', _409 => _409.weappViteConfig, 'optionalAccess', _410 => _410.npm, 'optionalAccess', _411 => _411.enable])) {
25466
25493
  return;
25467
25494
  }
25468
- _optionalChain([debug, 'optionalCall', _416 => _416("buildNpm start")]);
25495
+ _optionalChain([debug, 'optionalCall', _412 => _412("buildNpm start")]);
25469
25496
  const packNpmRelationList = this.getPackNpmRelationList();
25470
25497
  const [mainRelation, ...subRelations] = packNpmRelationList;
25471
25498
  const packageJsonPath = _pathe2.default.resolve(this.configService.cwd, mainRelation.packageJsonPath);
@@ -25540,7 +25567,7 @@ var NpmService2 = class {
25540
25567
  }
25541
25568
  }
25542
25569
  }
25543
- _optionalChain([debug, 'optionalCall', _417 => _417("buildNpm end")]);
25570
+ _optionalChain([debug, 'optionalCall', _413 => _413("buildNpm end")]);
25544
25571
  }
25545
25572
  };
25546
25573
  NpmService2 = _ts_decorate6([
@@ -25639,7 +25666,7 @@ var ScanService2 = class {
25639
25666
  }
25640
25667
  loadSubPackages() {
25641
25668
  const metas = [];
25642
- const json = _optionalChain([this, 'access', _418 => _418.appEntry, 'optionalAccess', _419 => _419.json]);
25669
+ const json = _optionalChain([this, 'access', _414 => _414.appEntry, 'optionalAccess', _415 => _415.json]);
25643
25670
  if (json) {
25644
25671
  const independentSubPackages = [
25645
25672
  ..._nullishCoalesce(json.subPackages, () => ( [])),
@@ -25655,9 +25682,9 @@ var ScanService2 = class {
25655
25682
  subPackage,
25656
25683
  entries
25657
25684
  };
25658
- const subPackageConfig = _optionalChain([this, 'access', _420 => _420.configService, 'access', _421 => _421.weappViteConfig, 'optionalAccess', _422 => _422.subPackages, 'optionalAccess', _423 => _423[subPackage.root]]);
25659
- meta.subPackage.dependencies = _optionalChain([subPackageConfig, 'optionalAccess', _424 => _424.dependencies]);
25660
- meta.subPackage.inlineConfig = _optionalChain([subPackageConfig, 'optionalAccess', _425 => _425.inlineConfig]);
25685
+ const subPackageConfig = _optionalChain([this, 'access', _416 => _416.configService, 'access', _417 => _417.weappViteConfig, 'optionalAccess', _418 => _418.subPackages, 'optionalAccess', _419 => _419[subPackage.root]]);
25686
+ meta.subPackage.dependencies = _optionalChain([subPackageConfig, 'optionalAccess', _420 => _420.dependencies]);
25687
+ meta.subPackage.inlineConfig = _optionalChain([subPackageConfig, 'optionalAccess', _421 => _421.inlineConfig]);
25661
25688
  metas.push(meta);
25662
25689
  this.subPackageMap.set(subPackage.root, meta);
25663
25690
  if (subPackage.independent) {
@@ -25676,7 +25703,7 @@ var ScanService2 = class {
25676
25703
  }
25677
25704
  // https://developers.weixin.qq.com/miniprogram/dev/framework/workers.html
25678
25705
  get workersOptions() {
25679
- return _optionalChain([this, 'access', _426 => _426.appEntry, 'optionalAccess', _427 => _427.json, 'optionalAccess', _428 => _428.workers]);
25706
+ return _optionalChain([this, 'access', _422 => _422.appEntry, 'optionalAccess', _423 => _423.json, 'optionalAccess', _424 => _424.workers]);
25680
25707
  }
25681
25708
  get workersDir() {
25682
25709
  return typeof this.workersOptions === "object" ? this.workersOptions.path : this.workersOptions;
@@ -25719,7 +25746,7 @@ var WatcherService2 = class {
25719
25746
  }
25720
25747
  setRollupWatcher(watcher, root = "/") {
25721
25748
  const oldWatcher = this.getRollupWatcher(root);
25722
- _optionalChain([oldWatcher, 'optionalAccess', _429 => _429.close, 'call', _430 => _430()]);
25749
+ _optionalChain([oldWatcher, 'optionalAccess', _425 => _425.close, 'call', _426 => _426()]);
25723
25750
  this.rollupWatcherMap.set(root, watcher);
25724
25751
  }
25725
25752
  closeAll() {
@@ -34890,7 +34917,7 @@ var WxmlService2 = class {
34890
34917
  analyze(wxml) {
34891
34918
  return scanWxml(wxml, {
34892
34919
  platform: this.configService.platform,
34893
- ..._optionalChain([this, 'access', _431 => _431.configService, 'access', _432 => _432.weappViteConfig, 'optionalAccess', _433 => _433.enhance, 'optionalAccess', _434 => _434.wxml]) === true ? {} : _optionalChain([this, 'access', _435 => _435.configService, 'access', _436 => _436.weappViteConfig, 'optionalAccess', _437 => _437.enhance, 'optionalAccess', _438 => _438.wxml])
34920
+ ..._optionalChain([this, 'access', _427 => _427.configService, 'access', _428 => _428.weappViteConfig, 'optionalAccess', _429 => _429.enhance, 'optionalAccess', _430 => _430.wxml]) === true ? {} : _optionalChain([this, 'access', _431 => _431.configService, 'access', _432 => _432.weappViteConfig, 'optionalAccess', _433 => _433.enhance, 'optionalAccess', _434 => _434.wxml])
34894
34921
  });
34895
34922
  }
34896
34923
  async scan(filepath) {
@@ -34955,7 +34982,7 @@ _chunkYO2542IPcjs.__name.call(void 0, getCompilerContext, "getCompilerContext");
34955
34982
 
34956
34983
  // src/createContext.ts
34957
34984
  async function createCompilerContext(options) {
34958
- const ctx = getCompilerContext(_optionalChain([options, 'optionalAccess', _439 => _439.key]));
34985
+ const ctx = getCompilerContext(_optionalChain([options, 'optionalAccess', _435 => _435.key]));
34959
34986
  const { configService, scanService } = ctx;
34960
34987
  await configService.load(options);
34961
34988
  try {
package/dist/cli.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkEFYTUTJGcjs = require('./chunk-EFYTUTJG.cjs');
6
+ var _chunkOCZPMHVCcjs = require('./chunk-OCZPMHVC.cjs');
7
7
  require('./chunk-ZHSGQ3TN.cjs');
8
8
  require('./chunk-MJC522YQ.cjs');
9
9
 
@@ -823,14 +823,14 @@ async function generate(options) {
823
823
  for (const { code, fileName: fileName2 } of files) {
824
824
  if (code !== void 0) {
825
825
  await _fsextra2.default.outputFile(_pathe2.default.resolve(basepath, fileName2), code, "utf8");
826
- _chunkEFYTUTJGcjs.logger_default.success(`${composePath(outDir, fileName2)} \u521B\u5EFA\u6210\u529F\uFF01`);
826
+ _chunkOCZPMHVCcjs.logger_default.success(`${composePath(outDir, fileName2)} \u521B\u5EFA\u6210\u529F\uFF01`);
827
827
  }
828
828
  }
829
829
  }
830
830
  _chunkYO2542IPcjs.__name.call(void 0, generate, "generate");
831
831
 
832
832
  // src/cli.ts
833
- var import_reflect_metadata = _chunkYO2542IPcjs.__toESM.call(void 0, _chunkEFYTUTJGcjs.require_Reflect.call(void 0, ), 1);
833
+ var import_reflect_metadata = _chunkYO2542IPcjs.__toESM.call(void 0, _chunkOCZPMHVCcjs.require_Reflect.call(void 0, ), 1);
834
834
  var cli = cac("weapp-vite");
835
835
  function loadConfig() {
836
836
  return _vite.loadConfigFromFile.call(void 0, {
@@ -852,9 +852,9 @@ function logBuildAppFinish(configService) {
852
852
  ]
853
853
  }));
854
854
  const devCommand = `${command} ${args.join(" ")}`;
855
- _chunkEFYTUTJGcjs.logger_default.success("\u5E94\u7528\u6784\u5EFA\u5B8C\u6210\uFF01\u9884\u89C8\u65B9\u5F0F ( `2` \u79CD\u9009\u5176\u4E00\u5373\u53EF)\uFF1A");
856
- _chunkEFYTUTJGcjs.logger_default.info(`\u6267\u884C \`${devCommand}\` \u53EF\u4EE5\u76F4\u63A5\u5728 \`\u5FAE\u4FE1\u5F00\u53D1\u8005\u5DE5\u5177\` \u91CC\u6253\u5F00\u5F53\u524D\u5E94\u7528`);
857
- _chunkEFYTUTJGcjs.logger_default.info("\u6216\u624B\u52A8\u6253\u5F00\u5FAE\u4FE1\u5F00\u53D1\u8005\u5DE5\u5177\uFF0C\u5BFC\u5165\u6839\u76EE\u5F55(`project.config.json` \u6587\u4EF6\u6240\u5728\u7684\u76EE\u5F55)\uFF0C\u5373\u53EF\u9884\u89C8\u6548\u679C");
855
+ _chunkOCZPMHVCcjs.logger_default.success("\u5E94\u7528\u6784\u5EFA\u5B8C\u6210\uFF01\u9884\u89C8\u65B9\u5F0F ( `2` \u79CD\u9009\u5176\u4E00\u5373\u53EF)\uFF1A");
856
+ _chunkOCZPMHVCcjs.logger_default.info(`\u6267\u884C \`${devCommand}\` \u53EF\u4EE5\u76F4\u63A5\u5728 \`\u5FAE\u4FE1\u5F00\u53D1\u8005\u5DE5\u5177\` \u91CC\u6253\u5F00\u5F53\u524D\u5E94\u7528`);
857
+ _chunkOCZPMHVCcjs.logger_default.info("\u6216\u624B\u52A8\u6253\u5F00\u5FAE\u4FE1\u5F00\u53D1\u8005\u5DE5\u5177\uFF0C\u5BFC\u5165\u6839\u76EE\u5F55(`project.config.json` \u6587\u4EF6\u6240\u5728\u7684\u76EE\u5F55)\uFF0C\u5373\u53EF\u9884\u89C8\u6548\u679C");
858
858
  logBuildAppFinishOnlyShowOnce = true;
859
859
  }
860
860
  }
@@ -881,7 +881,7 @@ async function openIde() {
881
881
  "-p"
882
882
  ]);
883
883
  } catch (error) {
884
- _chunkEFYTUTJGcjs.logger_default.error(error);
884
+ _chunkOCZPMHVCcjs.logger_default.error(error);
885
885
  }
886
886
  }
887
887
  _chunkYO2542IPcjs.__name.call(void 0, openIde, "openIde");
@@ -892,7 +892,7 @@ cli.option("-c, --config <file>", `[string] use specified config file`).option("
892
892
  }).option("-l, --logLevel <level>", `[string] info | warn | error | silent`).option("--clearScreen", `[boolean] allow/disable clear screen when logging`).option("-d, --debug [feat]", `[string | boolean] show debug logs`).option("-f, --filter <filter>", `[string] filter debug logs`).option("-m, --mode <mode>", `[string] set env mode`);
893
893
  cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--skipNpm", `[boolean] if skip npm build`).option("-o, --open", `[boolean] open ide`).action(async (root, options) => {
894
894
  filterDuplicateOptions(options);
895
- const { buildService, configService } = await _chunkEFYTUTJGcjs.createCompilerContext.call(void 0, {
895
+ const { buildService, configService } = await _chunkOCZPMHVCcjs.createCompilerContext.call(void 0, {
896
896
  cwd: root,
897
897
  mode: _nullishCoalesce(options.mode, () => ( "development")),
898
898
  isDev: true
@@ -905,7 +905,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
905
905
  });
906
906
  cli.command("build [root]", "build for production").option("--target <target>", `[string] transpile target (default: 'modules')`).option("--outDir <dir>", `[string] output directory (default: dist)`).option("--sourcemap [output]", `[boolean | "inline" | "hidden"] output source maps for build (default: false)`).option("--minify [minifier]", `[boolean | "terser" | "esbuild"] enable/disable minification, or specify minifier to use (default: esbuild)`).option("--emptyOutDir", `[boolean] force empty outDir when it's outside of root`).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--skipNpm", `[boolean] if skip npm build`).option("-o, --open", `[boolean] open ide`).action(async (root, options) => {
907
907
  filterDuplicateOptions(options);
908
- const { buildService, configService } = await _chunkEFYTUTJGcjs.createCompilerContext.call(void 0, {
908
+ const { buildService, configService } = await _chunkOCZPMHVCcjs.createCompilerContext.call(void 0, {
909
909
  cwd: root,
910
910
  mode: _nullishCoalesce(options.mode, () => ( "production"))
911
911
  });
@@ -921,7 +921,7 @@ cli.command("init").action(async () => {
921
921
  command: "weapp-vite"
922
922
  });
923
923
  } catch (error) {
924
- _chunkEFYTUTJGcjs.logger_default.error(error);
924
+ _chunkOCZPMHVCcjs.logger_default.error(error);
925
925
  }
926
926
  });
927
927
  cli.command("open").action(async () => {
@@ -934,7 +934,7 @@ cli.command("npm").alias("build:npm").alias("build-npm").action(async () => {
934
934
  "-p"
935
935
  ]);
936
936
  } catch (error) {
937
- _chunkEFYTUTJGcjs.logger_default.error(error);
937
+ _chunkOCZPMHVCcjs.logger_default.error(error);
938
938
  }
939
939
  });
940
940
  cli.command("g [filepath]", "generate component").alias("generate").option("-a, --app", "type app").option("-p, --page", "type app").option("-n, --name <name>", "filename").action(async (filepath, options) => {
@@ -949,7 +949,7 @@ cli.command("g [filepath]", "generate component").alias("generate").option("-a,
949
949
  fileName = "app";
950
950
  }
951
951
  if (filepath === void 0) {
952
- _chunkEFYTUTJGcjs.logger_default.error("weapp-vite generate <outDir> \u547D\u4EE4\u5FC5\u987B\u4F20\u5165\u8DEF\u5F84\u53C2\u6570 outDir");
952
+ _chunkOCZPMHVCcjs.logger_default.error("weapp-vite generate <outDir> \u547D\u4EE4\u5FC5\u987B\u4F20\u5165\u8DEF\u5F84\u53C2\u6570 outDir");
953
953
  return;
954
954
  }
955
955
  if (options.page) {
@@ -968,5 +968,5 @@ cli.command("create [outDir]", "create project").option("-t, --template <type>",
968
968
  await _init.createProject.call(void 0, outDir, options.template);
969
969
  });
970
970
  cli.help();
971
- cli.version(_chunkEFYTUTJGcjs.VERSION);
971
+ cli.version(_chunkOCZPMHVCcjs.VERSION);
972
972
  cli.parse();
package/dist/cli.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  createCompilerContext,
4
4
  logger_default,
5
5
  require_Reflect
6
- } from "./chunk-CHN5F7BL.mjs";
6
+ } from "./chunk-DYKCBHH7.mjs";
7
7
  import "./chunk-DRYEIGGG.mjs";
8
8
  import "./chunk-KOIV3AIW.mjs";
9
9
  import {
@@ -9,8 +9,8 @@ import { Theme, Sitemap, App, Page, Component, Plugin } from '@weapp-core/schema
9
9
  import { DetectResult } from 'package-manager-detector';
10
10
  import { PackageJson } from 'pkg-types';
11
11
  import { LRUCache } from 'lru-cache';
12
- import * as node_modules_rolldown_dist_shared_binding_9k0egz6L_mjs from 'node_modules/rolldown/dist/shared/binding-9k0egz6L.mjs';
13
- import * as node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs from 'node_modules/rolldown/dist/shared/define-config-DVSr6Unb.mjs';
12
+ import * as node_modules_rolldown_dist_shared_binding_wK0CRIMb_mjs from 'node_modules/rolldown/dist/shared/binding-wK0CRIMb.mjs';
13
+ import * as node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs from 'node_modules/rolldown/dist/shared/define-config-wxvILtDx.mjs';
14
14
  import PQueue from 'p-queue';
15
15
  import { Buffer } from 'node:buffer';
16
16
 
@@ -329,16 +329,16 @@ declare class BuildService {
329
329
  private runDev;
330
330
  private runProd;
331
331
  build(options?: BuildOptions): Promise<{
332
- listeners: Map<"close" | "change" | "event" | "restart", Array<(...parameters: any[]) => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>>>;
332
+ listeners: Map<"close" | "change" | "event" | "restart", Array<(...parameters: any[]) => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>>>;
333
333
  timer: any;
334
334
  on(event: "change", listener: (id: string, change: {
335
335
  event: "delete" | "update" | "create";
336
- }) => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>): /*elided*/ any;
337
- on(event: "event", listener: (data: rolldown.RolldownWatcherEvent) => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>): /*elided*/ any;
338
- on(event: "restart" | "close", listener: () => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>): /*elided*/ any;
339
- off(event: "close" | "change" | "event" | "restart", listener: (...parameters: any[]) => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>): /*elided*/ any;
336
+ }) => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>): /*elided*/ any;
337
+ on(event: "event", listener: (data: rolldown.RolldownWatcherEvent) => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>): /*elided*/ any;
338
+ on(event: "restart" | "close", listener: () => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>): /*elided*/ any;
339
+ off(event: "close" | "change" | "event" | "restart", listener: (...parameters: any[]) => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>): /*elided*/ any;
340
340
  clear(event: "close" | "change" | "event" | "restart"): void;
341
- onEvent(event: node_modules_rolldown_dist_shared_binding_9k0egz6L_mjs.BindingWatcherEvent): Promise<void>;
341
+ onEvent(event: node_modules_rolldown_dist_shared_binding_wK0CRIMb_mjs.BindingWatcherEvent): Promise<void>;
342
342
  close(): Promise<void>;
343
343
  } | RolldownOutput | RolldownOutput[]>;
344
344
  }
@@ -505,16 +505,16 @@ declare class WatcherService {
505
505
  rollupWatcherMap: Map<string, RolldownWatcher>;
506
506
  constructor();
507
507
  getRollupWatcher(root?: string): {
508
- listeners: Map<"close" | "change" | "event" | "restart", Array<(...parameters: any[]) => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>>>;
508
+ listeners: Map<"close" | "change" | "event" | "restart", Array<(...parameters: any[]) => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>>>;
509
509
  timer: any;
510
510
  on(event: "change", listener: (id: string, change: {
511
511
  event: "delete" | "update" | "create";
512
- }) => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>): /*elided*/ any;
513
- on(event: "event", listener: (data: rolldown.RolldownWatcherEvent) => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>): /*elided*/ any;
514
- on(event: "restart" | "close", listener: () => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>): /*elided*/ any;
515
- off(event: "close" | "change" | "event" | "restart", listener: (...parameters: any[]) => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>): /*elided*/ any;
512
+ }) => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>): /*elided*/ any;
513
+ on(event: "event", listener: (data: rolldown.RolldownWatcherEvent) => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>): /*elided*/ any;
514
+ on(event: "restart" | "close", listener: () => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>): /*elided*/ any;
515
+ off(event: "close" | "change" | "event" | "restart", listener: (...parameters: any[]) => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>): /*elided*/ any;
516
516
  clear(event: "close" | "change" | "event" | "restart"): void;
517
- onEvent(event: node_modules_rolldown_dist_shared_binding_9k0egz6L_mjs.BindingWatcherEvent): Promise<void>;
517
+ onEvent(event: node_modules_rolldown_dist_shared_binding_wK0CRIMb_mjs.BindingWatcherEvent): Promise<void>;
518
518
  close(): Promise<void>;
519
519
  } | undefined;
520
520
  setRollupWatcher(watcher: RolldownWatcher, root?: string): void;
@@ -9,8 +9,8 @@ import { Theme, Sitemap, App, Page, Component, Plugin } from '@weapp-core/schema
9
9
  import { DetectResult } from 'package-manager-detector';
10
10
  import { PackageJson } from 'pkg-types';
11
11
  import { LRUCache } from 'lru-cache';
12
- import * as node_modules_rolldown_dist_shared_binding_9k0egz6L_mjs from 'node_modules/rolldown/dist/shared/binding-9k0egz6L.mjs';
13
- import * as node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs from 'node_modules/rolldown/dist/shared/define-config-DVSr6Unb.mjs';
12
+ import * as node_modules_rolldown_dist_shared_binding_wK0CRIMb_mjs from 'node_modules/rolldown/dist/shared/binding-wK0CRIMb.mjs';
13
+ import * as node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs from 'node_modules/rolldown/dist/shared/define-config-wxvILtDx.mjs';
14
14
  import PQueue from 'p-queue';
15
15
  import { Buffer } from 'node:buffer';
16
16
 
@@ -329,16 +329,16 @@ declare class BuildService {
329
329
  private runDev;
330
330
  private runProd;
331
331
  build(options?: BuildOptions): Promise<{
332
- listeners: Map<"close" | "change" | "event" | "restart", Array<(...parameters: any[]) => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>>>;
332
+ listeners: Map<"close" | "change" | "event" | "restart", Array<(...parameters: any[]) => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>>>;
333
333
  timer: any;
334
334
  on(event: "change", listener: (id: string, change: {
335
335
  event: "delete" | "update" | "create";
336
- }) => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>): /*elided*/ any;
337
- on(event: "event", listener: (data: rolldown.RolldownWatcherEvent) => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>): /*elided*/ any;
338
- on(event: "restart" | "close", listener: () => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>): /*elided*/ any;
339
- off(event: "close" | "change" | "event" | "restart", listener: (...parameters: any[]) => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>): /*elided*/ any;
336
+ }) => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>): /*elided*/ any;
337
+ on(event: "event", listener: (data: rolldown.RolldownWatcherEvent) => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>): /*elided*/ any;
338
+ on(event: "restart" | "close", listener: () => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>): /*elided*/ any;
339
+ off(event: "close" | "change" | "event" | "restart", listener: (...parameters: any[]) => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>): /*elided*/ any;
340
340
  clear(event: "close" | "change" | "event" | "restart"): void;
341
- onEvent(event: node_modules_rolldown_dist_shared_binding_9k0egz6L_mjs.BindingWatcherEvent): Promise<void>;
341
+ onEvent(event: node_modules_rolldown_dist_shared_binding_wK0CRIMb_mjs.BindingWatcherEvent): Promise<void>;
342
342
  close(): Promise<void>;
343
343
  } | RolldownOutput | RolldownOutput[]>;
344
344
  }
@@ -505,16 +505,16 @@ declare class WatcherService {
505
505
  rollupWatcherMap: Map<string, RolldownWatcher>;
506
506
  constructor();
507
507
  getRollupWatcher(root?: string): {
508
- listeners: Map<"close" | "change" | "event" | "restart", Array<(...parameters: any[]) => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>>>;
508
+ listeners: Map<"close" | "change" | "event" | "restart", Array<(...parameters: any[]) => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>>>;
509
509
  timer: any;
510
510
  on(event: "change", listener: (id: string, change: {
511
511
  event: "delete" | "update" | "create";
512
- }) => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>): /*elided*/ any;
513
- on(event: "event", listener: (data: rolldown.RolldownWatcherEvent) => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>): /*elided*/ any;
514
- on(event: "restart" | "close", listener: () => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>): /*elided*/ any;
515
- off(event: "close" | "change" | "event" | "restart", listener: (...parameters: any[]) => node_modules_rolldown_dist_shared_define_config_DVSr6Unb_mjs.MaybePromise<void>): /*elided*/ any;
512
+ }) => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>): /*elided*/ any;
513
+ on(event: "event", listener: (data: rolldown.RolldownWatcherEvent) => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>): /*elided*/ any;
514
+ on(event: "restart" | "close", listener: () => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>): /*elided*/ any;
515
+ off(event: "close" | "change" | "event" | "restart", listener: (...parameters: any[]) => node_modules_rolldown_dist_shared_define_config_wxvILtDx_mjs.MaybePromise<void>): /*elided*/ any;
516
516
  clear(event: "close" | "change" | "event" | "restart"): void;
517
- onEvent(event: node_modules_rolldown_dist_shared_binding_9k0egz6L_mjs.BindingWatcherEvent): Promise<void>;
517
+ onEvent(event: node_modules_rolldown_dist_shared_binding_wK0CRIMb_mjs.BindingWatcherEvent): Promise<void>;
518
518
  close(): Promise<void>;
519
519
  } | undefined;
520
520
  setRollupWatcher(watcher: RolldownWatcher, root?: string): void;
package/dist/config.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { UserConfig, UserConfigExport, UserConfigFnObject } from 'vite';
2
- export { a as defineAppJson, c as defineComponentJson, d as defineConfig, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-DhcHHnhg.cjs';
2
+ export { a as defineAppJson, c as defineComponentJson, d as defineConfig, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-DtdFrcuN.cjs';
3
3
  export { App, Component, Page, Sitemap, Theme } from '@weapp-core/schematics';
4
4
  import 'rolldown';
5
5
  import 'tsdown';
@@ -9,7 +9,7 @@ import './types-D7SAXpSN.cjs';
9
9
  import 'package-manager-detector';
10
10
  import 'pkg-types';
11
11
  import 'lru-cache';
12
- import 'node_modules/rolldown/dist/shared/binding-9k0egz6L.mjs';
13
- import 'node_modules/rolldown/dist/shared/define-config-DVSr6Unb.mjs';
12
+ import 'node_modules/rolldown/dist/shared/binding-wK0CRIMb.mjs';
13
+ import 'node_modules/rolldown/dist/shared/define-config-wxvILtDx.mjs';
14
14
  import 'p-queue';
15
15
  import 'node:buffer';
package/dist/config.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { UserConfig, UserConfigExport, UserConfigFnObject } from 'vite';
2
- export { a as defineAppJson, c as defineComponentJson, d as defineConfig, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-BfKMzR4F.js';
2
+ export { a as defineAppJson, c as defineComponentJson, d as defineConfig, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-Djcp_la-.js';
3
3
  export { App, Component, Page, Sitemap, Theme } from '@weapp-core/schematics';
4
4
  import 'rolldown';
5
5
  import 'tsdown';
@@ -9,7 +9,7 @@ import './types-D7SAXpSN.js';
9
9
  import 'package-manager-detector';
10
10
  import 'pkg-types';
11
11
  import 'lru-cache';
12
- import 'node_modules/rolldown/dist/shared/binding-9k0egz6L.mjs';
13
- import 'node_modules/rolldown/dist/shared/define-config-DVSr6Unb.mjs';
12
+ import 'node_modules/rolldown/dist/shared/binding-wK0CRIMb.mjs';
13
+ import 'node_modules/rolldown/dist/shared/define-config-wxvILtDx.mjs';
14
14
  import 'p-queue';
15
15
  import 'node:buffer';
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkEFYTUTJGcjs = require('./chunk-EFYTUTJG.cjs');
4
+ var _chunkOCZPMHVCcjs = require('./chunk-OCZPMHVC.cjs');
5
5
 
6
6
 
7
7
  var _chunkZHSGQ3TNcjs = require('./chunk-ZHSGQ3TN.cjs');
@@ -19,7 +19,7 @@ var _chunkYO2542IPcjs = require('./chunk-YO2542IP.cjs');
19
19
 
20
20
  // src/index.ts
21
21
  _chunkYO2542IPcjs.init_cjs_shims.call(void 0, );
22
- var import_reflect_metadata = _chunkYO2542IPcjs.__toESM.call(void 0, _chunkEFYTUTJGcjs.require_Reflect.call(void 0, ), 1);
22
+ var import_reflect_metadata = _chunkYO2542IPcjs.__toESM.call(void 0, _chunkOCZPMHVCcjs.require_Reflect.call(void 0, ), 1);
23
23
 
24
24
 
25
25
 
@@ -28,4 +28,4 @@ var import_reflect_metadata = _chunkYO2542IPcjs.__toESM.call(void 0, _chunkEFYTU
28
28
 
29
29
 
30
30
 
31
- exports.createCompilerContext = _chunkEFYTUTJGcjs.createCompilerContext; exports.defineAppJson = _chunkMJC522YQcjs.defineAppJson; exports.defineComponentJson = _chunkMJC522YQcjs.defineComponentJson; exports.defineConfig = _chunkZHSGQ3TNcjs.defineConfig; exports.definePageJson = _chunkMJC522YQcjs.definePageJson; exports.defineSitemapJson = _chunkMJC522YQcjs.defineSitemapJson; exports.defineThemeJson = _chunkMJC522YQcjs.defineThemeJson;
31
+ exports.createCompilerContext = _chunkOCZPMHVCcjs.createCompilerContext; exports.defineAppJson = _chunkMJC522YQcjs.defineAppJson; exports.defineComponentJson = _chunkMJC522YQcjs.defineComponentJson; exports.defineConfig = _chunkZHSGQ3TNcjs.defineConfig; exports.definePageJson = _chunkMJC522YQcjs.definePageJson; exports.defineSitemapJson = _chunkMJC522YQcjs.defineSitemapJson; exports.defineThemeJson = _chunkMJC522YQcjs.defineThemeJson;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { L as LoadConfigOptions, C as CompilerContext } from './config-DhcHHnhg.cjs';
2
- export { a as defineAppJson, c as defineComponentJson, d as defineConfig, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-DhcHHnhg.cjs';
1
+ import { L as LoadConfigOptions, C as CompilerContext } from './config-DtdFrcuN.cjs';
2
+ export { a as defineAppJson, c as defineComponentJson, d as defineConfig, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-DtdFrcuN.cjs';
3
3
  export { App, Component, Page, Sitemap, Theme } from '@weapp-core/schematics';
4
4
  export { UserConfig, UserConfigExport, UserConfigFnObject } from 'vite';
5
5
  import 'rolldown';
@@ -10,8 +10,8 @@ import './types-D7SAXpSN.cjs';
10
10
  import 'package-manager-detector';
11
11
  import 'pkg-types';
12
12
  import 'lru-cache';
13
- import 'node_modules/rolldown/dist/shared/binding-9k0egz6L.mjs';
14
- import 'node_modules/rolldown/dist/shared/define-config-DVSr6Unb.mjs';
13
+ import 'node_modules/rolldown/dist/shared/binding-wK0CRIMb.mjs';
14
+ import 'node_modules/rolldown/dist/shared/define-config-wxvILtDx.mjs';
15
15
  import 'p-queue';
16
16
  import 'node:buffer';
17
17
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { L as LoadConfigOptions, C as CompilerContext } from './config-BfKMzR4F.js';
2
- export { a as defineAppJson, c as defineComponentJson, d as defineConfig, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-BfKMzR4F.js';
1
+ import { L as LoadConfigOptions, C as CompilerContext } from './config-Djcp_la-.js';
2
+ export { a as defineAppJson, c as defineComponentJson, d as defineConfig, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-Djcp_la-.js';
3
3
  export { App, Component, Page, Sitemap, Theme } from '@weapp-core/schematics';
4
4
  export { UserConfig, UserConfigExport, UserConfigFnObject } from 'vite';
5
5
  import 'rolldown';
@@ -10,8 +10,8 @@ import './types-D7SAXpSN.js';
10
10
  import 'package-manager-detector';
11
11
  import 'pkg-types';
12
12
  import 'lru-cache';
13
- import 'node_modules/rolldown/dist/shared/binding-9k0egz6L.mjs';
14
- import 'node_modules/rolldown/dist/shared/define-config-DVSr6Unb.mjs';
13
+ import 'node_modules/rolldown/dist/shared/binding-wK0CRIMb.mjs';
14
+ import 'node_modules/rolldown/dist/shared/define-config-wxvILtDx.mjs';
15
15
  import 'p-queue';
16
16
  import 'node:buffer';
17
17
 
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createCompilerContext,
3
3
  require_Reflect
4
- } from "./chunk-CHN5F7BL.mjs";
4
+ } from "./chunk-DYKCBHH7.mjs";
5
5
  import {
6
6
  defineConfig
7
7
  } from "./chunk-DRYEIGGG.mjs";
package/dist/json.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { App, Component, Page, Sitemap, Theme } from '@weapp-core/schematics';
2
- export { a as defineAppJson, c as defineComponentJson, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-DhcHHnhg.cjs';
2
+ export { a as defineAppJson, c as defineComponentJson, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-DtdFrcuN.cjs';
3
3
  import 'vite';
4
4
  import 'rolldown';
5
5
  import 'tsdown';
@@ -9,7 +9,7 @@ import './types-D7SAXpSN.cjs';
9
9
  import 'package-manager-detector';
10
10
  import 'pkg-types';
11
11
  import 'lru-cache';
12
- import 'node_modules/rolldown/dist/shared/binding-9k0egz6L.mjs';
13
- import 'node_modules/rolldown/dist/shared/define-config-DVSr6Unb.mjs';
12
+ import 'node_modules/rolldown/dist/shared/binding-wK0CRIMb.mjs';
13
+ import 'node_modules/rolldown/dist/shared/define-config-wxvILtDx.mjs';
14
14
  import 'p-queue';
15
15
  import 'node:buffer';
package/dist/json.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { App, Component, Page, Sitemap, Theme } from '@weapp-core/schematics';
2
- export { a as defineAppJson, c as defineComponentJson, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-BfKMzR4F.js';
2
+ export { a as defineAppJson, c as defineComponentJson, b as definePageJson, e as defineSitemapJson, f as defineThemeJson } from './config-Djcp_la-.js';
3
3
  import 'vite';
4
4
  import 'rolldown';
5
5
  import 'tsdown';
@@ -9,7 +9,7 @@ import './types-D7SAXpSN.js';
9
9
  import 'package-manager-detector';
10
10
  import 'pkg-types';
11
11
  import 'lru-cache';
12
- import 'node_modules/rolldown/dist/shared/binding-9k0egz6L.mjs';
13
- import 'node_modules/rolldown/dist/shared/define-config-DVSr6Unb.mjs';
12
+ import 'node_modules/rolldown/dist/shared/binding-wK0CRIMb.mjs';
13
+ import 'node_modules/rolldown/dist/shared/define-config-wxvILtDx.mjs';
14
14
  import 'p-queue';
15
15
  import 'node:buffer';
package/dist/types.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CompilerContext } from './config-DhcHHnhg.cjs';
2
- export { A as Alias, g as AliasOptions, v as AppEntry, m as AutoImportComponents, t as BaseEntry, B as BuildNpmPackageMeta, x as ComponentEntry, s as ComponentsMap, l as CopyGlobs, k as CopyOptions, o as EnhanceOptions, E as EnhanceWxmlOptions, u as Entry, y as EntryJsonFragment, h as GenerateDirsOptions, G as GenerateExtensionsOptions, i as GenerateFilenamesOptions, j as GenerateOptions, H as HandleWxmlOptions, M as MpPlatform, w as PageEntry, P as ProjectConfig, R as ResolvedAlias, r as ScanComponentItem, n as ScanWxmlOptions, S as SubPackage, p as SubPackageMetaValue, U as UserConfig, W as WeappViteConfig, q as WxmlDep } from './config-DhcHHnhg.cjs';
1
+ import { C as CompilerContext } from './config-DtdFrcuN.cjs';
2
+ export { A as Alias, g as AliasOptions, v as AppEntry, m as AutoImportComponents, t as BaseEntry, B as BuildNpmPackageMeta, x as ComponentEntry, s as ComponentsMap, l as CopyGlobs, k as CopyOptions, o as EnhanceOptions, E as EnhanceWxmlOptions, u as Entry, y as EntryJsonFragment, h as GenerateDirsOptions, G as GenerateExtensionsOptions, i as GenerateFilenamesOptions, j as GenerateOptions, H as HandleWxmlOptions, M as MpPlatform, w as PageEntry, P as ProjectConfig, R as ResolvedAlias, r as ScanComponentItem, n as ScanWxmlOptions, S as SubPackage, p as SubPackageMetaValue, U as UserConfig, W as WeappViteConfig, q as WxmlDep } from './config-DtdFrcuN.cjs';
3
3
  export { R as Resolver } from './types-D7SAXpSN.cjs';
4
4
  export { Options as NpmBuildOptions } from 'tsdown';
5
5
  import 'vite';
@@ -10,8 +10,8 @@ import '@weapp-core/schematics';
10
10
  import 'package-manager-detector';
11
11
  import 'pkg-types';
12
12
  import 'lru-cache';
13
- import 'node_modules/rolldown/dist/shared/binding-9k0egz6L.mjs';
14
- import 'node_modules/rolldown/dist/shared/define-config-DVSr6Unb.mjs';
13
+ import 'node_modules/rolldown/dist/shared/binding-wK0CRIMb.mjs';
14
+ import 'node_modules/rolldown/dist/shared/define-config-wxvILtDx.mjs';
15
15
  import 'p-queue';
16
16
  import 'node:buffer';
17
17
 
package/dist/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CompilerContext } from './config-BfKMzR4F.js';
2
- export { A as Alias, g as AliasOptions, v as AppEntry, m as AutoImportComponents, t as BaseEntry, B as BuildNpmPackageMeta, x as ComponentEntry, s as ComponentsMap, l as CopyGlobs, k as CopyOptions, o as EnhanceOptions, E as EnhanceWxmlOptions, u as Entry, y as EntryJsonFragment, h as GenerateDirsOptions, G as GenerateExtensionsOptions, i as GenerateFilenamesOptions, j as GenerateOptions, H as HandleWxmlOptions, M as MpPlatform, w as PageEntry, P as ProjectConfig, R as ResolvedAlias, r as ScanComponentItem, n as ScanWxmlOptions, S as SubPackage, p as SubPackageMetaValue, U as UserConfig, W as WeappViteConfig, q as WxmlDep } from './config-BfKMzR4F.js';
1
+ import { C as CompilerContext } from './config-Djcp_la-.js';
2
+ export { A as Alias, g as AliasOptions, v as AppEntry, m as AutoImportComponents, t as BaseEntry, B as BuildNpmPackageMeta, x as ComponentEntry, s as ComponentsMap, l as CopyGlobs, k as CopyOptions, o as EnhanceOptions, E as EnhanceWxmlOptions, u as Entry, y as EntryJsonFragment, h as GenerateDirsOptions, G as GenerateExtensionsOptions, i as GenerateFilenamesOptions, j as GenerateOptions, H as HandleWxmlOptions, M as MpPlatform, w as PageEntry, P as ProjectConfig, R as ResolvedAlias, r as ScanComponentItem, n as ScanWxmlOptions, S as SubPackage, p as SubPackageMetaValue, U as UserConfig, W as WeappViteConfig, q as WxmlDep } from './config-Djcp_la-.js';
3
3
  export { R as Resolver } from './types-D7SAXpSN.js';
4
4
  export { Options as NpmBuildOptions } from 'tsdown';
5
5
  import 'vite';
@@ -10,8 +10,8 @@ import '@weapp-core/schematics';
10
10
  import 'package-manager-detector';
11
11
  import 'pkg-types';
12
12
  import 'lru-cache';
13
- import 'node_modules/rolldown/dist/shared/binding-9k0egz6L.mjs';
14
- import 'node_modules/rolldown/dist/shared/define-config-DVSr6Unb.mjs';
13
+ import 'node_modules/rolldown/dist/shared/binding-wK0CRIMb.mjs';
14
+ import 'node_modules/rolldown/dist/shared/define-config-wxvILtDx.mjs';
15
15
  import 'p-queue';
16
16
  import 'node:buffer';
17
17
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "weapp-vite",
3
3
  "type": "module",
4
- "version": "5.1.4",
4
+ "version": "5.1.5",
5
5
  "description": "weapp-vite 一个现代化的小程序打包工具",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -78,29 +78,29 @@
78
78
  "node": ">=20.0.0"
79
79
  },
80
80
  "dependencies": {
81
- "@babel/core": "^7.28.3",
82
- "@babel/parser": "^7.28.3",
81
+ "@babel/core": "^7.28.4",
82
+ "@babel/parser": "^7.28.4",
83
83
  "@babel/preset-env": "^7.28.3",
84
84
  "@babel/preset-typescript": "^7.27.1",
85
- "@babel/traverse": "^7.28.3",
86
- "@babel/types": "^7.28.2",
85
+ "@babel/traverse": "^7.28.4",
86
+ "@babel/types": "^7.28.4",
87
87
  "comment-json": "^4.2.5",
88
88
  "debug": "^4.4.1",
89
89
  "fdir": "^6.5.0",
90
90
  "fs-extra": "^11.3.1",
91
- "oxc-parser": "^0.86.0",
91
+ "oxc-parser": "^0.87.0",
92
92
  "oxc-walker": "^0.4.0",
93
93
  "pathe": "^2.0.3",
94
94
  "picomatch": "^4.0.3",
95
95
  "postcss": "^8.5.6",
96
- "rolldown": "1.0.0-beta.34",
96
+ "rolldown": "1.0.0-beta.36",
97
97
  "tsdown": "^0.14.2",
98
- "vite": "npm:rolldown-vite@^7.1.5",
98
+ "vite": "npm:rolldown-vite@^7.1.8",
99
99
  "vite-tsconfig-paths": "^5.1.4",
100
- "@weapp-core/init": "2.1.2",
101
100
  "@weapp-core/logger": "2.0.0",
102
- "@weapp-core/schematics": "3.0.0",
101
+ "@weapp-core/init": "2.1.2",
103
102
  "@weapp-core/shared": "2.0.1",
103
+ "@weapp-core/schematics": "3.0.0",
104
104
  "@weapp-vite/volar": "0.0.1",
105
105
  "rolldown-require": "1.0.3",
106
106
  "vite-plugin-performance": "0.0.1",
@@ -111,7 +111,7 @@
111
111
  "registry": "https://registry.npmjs.org"
112
112
  },
113
113
  "devDependencies": {
114
- "@oxc-project/types": "^0.86.0",
114
+ "@oxc-project/types": "^0.87.0",
115
115
  "bundle-require": "^5.1.0",
116
116
  "cac": "^6.7.14",
117
117
  "chokidar": "^4.0.3",
@@ -122,13 +122,13 @@
122
122
  "inversify": "^7.9.1",
123
123
  "local-pkg": "^1.1.2",
124
124
  "lru-cache": "^11.2.1",
125
- "magic-string": "^0.30.18",
126
- "p-queue": "^8.1.0",
125
+ "magic-string": "^0.30.19",
126
+ "p-queue": "^8.1.1",
127
127
  "package-manager-detector": "^1.3.0",
128
128
  "reflect-metadata": "^0.2.2",
129
129
  "resolve.exports": "^2.0.3",
130
130
  "rimraf": "6.0.1",
131
- "ts-morph": "^26.0.0",
131
+ "ts-morph": "^27.0.0",
132
132
  "vue": "^3.5.21"
133
133
  },
134
134
  "scripts": {