weapp-vite 5.10.0 → 5.11.1

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.
@@ -3,7 +3,7 @@ import {
3
3
  __require,
4
4
  __toESM,
5
5
  init_esm_shims
6
- } from "./chunk-F7RWFAP5.mjs";
6
+ } from "./chunk-KYR4QU4G.mjs";
7
7
 
8
8
  // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js
9
9
  var require_debug = __commonJS({
@@ -1030,7 +1030,7 @@ init_esm_shims();
1030
1030
  import { removeExtensionDeep } from "@weapp-core/shared";
1031
1031
  import fs4 from "fs-extra";
1032
1032
 
1033
- // ../../node_modules/.pnpm/lru-cache@11.2.2/node_modules/lru-cache/dist/esm/index.js
1033
+ // ../../node_modules/.pnpm/lru-cache@11.2.4/node_modules/lru-cache/dist/esm/index.js
1034
1034
  init_esm_shims();
1035
1035
  var defaultPerf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
1036
1036
  var warned = /* @__PURE__ */ new Set();
@@ -1075,7 +1075,6 @@ if (typeof AC === "undefined") {
1075
1075
  };
1076
1076
  }
1077
1077
  var shouldWarn = (code) => !warned.has(code);
1078
- var TYPE = Symbol("type");
1079
1078
  var isPosInt = (n2) => n2 && n2 === Math.floor(n2) && n2 > 0 && isFinite(n2);
1080
1079
  var getUintArray = (max) => !isPosInt(max) ? null : max <= Math.pow(2, 8) ? Uint8Array : max <= Math.pow(2, 16) ? Uint16Array : max <= Math.pow(2, 32) ? Uint32Array : max <= Number.MAX_SAFE_INTEGER ? ZeroArray : null;
1081
1080
  var ZeroArray = class extends Array {
@@ -1203,6 +1202,7 @@ var LRUCache = class _LRUCache {
1203
1202
  #sizes;
1204
1203
  #starts;
1205
1204
  #ttls;
1205
+ #autopurgeTimers;
1206
1206
  #hasDispose;
1207
1207
  #hasFetchMethod;
1208
1208
  #hasDisposeAfter;
@@ -1221,6 +1221,7 @@ var LRUCache = class _LRUCache {
1221
1221
  // properties
1222
1222
  starts: c.#starts,
1223
1223
  ttls: c.#ttls,
1224
+ autopurgeTimers: c.#autopurgeTimers,
1224
1225
  sizes: c.#sizes,
1225
1226
  keyMap: c.#keyMap,
1226
1227
  keyList: c.#keyList,
@@ -1411,10 +1412,16 @@ var LRUCache = class _LRUCache {
1411
1412
  const starts = new ZeroArray(this.#max);
1412
1413
  this.#ttls = ttls;
1413
1414
  this.#starts = starts;
1415
+ const purgeTimers = this.ttlAutopurge ? new Array(this.#max) : void 0;
1416
+ this.#autopurgeTimers = purgeTimers;
1414
1417
  this.#setItemTTL = (index, ttl, start = this.#perf.now()) => {
1415
1418
  starts[index] = ttl !== 0 ? start : 0;
1416
1419
  ttls[index] = ttl;
1417
- if (ttl !== 0 && this.ttlAutopurge) {
1420
+ if (purgeTimers?.[index]) {
1421
+ clearTimeout(purgeTimers[index]);
1422
+ purgeTimers[index] = void 0;
1423
+ }
1424
+ if (ttl !== 0 && purgeTimers) {
1418
1425
  const t2 = setTimeout(() => {
1419
1426
  if (this.#isStale(index)) {
1420
1427
  this.#delete(this.#keyList[index], "expire");
@@ -1423,6 +1430,7 @@ var LRUCache = class _LRUCache {
1423
1430
  if (t2.unref) {
1424
1431
  t2.unref();
1425
1432
  }
1433
+ purgeTimers[index] = t2;
1426
1434
  }
1427
1435
  };
1428
1436
  this.#updateItemAge = (index) => {
@@ -1972,6 +1980,10 @@ var LRUCache = class _LRUCache {
1972
1980
  }
1973
1981
  }
1974
1982
  this.#removeItemSize(head);
1983
+ if (this.#autopurgeTimers?.[head]) {
1984
+ clearTimeout(this.#autopurgeTimers[head]);
1985
+ this.#autopurgeTimers[head] = void 0;
1986
+ }
1975
1987
  if (free) {
1976
1988
  this.#keyList[head] = void 0;
1977
1989
  this.#valList[head] = void 0;
@@ -2343,6 +2355,10 @@ var LRUCache = class _LRUCache {
2343
2355
  if (this.#size !== 0) {
2344
2356
  const index = this.#keyMap.get(k);
2345
2357
  if (index !== void 0) {
2358
+ if (this.#autopurgeTimers?.[index]) {
2359
+ clearTimeout(this.#autopurgeTimers?.[index]);
2360
+ this.#autopurgeTimers[index] = void 0;
2361
+ }
2346
2362
  deleted = true;
2347
2363
  if (this.#size === 1) {
2348
2364
  this.#clear(reason);
@@ -2413,6 +2429,11 @@ var LRUCache = class _LRUCache {
2413
2429
  if (this.#ttls && this.#starts) {
2414
2430
  this.#ttls.fill(0);
2415
2431
  this.#starts.fill(0);
2432
+ for (const t2 of this.#autopurgeTimers ?? []) {
2433
+ if (t2 !== void 0)
2434
+ clearTimeout(t2);
2435
+ }
2436
+ this.#autopurgeTimers?.fill(void 0);
2416
2437
  }
2417
2438
  if (this.#sizes) {
2418
2439
  this.#sizes.fill(0);
@@ -4303,18 +4324,18 @@ init_esm_shims();
4303
4324
  import fs6 from "fs";
4304
4325
  import process3 from "process";
4305
4326
 
4306
- // ../../node_modules/.pnpm/chokidar@4.0.3/node_modules/chokidar/esm/index.js
4327
+ // ../../node_modules/.pnpm/chokidar@5.0.0/node_modules/chokidar/index.js
4307
4328
  init_esm_shims();
4308
- import { stat as statcb } from "fs";
4309
- import { stat as stat3, readdir as readdir2 } from "fs/promises";
4310
4329
  import { EventEmitter } from "events";
4311
- import * as sysPath2 from "path";
4330
+ import { stat as statcb, Stats } from "fs";
4331
+ import { readdir as readdir2, stat as stat3 } from "fs/promises";
4332
+ import * as sp2 from "path";
4312
4333
 
4313
- // ../../node_modules/.pnpm/readdirp@4.1.2/node_modules/readdirp/esm/index.js
4334
+ // ../../node_modules/.pnpm/readdirp@5.0.0/node_modules/readdirp/index.js
4314
4335
  init_esm_shims();
4315
- import { stat, lstat, readdir, realpath } from "fs/promises";
4336
+ import { lstat, readdir, realpath, stat } from "fs/promises";
4337
+ import { join as pjoin, relative as prelative, resolve as presolve, sep as psep } from "path";
4316
4338
  import { Readable } from "stream";
4317
- import { resolve as presolve, relative as prelative, join as pjoin, sep as psep } from "path";
4318
4339
  var EntryTypes = {
4319
4340
  FILE_TYPE: "files",
4320
4341
  DIR_TYPE: "directories",
@@ -4369,6 +4390,20 @@ var normalizeFilter = (filter3) => {
4369
4390
  return emptyFn;
4370
4391
  };
4371
4392
  var ReaddirpStream = class extends Readable {
4393
+ parents;
4394
+ reading;
4395
+ parent;
4396
+ _stat;
4397
+ _maxDepth;
4398
+ _wantsDir;
4399
+ _wantsFile;
4400
+ _wantsEverything;
4401
+ _root;
4402
+ _isDirent;
4403
+ _statsProp;
4404
+ _rdOptions;
4405
+ _fileFilter;
4406
+ _directoryFilter;
4372
4407
  constructor(options = {}) {
4373
4408
  super({
4374
4409
  objectMode: true,
@@ -4385,7 +4420,7 @@ var ReaddirpStream = class extends Readable {
4385
4420
  } else {
4386
4421
  this._stat = statMethod;
4387
4422
  }
4388
- this._maxDepth = opts.depth ?? defaultOptions.depth;
4423
+ this._maxDepth = opts.depth != null && Number.isSafeInteger(opts.depth) ? opts.depth : defaultOptions.depth;
4389
4424
  this._wantsDir = type ? DIR_TYPES.has(type) : false;
4390
4425
  this._wantsFile = type ? FILE_TYPES.has(type) : false;
4391
4426
  this._wantsEverything = type === EntryTypes.EVERYTHING_TYPE;
@@ -4530,12 +4565,12 @@ function readdirp(root, options = {}) {
4530
4565
  return new ReaddirpStream(options);
4531
4566
  }
4532
4567
 
4533
- // ../../node_modules/.pnpm/chokidar@4.0.3/node_modules/chokidar/esm/handler.js
4568
+ // ../../node_modules/.pnpm/chokidar@5.0.0/node_modules/chokidar/handler.js
4534
4569
  init_esm_shims();
4535
- import { watchFile, unwatchFile, watch as fs_watch } from "fs";
4536
- import { open, stat as stat2, lstat as lstat2, realpath as fsrealpath } from "fs/promises";
4537
- import * as sysPath from "path";
4570
+ import { watch as fs_watch, unwatchFile, watchFile } from "fs";
4571
+ import { realpath as fsrealpath, lstat as lstat2, open, stat as stat2 } from "fs/promises";
4538
4572
  import { type as osType } from "os";
4573
+ import * as sp from "path";
4539
4574
  var STR_DATA = "data";
4540
4575
  var STR_END = "end";
4541
4576
  var STR_CLOSE = "close";
@@ -4828,7 +4863,7 @@ var binaryExtensions = /* @__PURE__ */ new Set([
4828
4863
  "zip",
4829
4864
  "zipx"
4830
4865
  ]);
4831
- var isBinaryPath = (filePath) => binaryExtensions.has(sysPath.extname(filePath).slice(1).toLowerCase());
4866
+ var isBinaryPath = (filePath) => binaryExtensions.has(sp.extname(filePath).slice(1).toLowerCase());
4832
4867
  var foreach = (val, fn) => {
4833
4868
  if (val instanceof Set) {
4834
4869
  val.forEach(fn);
@@ -4866,7 +4901,7 @@ function createFsWatchInstance(path37, options, listener, errHandler, emitRaw) {
4866
4901
  listener(path37);
4867
4902
  emitRaw(rawEvent, evPath, { watchedPath: path37 });
4868
4903
  if (evPath && path37 !== evPath) {
4869
- fsWatchBroadcast(sysPath.resolve(path37, evPath), KEY_LISTENERS, sysPath.join(path37, evPath));
4904
+ fsWatchBroadcast(sp.resolve(path37, evPath), KEY_LISTENERS, sp.join(path37, evPath));
4870
4905
  }
4871
4906
  };
4872
4907
  try {
@@ -4988,6 +5023,8 @@ var setFsWatchFileListener = (path37, fullPath, options, handlers) => {
4988
5023
  };
4989
5024
  };
4990
5025
  var NodeFsHandler = class {
5026
+ fsw;
5027
+ _boundHandleError;
4991
5028
  constructor(fsW) {
4992
5029
  this.fsw = fsW;
4993
5030
  this._boundHandleError = (error) => fsW._handleError(error);
@@ -5000,11 +5037,11 @@ var NodeFsHandler = class {
5000
5037
  */
5001
5038
  _watchWithNodeFs(path37, listener) {
5002
5039
  const opts = this.fsw.options;
5003
- const directory = sysPath.dirname(path37);
5004
- const basename4 = sysPath.basename(path37);
5040
+ const directory = sp.dirname(path37);
5041
+ const basename4 = sp.basename(path37);
5005
5042
  const parent = this.fsw._getWatchedDir(directory);
5006
5043
  parent.add(basename4);
5007
- const absolutePath = sysPath.resolve(path37);
5044
+ const absolutePath = sp.resolve(path37);
5008
5045
  const options = {
5009
5046
  persistent: opts.persistent
5010
5047
  };
@@ -5035,8 +5072,8 @@ var NodeFsHandler = class {
5035
5072
  if (this.fsw.closed) {
5036
5073
  return;
5037
5074
  }
5038
- const dirname5 = sysPath.dirname(file);
5039
- const basename4 = sysPath.basename(file);
5075
+ const dirname5 = sp.dirname(file);
5076
+ const basename4 = sp.basename(file);
5040
5077
  const parent = this.fsw._getWatchedDir(dirname5);
5041
5078
  let prevStats = stats;
5042
5079
  if (parent.has(basename4))
@@ -5127,8 +5164,9 @@ var NodeFsHandler = class {
5127
5164
  this.fsw._symlinkPaths.set(full, true);
5128
5165
  }
5129
5166
  _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
5130
- directory = sysPath.join(directory, "");
5131
- throttler = this.fsw._throttle("readdir", directory, 1e3);
5167
+ directory = sp.join(directory, "");
5168
+ const throttleKey = target ? `${directory}:${target}` : directory;
5169
+ throttler = this.fsw._throttle("readdir", throttleKey, 1e3);
5132
5170
  if (!throttler)
5133
5171
  return;
5134
5172
  const previous = this.fsw._getWatchedDir(wh.path);
@@ -5145,7 +5183,7 @@ var NodeFsHandler = class {
5145
5183
  return;
5146
5184
  }
5147
5185
  const item = entry.path;
5148
- let path37 = sysPath.join(directory, item);
5186
+ let path37 = sp.join(directory, item);
5149
5187
  current2.add(item);
5150
5188
  if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path37, item)) {
5151
5189
  return;
@@ -5156,7 +5194,7 @@ var NodeFsHandler = class {
5156
5194
  }
5157
5195
  if (item === target || !target && !previous.has(item)) {
5158
5196
  this.fsw._incrReadyCount();
5159
- path37 = sysPath.join(dir, sysPath.relative(dir, path37));
5197
+ path37 = sp.join(dir, sp.relative(dir, path37));
5160
5198
  this._addToNodeFs(path37, initialAdd, wh, depth + 1);
5161
5199
  }
5162
5200
  }).on(EV.ERROR, this._boundHandleError);
@@ -5193,12 +5231,12 @@ var NodeFsHandler = class {
5193
5231
  * @returns closer for the watcher instance.
5194
5232
  */
5195
5233
  async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath3) {
5196
- const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));
5197
- const tracked = parentDir.has(sysPath.basename(dir));
5234
+ const parentDir = this.fsw._getWatchedDir(sp.dirname(dir));
5235
+ const tracked = parentDir.has(sp.basename(dir));
5198
5236
  if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
5199
5237
  this.fsw._emit(EV.ADD_DIR, dir, stats);
5200
5238
  }
5201
- parentDir.add(sysPath.basename(dir));
5239
+ parentDir.add(sp.basename(dir));
5202
5240
  this.fsw._getWatchedDir(dir);
5203
5241
  let throttler;
5204
5242
  let closer;
@@ -5248,7 +5286,7 @@ var NodeFsHandler = class {
5248
5286
  const follow = this.fsw.options.followSymlinks;
5249
5287
  let closer;
5250
5288
  if (stats.isDirectory()) {
5251
- const absPath = sysPath.resolve(path37);
5289
+ const absPath = sp.resolve(path37);
5252
5290
  const targetPath = follow ? await fsrealpath(path37) : path37;
5253
5291
  if (this.fsw.closed)
5254
5292
  return;
@@ -5262,14 +5300,14 @@ var NodeFsHandler = class {
5262
5300
  const targetPath = follow ? await fsrealpath(path37) : path37;
5263
5301
  if (this.fsw.closed)
5264
5302
  return;
5265
- const parent = sysPath.dirname(wh.watchPath);
5303
+ const parent = sp.dirname(wh.watchPath);
5266
5304
  this.fsw._getWatchedDir(parent).add(wh.watchPath);
5267
5305
  this.fsw._emit(EV.ADD, wh.watchPath, stats);
5268
5306
  closer = await this._handleDir(parent, stats, initialAdd, depth, path37, wh, targetPath);
5269
5307
  if (this.fsw.closed)
5270
5308
  return;
5271
5309
  if (targetPath !== void 0) {
5272
- this.fsw._symlinkPaths.set(sysPath.resolve(path37), targetPath);
5310
+ this.fsw._symlinkPaths.set(sp.resolve(path37), targetPath);
5273
5311
  }
5274
5312
  } else {
5275
5313
  closer = this._handleFile(wh.watchPath, stats, initialAdd);
@@ -5287,14 +5325,14 @@ var NodeFsHandler = class {
5287
5325
  }
5288
5326
  };
5289
5327
 
5290
- // ../../node_modules/.pnpm/chokidar@4.0.3/node_modules/chokidar/esm/index.js
5328
+ // ../../node_modules/.pnpm/chokidar@5.0.0/node_modules/chokidar/index.js
5291
5329
  var SLASH = "/";
5292
5330
  var SLASH_SLASH = "//";
5293
5331
  var ONE_DOT = ".";
5294
5332
  var TWO_DOTS = "..";
5295
5333
  var STRING_TYPE = "string";
5296
5334
  var BACK_SLASH_RE = /\\/g;
5297
- var DOUBLE_SLASH_RE = /\/\//;
5335
+ var DOUBLE_SLASH_RE = /\/\//g;
5298
5336
  var DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
5299
5337
  var REPLACER_RE = /^\.[/\\]/;
5300
5338
  function arrify(item) {
@@ -5313,11 +5351,11 @@ function createPattern(matcher) {
5313
5351
  if (matcher.path === string)
5314
5352
  return true;
5315
5353
  if (matcher.recursive) {
5316
- const relative3 = sysPath2.relative(matcher.path, string);
5354
+ const relative3 = sp2.relative(matcher.path, string);
5317
5355
  if (!relative3) {
5318
5356
  return false;
5319
5357
  }
5320
- return !relative3.startsWith("..") && !sysPath2.isAbsolute(relative3);
5358
+ return !relative3.startsWith("..") && !sp2.isAbsolute(relative3);
5321
5359
  }
5322
5360
  return false;
5323
5361
  };
@@ -5327,14 +5365,12 @@ function createPattern(matcher) {
5327
5365
  function normalizePath(path37) {
5328
5366
  if (typeof path37 !== "string")
5329
5367
  throw new Error("string expected");
5330
- path37 = sysPath2.normalize(path37);
5368
+ path37 = sp2.normalize(path37);
5331
5369
  path37 = path37.replace(/\\/g, "/");
5332
5370
  let prepend = false;
5333
5371
  if (path37.startsWith("//"))
5334
5372
  prepend = true;
5335
- const DOUBLE_SLASH_RE2 = /\/\//;
5336
- while (path37.match(DOUBLE_SLASH_RE2))
5337
- path37 = path37.replace(DOUBLE_SLASH_RE2, "/");
5373
+ path37 = path37.replace(DOUBLE_SLASH_RE, "/");
5338
5374
  if (prepend)
5339
5375
  path37 = "/" + path37;
5340
5376
  return path37;
@@ -5375,30 +5411,31 @@ var toUnix = (string) => {
5375
5411
  if (str.startsWith(SLASH_SLASH)) {
5376
5412
  prepend = true;
5377
5413
  }
5378
- while (str.match(DOUBLE_SLASH_RE)) {
5379
- str = str.replace(DOUBLE_SLASH_RE, SLASH);
5380
- }
5414
+ str = str.replace(DOUBLE_SLASH_RE, SLASH);
5381
5415
  if (prepend) {
5382
5416
  str = SLASH + str;
5383
5417
  }
5384
5418
  return str;
5385
5419
  };
5386
- var normalizePathToUnix = (path37) => toUnix(sysPath2.normalize(toUnix(path37)));
5420
+ var normalizePathToUnix = (path37) => toUnix(sp2.normalize(toUnix(path37)));
5387
5421
  var normalizeIgnored = (cwd = "") => (path37) => {
5388
5422
  if (typeof path37 === "string") {
5389
- return normalizePathToUnix(sysPath2.isAbsolute(path37) ? path37 : sysPath2.join(cwd, path37));
5423
+ return normalizePathToUnix(sp2.isAbsolute(path37) ? path37 : sp2.join(cwd, path37));
5390
5424
  } else {
5391
5425
  return path37;
5392
5426
  }
5393
5427
  };
5394
5428
  var getAbsolutePath = (path37, cwd) => {
5395
- if (sysPath2.isAbsolute(path37)) {
5429
+ if (sp2.isAbsolute(path37)) {
5396
5430
  return path37;
5397
5431
  }
5398
- return sysPath2.join(cwd, path37);
5432
+ return sp2.join(cwd, path37);
5399
5433
  };
5400
5434
  var EMPTY_SET = Object.freeze(/* @__PURE__ */ new Set());
5401
5435
  var DirEntry = class {
5436
+ path;
5437
+ _removeWatcher;
5438
+ items;
5402
5439
  constructor(dir, removeWatcher) {
5403
5440
  this.path = dir;
5404
5441
  this._removeWatcher = removeWatcher;
@@ -5423,7 +5460,7 @@ var DirEntry = class {
5423
5460
  await readdir2(dir);
5424
5461
  } catch (err) {
5425
5462
  if (this._removeWatcher) {
5426
- this._removeWatcher(sysPath2.dirname(dir), sysPath2.basename(dir));
5463
+ this._removeWatcher(sp2.dirname(dir), sp2.basename(dir));
5427
5464
  }
5428
5465
  }
5429
5466
  }
@@ -5450,12 +5487,19 @@ var DirEntry = class {
5450
5487
  var STAT_METHOD_F = "stat";
5451
5488
  var STAT_METHOD_L = "lstat";
5452
5489
  var WatchHelper = class {
5490
+ fsw;
5491
+ path;
5492
+ watchPath;
5493
+ fullWatchPath;
5494
+ dirParts;
5495
+ followSymlinks;
5496
+ statMethod;
5453
5497
  constructor(path37, follow, fsw) {
5454
5498
  this.fsw = fsw;
5455
5499
  const watchPath = path37;
5456
5500
  this.path = path37 = path37.replace(REPLACER_RE, "");
5457
5501
  this.watchPath = watchPath;
5458
- this.fullWatchPath = sysPath2.resolve(watchPath);
5502
+ this.fullWatchPath = sp2.resolve(watchPath);
5459
5503
  this.dirParts = [];
5460
5504
  this.dirParts.forEach((parts) => {
5461
5505
  if (parts.length > 1)
@@ -5465,7 +5509,7 @@ var WatchHelper = class {
5465
5509
  this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
5466
5510
  }
5467
5511
  entryPath(entry) {
5468
- return sysPath2.join(this.watchPath, sysPath2.relative(this.watchPath, entry.fullPath));
5512
+ return sp2.join(this.watchPath, sp2.relative(this.watchPath, entry.fullPath));
5469
5513
  }
5470
5514
  filterPath(entry) {
5471
5515
  const { stats } = entry;
@@ -5479,6 +5523,24 @@ var WatchHelper = class {
5479
5523
  }
5480
5524
  };
5481
5525
  var FSWatcher = class extends EventEmitter {
5526
+ closed;
5527
+ options;
5528
+ _closers;
5529
+ _ignoredPaths;
5530
+ _throttled;
5531
+ _streams;
5532
+ _symlinkPaths;
5533
+ _watched;
5534
+ _pendingWrites;
5535
+ _pendingUnlinks;
5536
+ _readyCount;
5537
+ _emitReady;
5538
+ _closePromise;
5539
+ _userIgnored;
5540
+ _readyEmitted;
5541
+ _emitRaw;
5542
+ _boundRemove;
5543
+ _nodeFsHandler;
5482
5544
  // Not indenting methods for history sake; for now.
5483
5545
  constructor(_opts = {}) {
5484
5546
  super();
@@ -5597,7 +5659,7 @@ var FSWatcher = class extends EventEmitter {
5597
5659
  return;
5598
5660
  results.forEach((item) => {
5599
5661
  if (item)
5600
- this.add(sysPath2.dirname(item), sysPath2.basename(_origAdd || item));
5662
+ this.add(sp2.dirname(item), sp2.basename(_origAdd || item));
5601
5663
  });
5602
5664
  });
5603
5665
  return this;
@@ -5611,10 +5673,10 @@ var FSWatcher = class extends EventEmitter {
5611
5673
  const paths = unifyPaths(paths_);
5612
5674
  const { cwd } = this.options;
5613
5675
  paths.forEach((path37) => {
5614
- if (!sysPath2.isAbsolute(path37) && !this._closers.has(path37)) {
5676
+ if (!sp2.isAbsolute(path37) && !this._closers.has(path37)) {
5615
5677
  if (cwd)
5616
- path37 = sysPath2.join(cwd, path37);
5617
- path37 = sysPath2.resolve(path37);
5678
+ path37 = sp2.join(cwd, path37);
5679
+ path37 = sp2.resolve(path37);
5618
5680
  }
5619
5681
  this._closePath(path37);
5620
5682
  this._addIgnoredPath(path37);
@@ -5663,7 +5725,7 @@ var FSWatcher = class extends EventEmitter {
5663
5725
  getWatched() {
5664
5726
  const watchList = {};
5665
5727
  this._watched.forEach((entry, dir) => {
5666
- const key = this.options.cwd ? sysPath2.relative(this.options.cwd, dir) : dir;
5728
+ const key = this.options.cwd ? sp2.relative(this.options.cwd, dir) : dir;
5667
5729
  const index = key || ONE_DOT;
5668
5730
  watchList[index] = entry.getChildren().sort();
5669
5731
  });
@@ -5689,9 +5751,9 @@ var FSWatcher = class extends EventEmitter {
5689
5751
  return;
5690
5752
  const opts = this.options;
5691
5753
  if (isWindows)
5692
- path37 = sysPath2.normalize(path37);
5754
+ path37 = sp2.normalize(path37);
5693
5755
  if (opts.cwd)
5694
- path37 = sysPath2.relative(opts.cwd, path37);
5756
+ path37 = sp2.relative(opts.cwd, path37);
5695
5757
  const args = [path37];
5696
5758
  if (stats != null)
5697
5759
  args.push(stats);
@@ -5742,7 +5804,7 @@ var FSWatcher = class extends EventEmitter {
5742
5804
  return this;
5743
5805
  }
5744
5806
  if (opts.alwaysStat && stats === void 0 && (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
5745
- const fullPath = opts.cwd ? sysPath2.join(opts.cwd, path37) : path37;
5807
+ const fullPath = opts.cwd ? sp2.join(opts.cwd, path37) : path37;
5746
5808
  let stats2;
5747
5809
  try {
5748
5810
  stats2 = await stat3(fullPath);
@@ -5818,8 +5880,8 @@ var FSWatcher = class extends EventEmitter {
5818
5880
  const pollInterval = awf.pollInterval;
5819
5881
  let timeoutHandler;
5820
5882
  let fullPath = path37;
5821
- if (this.options.cwd && !sysPath2.isAbsolute(path37)) {
5822
- fullPath = sysPath2.join(this.options.cwd, path37);
5883
+ if (this.options.cwd && !sp2.isAbsolute(path37)) {
5884
+ fullPath = sp2.join(this.options.cwd, path37);
5823
5885
  }
5824
5886
  const now = /* @__PURE__ */ new Date();
5825
5887
  const writes = this._pendingWrites;
@@ -5889,7 +5951,7 @@ var FSWatcher = class extends EventEmitter {
5889
5951
  * @param directory path of the directory
5890
5952
  */
5891
5953
  _getWatchedDir(directory) {
5892
- const dir = sysPath2.resolve(directory);
5954
+ const dir = sp2.resolve(directory);
5893
5955
  if (!this._watched.has(dir))
5894
5956
  this._watched.set(dir, new DirEntry(dir, this._boundRemove));
5895
5957
  return this._watched.get(dir);
@@ -5912,8 +5974,8 @@ var FSWatcher = class extends EventEmitter {
5912
5974
  * @param item base path of item/directory
5913
5975
  */
5914
5976
  _remove(directory, item, isDirectory) {
5915
- const path37 = sysPath2.join(directory, item);
5916
- const fullPath = sysPath2.resolve(path37);
5977
+ const path37 = sp2.join(directory, item);
5978
+ const fullPath = sp2.resolve(path37);
5917
5979
  isDirectory = isDirectory != null ? isDirectory : this._watched.has(path37) || this._watched.has(fullPath);
5918
5980
  if (!this._throttle("remove", path37, 100))
5919
5981
  return;
@@ -5931,7 +5993,7 @@ var FSWatcher = class extends EventEmitter {
5931
5993
  }
5932
5994
  let relPath = path37;
5933
5995
  if (this.options.cwd)
5934
- relPath = sysPath2.relative(this.options.cwd, path37);
5996
+ relPath = sp2.relative(this.options.cwd, path37);
5935
5997
  if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
5936
5998
  const event = this._pendingWrites.get(relPath).cancelWait();
5937
5999
  if (event === EVENTS.ADD)
@@ -5949,8 +6011,8 @@ var FSWatcher = class extends EventEmitter {
5949
6011
  */
5950
6012
  _closePath(path37) {
5951
6013
  this._closeFile(path37);
5952
- const dir = sysPath2.dirname(path37);
5953
- this._getWatchedDir(dir).remove(sysPath2.basename(path37));
6014
+ const dir = sp2.dirname(path37);
6015
+ this._getWatchedDir(dir).remove(sp2.basename(path37));
5954
6016
  }
5955
6017
  /**
5956
6018
  * Closes only file-specific watchers
@@ -5995,7 +6057,7 @@ function watch(paths, options = {}) {
5995
6057
  watcher.add(paths);
5996
6058
  return watcher;
5997
6059
  }
5998
- var esm_default = { watch, FSWatcher };
6060
+ var chokidar_default = { watch, FSWatcher };
5999
6061
 
6000
6062
  // src/runtime/buildPlugin.ts
6001
6063
  import path11 from "pathe";
@@ -6908,7 +6970,7 @@ var path9 = {
6908
6970
  };
6909
6971
  var sep = defaultPlatform === "win32" ? path9.win32.sep : path9.posix.sep;
6910
6972
  minimatch.sep = sep;
6911
- var GLOBSTAR = Symbol("globstar **");
6973
+ var GLOBSTAR = /* @__PURE__ */ Symbol("globstar **");
6912
6974
  minimatch.GLOBSTAR = GLOBSTAR;
6913
6975
  var qmark2 = "[^/]";
6914
6976
  var star2 = qmark2 + "*?";
@@ -7597,37 +7659,37 @@ var isStream = (s) => !!s && typeof s === "object" && (s instanceof Minipass ||
7597
7659
  var isReadable = (s) => !!s && typeof s === "object" && s instanceof EventEmitter2 && typeof s.pipe === "function" && // node core Writable streams have a pipe() method, but it throws
7598
7660
  s.pipe !== Stream.Writable.prototype.pipe;
7599
7661
  var isWritable = (s) => !!s && typeof s === "object" && s instanceof EventEmitter2 && typeof s.write === "function" && typeof s.end === "function";
7600
- var EOF = Symbol("EOF");
7601
- var MAYBE_EMIT_END = Symbol("maybeEmitEnd");
7602
- var EMITTED_END = Symbol("emittedEnd");
7603
- var EMITTING_END = Symbol("emittingEnd");
7604
- var EMITTED_ERROR = Symbol("emittedError");
7605
- var CLOSED = Symbol("closed");
7606
- var READ = Symbol("read");
7607
- var FLUSH = Symbol("flush");
7608
- var FLUSHCHUNK = Symbol("flushChunk");
7609
- var ENCODING = Symbol("encoding");
7610
- var DECODER = Symbol("decoder");
7611
- var FLOWING = Symbol("flowing");
7612
- var PAUSED = Symbol("paused");
7613
- var RESUME = Symbol("resume");
7614
- var BUFFER = Symbol("buffer");
7615
- var PIPES = Symbol("pipes");
7616
- var BUFFERLENGTH = Symbol("bufferLength");
7617
- var BUFFERPUSH = Symbol("bufferPush");
7618
- var BUFFERSHIFT = Symbol("bufferShift");
7619
- var OBJECTMODE = Symbol("objectMode");
7620
- var DESTROYED = Symbol("destroyed");
7621
- var ERROR = Symbol("error");
7622
- var EMITDATA = Symbol("emitData");
7623
- var EMITEND = Symbol("emitEnd");
7624
- var EMITEND2 = Symbol("emitEnd2");
7625
- var ASYNC = Symbol("async");
7626
- var ABORT = Symbol("abort");
7627
- var ABORTED = Symbol("aborted");
7628
- var SIGNAL = Symbol("signal");
7629
- var DATALISTENERS = Symbol("dataListeners");
7630
- var DISCARDED = Symbol("discarded");
7662
+ var EOF = /* @__PURE__ */ Symbol("EOF");
7663
+ var MAYBE_EMIT_END = /* @__PURE__ */ Symbol("maybeEmitEnd");
7664
+ var EMITTED_END = /* @__PURE__ */ Symbol("emittedEnd");
7665
+ var EMITTING_END = /* @__PURE__ */ Symbol("emittingEnd");
7666
+ var EMITTED_ERROR = /* @__PURE__ */ Symbol("emittedError");
7667
+ var CLOSED = /* @__PURE__ */ Symbol("closed");
7668
+ var READ = /* @__PURE__ */ Symbol("read");
7669
+ var FLUSH = /* @__PURE__ */ Symbol("flush");
7670
+ var FLUSHCHUNK = /* @__PURE__ */ Symbol("flushChunk");
7671
+ var ENCODING = /* @__PURE__ */ Symbol("encoding");
7672
+ var DECODER = /* @__PURE__ */ Symbol("decoder");
7673
+ var FLOWING = /* @__PURE__ */ Symbol("flowing");
7674
+ var PAUSED = /* @__PURE__ */ Symbol("paused");
7675
+ var RESUME = /* @__PURE__ */ Symbol("resume");
7676
+ var BUFFER = /* @__PURE__ */ Symbol("buffer");
7677
+ var PIPES = /* @__PURE__ */ Symbol("pipes");
7678
+ var BUFFERLENGTH = /* @__PURE__ */ Symbol("bufferLength");
7679
+ var BUFFERPUSH = /* @__PURE__ */ Symbol("bufferPush");
7680
+ var BUFFERSHIFT = /* @__PURE__ */ Symbol("bufferShift");
7681
+ var OBJECTMODE = /* @__PURE__ */ Symbol("objectMode");
7682
+ var DESTROYED = /* @__PURE__ */ Symbol("destroyed");
7683
+ var ERROR = /* @__PURE__ */ Symbol("error");
7684
+ var EMITDATA = /* @__PURE__ */ Symbol("emitData");
7685
+ var EMITEND = /* @__PURE__ */ Symbol("emitEnd");
7686
+ var EMITEND2 = /* @__PURE__ */ Symbol("emitEnd2");
7687
+ var ASYNC = /* @__PURE__ */ Symbol("async");
7688
+ var ABORT = /* @__PURE__ */ Symbol("abort");
7689
+ var ABORTED = /* @__PURE__ */ Symbol("aborted");
7690
+ var SIGNAL = /* @__PURE__ */ Symbol("signal");
7691
+ var DATALISTENERS = /* @__PURE__ */ Symbol("dataListeners");
7692
+ var DISCARDED = /* @__PURE__ */ Symbol("discarded");
7631
7693
  var defer = (fn) => Promise.resolve().then(fn);
7632
7694
  var nodefer = (fn) => fn();
7633
7695
  var isEndish = (ev) => ev === "end" || ev === "finish" || ev === "prefinish";
@@ -8540,7 +8602,7 @@ var ChildrenCache = class extends LRUCache {
8540
8602
  });
8541
8603
  }
8542
8604
  };
8543
- var setAsCwd = Symbol("PathScurry setAsCwd");
8605
+ var setAsCwd = /* @__PURE__ */ Symbol("PathScurry setAsCwd");
8544
8606
  var PathBase = class {
8545
8607
  /**
8546
8608
  * the basename of this path
@@ -11749,9 +11811,9 @@ var rimrafWindowsDirMoveRemoveFallbackSync = (path37, { filter: filter3, ...opt
11749
11811
  throw er;
11750
11812
  }
11751
11813
  };
11752
- var START = Symbol("start");
11753
- var CHILD = Symbol("child");
11754
- var FINISH = Symbol("finish");
11814
+ var START = /* @__PURE__ */ Symbol("start");
11815
+ var CHILD = /* @__PURE__ */ Symbol("child");
11816
+ var FINISH = /* @__PURE__ */ Symbol("finish");
11755
11817
  var rimrafWindows = async (path37, opt) => {
11756
11818
  opt?.signal?.throwIfAborted();
11757
11819
  return await ignoreENOENT(lstat6(path37).then((stat5) => rimrafWindowsDir(path37, opt, stat5, START))) ?? true;
@@ -13003,7 +13065,7 @@ function createBuildService(ctx) {
13003
13065
  const isTestEnv = process3.env.VITEST === "true" || process3.env.NODE_ENV === "test";
13004
13066
  if (target === "app" && hasWorkersDir && workersDir && !isTestEnv) {
13005
13067
  const absWorkerRoot = path11.resolve(configService.absoluteSrcRoot, workersDir);
13006
- const workerWatcher = esm_default.watch(
13068
+ const workerWatcher = chokidar_default.watch(
13007
13069
  absWorkerRoot,
13008
13070
  {
13009
13071
  persistent: true,
@@ -18867,7 +18929,6 @@ function joinURL(base, ...input) {
18867
18929
  }
18868
18930
  return url;
18869
18931
  }
18870
- var protocolRelative = Symbol.for("ufo:protocolRelative");
18871
18932
 
18872
18933
  // ../../node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist/index.mjs
18873
18934
  import { normalize as normalize3, isAbsolute as isAbsolute2, extname as extname$1 } from "pathe";
@@ -20221,7 +20282,7 @@ init_esm_shims();
20221
20282
 
20222
20283
  // ../../node_modules/.pnpm/quansync@0.2.11/node_modules/quansync/dist/index.mjs
20223
20284
  init_esm_shims();
20224
- var GET_IS_ASYNC = Symbol.for("quansync.getIsAsync");
20285
+ var GET_IS_ASYNC = /* @__PURE__ */ Symbol.for("quansync.getIsAsync");
20225
20286
  var QuansyncError = class extends Error {
20226
20287
  constructor(message = "Unexpected promise in sync context") {
20227
20288
  super(message);
@@ -20466,13 +20527,13 @@ var isPackageListed = quansync2(function* (name, cwd) {
20466
20527
  });
20467
20528
  var isPackageListedSync = isPackageListed.sync;
20468
20529
 
20469
- // ../../node_modules/.pnpm/package-manager-detector@1.5.0/node_modules/package-manager-detector/dist/detect.mjs
20530
+ // ../../node_modules/.pnpm/package-manager-detector@1.6.0/node_modules/package-manager-detector/dist/detect.mjs
20470
20531
  init_esm_shims();
20471
20532
  import fs9 from "fs/promises";
20472
20533
  import path14 from "path";
20473
20534
  import process5 from "process";
20474
20535
 
20475
- // ../../node_modules/.pnpm/package-manager-detector@1.5.0/node_modules/package-manager-detector/dist/constants.mjs
20536
+ // ../../node_modules/.pnpm/package-manager-detector@1.6.0/node_modules/package-manager-detector/dist/constants.mjs
20476
20537
  init_esm_shims();
20477
20538
  var AGENTS = [
20478
20539
  "npm",
@@ -20509,7 +20570,7 @@ var INSTALL_METADATA = {
20509
20570
  "bun.lockb": "bun"
20510
20571
  };
20511
20572
 
20512
- // ../../node_modules/.pnpm/package-manager-detector@1.5.0/node_modules/package-manager-detector/dist/detect.mjs
20573
+ // ../../node_modules/.pnpm/package-manager-detector@1.6.0/node_modules/package-manager-detector/dist/detect.mjs
20513
20574
  async function pathExists(path210, type) {
20514
20575
  try {
20515
20576
  const stat5 = await fs9.stat(path210);
@@ -20526,14 +20587,15 @@ function* lookup(cwd = process5.cwd()) {
20526
20587
  directory = path14.dirname(directory);
20527
20588
  }
20528
20589
  }
20529
- async function parsePackageJson(filepath, onUnknown) {
20530
- return !filepath || !pathExists(filepath, "file") ? null : await handlePackageManager(filepath, onUnknown);
20590
+ async function parsePackageJson(filepath, options) {
20591
+ if (!filepath || !await pathExists(filepath, "file"))
20592
+ return null;
20593
+ return await handlePackageManager(filepath, options);
20531
20594
  }
20532
20595
  async function detect(options = {}) {
20533
20596
  const {
20534
20597
  cwd,
20535
- strategies = ["lockfile", "packageManager-field", "devEngines-field"],
20536
- onUnknown
20598
+ strategies = ["lockfile", "packageManager-field", "devEngines-field"]
20537
20599
  } = options;
20538
20600
  let stopDir;
20539
20601
  if (typeof options.stopDir === "string") {
@@ -20549,7 +20611,7 @@ async function detect(options = {}) {
20549
20611
  for (const lock of Object.keys(LOCKS)) {
20550
20612
  if (await pathExists(path14.join(directory, lock), "file")) {
20551
20613
  const name = LOCKS[lock];
20552
- const result = await parsePackageJson(path14.join(directory, "package.json"), onUnknown);
20614
+ const result = await parsePackageJson(path14.join(directory, "package.json"), options);
20553
20615
  if (result)
20554
20616
  return result;
20555
20617
  else
@@ -20560,7 +20622,7 @@ async function detect(options = {}) {
20560
20622
  }
20561
20623
  case "packageManager-field":
20562
20624
  case "devEngines-field": {
20563
- const result = await parsePackageJson(path14.join(directory, "package.json"), onUnknown);
20625
+ const result = await parsePackageJson(path14.join(directory, "package.json"), options);
20564
20626
  if (result)
20565
20627
  return result;
20566
20628
  break;
@@ -20597,9 +20659,10 @@ function getNameAndVer(pkg) {
20597
20659
  }
20598
20660
  return void 0;
20599
20661
  }
20600
- async function handlePackageManager(filepath, onUnknown) {
20662
+ async function handlePackageManager(filepath, options) {
20601
20663
  try {
20602
- const pkg = JSON.parse(await fs9.readFile(filepath, "utf8"));
20664
+ const content = await fs9.readFile(filepath, "utf8");
20665
+ const pkg = options.packageJsonParser ? await options.packageJsonParser(content, filepath) : JSON.parse(content);
20603
20666
  let agent;
20604
20667
  const nameAndVer = getNameAndVer(pkg);
20605
20668
  if (nameAndVer) {
@@ -20617,7 +20680,7 @@ async function handlePackageManager(filepath, onUnknown) {
20617
20680
  agent = name;
20618
20681
  return { name, agent, version: version2 };
20619
20682
  } else {
20620
- return onUnknown?.(pkg.packageManager) ?? null;
20683
+ return options.onUnknown?.(pkg.packageManager) ?? null;
20621
20684
  }
20622
20685
  }
20623
20686
  } catch {
@@ -23997,7 +24060,7 @@ function ensureSidecarWatcher(ctx, rootDir) {
23997
24060
  ...templateExtensions.map((ext2) => path25.join(absRoot, `**/*.${ext2}`))
23998
24061
  ];
23999
24062
  const ignoredMatcher = createSidecarIgnoredMatcher(ctx, absRoot);
24000
- const watcher = esm_default.watch(patterns, {
24063
+ const watcher = chokidar_default.watch(patterns, {
24001
24064
  ignoreInitial: false,
24002
24065
  persistent: true,
24003
24066
  awaitWriteFinish: {
@@ -24640,6 +24703,47 @@ function createCoreLifecyclePlugin(state) {
24640
24703
  const duplicateWarningBytes = Number(configService.weappViteConfig?.chunks?.duplicateWarningBytes ?? 0);
24641
24704
  const shouldWarnOnDuplicate = Number.isFinite(duplicateWarningBytes) && duplicateWarningBytes > 0;
24642
24705
  let redundantBytesTotal = 0;
24706
+ const resolveSharedChunkLabel = (sharedFileName, finalFileName) => {
24707
+ const prettifyModuleLabel = (label) => {
24708
+ const normalized = label.replace(/\\/g, "/");
24709
+ const match2 = normalized.match(/node_modules\/(?:\.pnpm\/[^/]+\/node_modules\/)?(.+)/);
24710
+ return match2?.[1] || label;
24711
+ };
24712
+ const candidates = [];
24713
+ const collect = (output) => {
24714
+ if (output?.type === "chunk") {
24715
+ candidates.push(output);
24716
+ }
24717
+ };
24718
+ collect(bundle[sharedFileName]);
24719
+ if (finalFileName !== sharedFileName) {
24720
+ collect(bundle[finalFileName]);
24721
+ }
24722
+ if (!candidates.length) {
24723
+ const matched = Object.values(bundle).find(
24724
+ (output) => output?.type === "chunk" && ((output.fileName ?? "") === finalFileName || (output.fileName ?? "") === sharedFileName)
24725
+ );
24726
+ if (matched) {
24727
+ candidates.push(matched);
24728
+ }
24729
+ }
24730
+ const chunk = candidates[0];
24731
+ if (!chunk) {
24732
+ return finalFileName;
24733
+ }
24734
+ const moduleLabels = Array.from(
24735
+ new Set(
24736
+ Object.keys(chunk.modules ?? {}).filter((id) => id && !id.startsWith("\0")).map((id) => configService.relativeAbsoluteSrcRoot(id)).filter(Boolean)
24737
+ )
24738
+ );
24739
+ if (!moduleLabels.length) {
24740
+ return chunk.fileName || finalFileName;
24741
+ }
24742
+ const preview = moduleLabels.map(prettifyModuleLabel).slice(0, 3);
24743
+ const remaining = moduleLabels.length - preview.length;
24744
+ const suffix = remaining > 0 ? ` \u7B49 ${moduleLabels.length} \u4E2A\u6A21\u5757` : "";
24745
+ return `${preview.join("\u3001")}${suffix}`;
24746
+ };
24643
24747
  const handleDuplicate = shouldLogChunks || shouldWarnOnDuplicate ? ({ duplicates, ignoredMainImporters, chunkBytes, redundantBytes, retainedInMain, sharedFileName }) => {
24644
24748
  if (shouldWarnOnDuplicate) {
24645
24749
  const duplicateCount = duplicates.length;
@@ -24668,7 +24772,7 @@ function createCoreLifecyclePlugin(state) {
24668
24772
  strategy: sharedStrategy,
24669
24773
  subPackageRoots,
24670
24774
  onDuplicate: handleDuplicate,
24671
- onFallback: shouldLogChunks ? ({ reason, importers }) => {
24775
+ onFallback: shouldLogChunks ? ({ reason, importers, sharedFileName, finalFileName }) => {
24672
24776
  const involvedSubs = /* @__PURE__ */ new Set();
24673
24777
  let hasMainReference = false;
24674
24778
  for (const importer of importers) {
@@ -24687,10 +24791,11 @@ function createCoreLifecyclePlugin(state) {
24687
24791
  segments.push("\u4E3B\u5305");
24688
24792
  }
24689
24793
  const scope = segments.join("\u3001") || "\u4E3B\u5305";
24794
+ const sharedChunkLabel = resolveSharedChunkLabel(sharedFileName, finalFileName);
24690
24795
  if (reason === "main-package") {
24691
- logger_default.info(`[subpackages] ${scope} \u5171\u4EAB\u6A21\u5757\uFF08${importers.length} \u5904\u5F15\u7528\uFF09\u5DF2\u63D0\u5347\u5230\u4E3B\u5305 common.js`);
24796
+ logger_default.info(`[subpackages] ${scope} \u5171\u4EAB\u6A21\u5757 ${sharedChunkLabel}\uFF08${importers.length} \u5904\u5F15\u7528\uFF09\u5DF2\u63D0\u5347\u5230\u4E3B\u5305 common.js`);
24692
24797
  } else {
24693
- logger_default.info(`[subpackages] \u4EC5\u4E3B\u5305\u4F7F\u7528\u5171\u4EAB\u6A21\u5757\uFF08${importers.length} \u5904\u5F15\u7528\uFF09\uFF0C\u4FDD\u7559\u5728\u4E3B\u5305 common.js`);
24798
+ logger_default.info(`[subpackages] \u4EC5\u4E3B\u5305\u4F7F\u7528\u5171\u4EAB\u6A21\u5757 ${sharedChunkLabel}\uFF08${importers.length} \u5904\u5F15\u7528\uFF09\uFF0C\u4FDD\u7559\u5728\u4E3B\u5305 common.js`);
24694
24799
  }
24695
24800
  } : void 0
24696
24801
  });
@@ -25529,7 +25634,7 @@ function wxs(ctx) {
25529
25634
  }
25530
25635
 
25531
25636
  // src/plugins/index.ts
25532
- var RUNTIME_PLUGINS_SYMBOL = Symbol.for("weapp-runtime:plugins");
25637
+ var RUNTIME_PLUGINS_SYMBOL = /* @__PURE__ */ Symbol.for("weapp-runtime:plugins");
25533
25638
  var WEAPP_VITE_CONTEXT_PLUGIN_NAME = "weapp-vite:context";
25534
25639
  function createContextPlugin(ctx) {
25535
25640
  return {
@@ -26166,6 +26271,7 @@ function createJsonService(ctx) {
26166
26271
  require: customRequire,
26167
26272
  rolldownOptions: {
26168
26273
  input: {
26274
+ // @ts-ignore
26169
26275
  define: ctx.configService.defineImportMetaEnv
26170
26276
  },
26171
26277
  output: {
@@ -26885,7 +26991,7 @@ var PQueue = class extends import_index2.default {
26885
26991
  ...options
26886
26992
  };
26887
26993
  return new Promise((resolve8, reject) => {
26888
- const taskSymbol = Symbol(`task-${options.id}`);
26994
+ const taskSymbol = /* @__PURE__ */ Symbol(`task-${options.id}`);
26889
26995
  this.#queue.enqueue(async () => {
26890
26996
  this.#pending++;
26891
26997
  this.#runningTasks.set(taskSymbol, {
@@ -30841,7 +30947,7 @@ function createCompilerContextInstance() {
30841
30947
  createBuildServicePlugin(context),
30842
30948
  createWebServicePlugin(context)
30843
30949
  ];
30844
- Object.defineProperty(context, Symbol.for("weapp-runtime:plugins"), {
30950
+ Object.defineProperty(context, /* @__PURE__ */ Symbol.for("weapp-runtime:plugins"), {
30845
30951
  configurable: false,
30846
30952
  enumerable: false,
30847
30953
  writable: false,
@@ -30894,6 +31000,6 @@ export {
30894
31000
  };
30895
31001
  /*! Bundled license information:
30896
31002
 
30897
- chokidar/esm/index.js:
31003
+ chokidar/index.js:
30898
31004
  (*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) *)
30899
31005
  */