@rolldown/browser 1.0.0-beta.45 → 1.0.0-beta.47

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.
@@ -41,6 +41,11 @@ function getCodeFrame(source, line, column) {
41
41
 
42
42
  //#endregion
43
43
  //#region src/utils/style-text.ts
44
+ /**
45
+ * Cross-platform styleText utility that works in both Node.js and browser environments
46
+ * In Node.js, it uses the native `styleText` from `node:util`
47
+ * In browser, it provides empty styling functions for compatibility
48
+ */
44
49
  function styleText$1(...args) {
45
50
  return styleText(...args);
46
51
  }
@@ -217,7 +222,7 @@ function augmentCodeLocation(properties, pos, source, id) {
217
222
  }
218
223
 
219
224
  //#endregion
220
- //#region ../../node_modules/.pnpm/oxc-parser@0.95.0/node_modules/oxc-parser/src-js/wrap.js
225
+ //#region ../../node_modules/.pnpm/oxc-parser@0.96.0/node_modules/oxc-parser/src-js/wrap.js
221
226
  function wrap$1(result) {
222
227
  let program, module, comments, errors;
223
228
  return {
@@ -250,7 +255,7 @@ function applyFix(program, fixPath) {
250
255
  if (node.bigint) node.value = BigInt(node.bigint);
251
256
  else try {
252
257
  node.value = RegExp(node.regex.pattern, node.regex.flags);
253
- } catch (_err) {}
258
+ } catch {}
254
259
  }
255
260
 
256
261
  //#endregion
@@ -1,4 +1,4 @@
1
- import { a as logCycleLoading, c as logDeprecatedInject, d as logInputHookInOutputPlugin, f as logInvalidLogPosition, h as styleText, i as error, l as logDeprecatedKeepNames, m as logPluginError, o as logDeprecatedDefine, p as logMultiplyNotifyOption, r as augmentCodeLocation, s as logDeprecatedDropLabels, t as parseAst, u as logDeprecatedProfilerNames } from "./parse-ast-index-Ck5SwMSC.mjs";
1
+ import { a as logCycleLoading, c as logDeprecatedInject, d as logInputHookInOutputPlugin, f as logInvalidLogPosition, h as styleText, i as error, l as logDeprecatedKeepNames, m as logPluginError, o as logDeprecatedDefine, p as logMultiplyNotifyOption, r as augmentCodeLocation, s as logDeprecatedDropLabels, t as parseAst, u as logDeprecatedProfilerNames } from "./parse-ast-index-BiBzSGZe.mjs";
2
2
  import { a as include, c as or, d as arraify, g as unsupported, h as unreachable, i as id, m as unimplemented, n as code, o as moduleType, p as noop, r as exclude, t as and } from "./composable-filters-D_PY7Qa7.mjs";
3
3
  import { Worker, isMainThread } from "node:worker_threads";
4
4
  import { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingMagicString as BindingMagicString$1, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, BindingWatcher, ParallelJsPluginRegistry, initTraceSubscriber, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
@@ -217,7 +217,7 @@ if (isMainThread) {
217
217
 
218
218
  //#endregion
219
219
  //#region package.json
220
- var version = "1.0.0-beta.45";
220
+ var version = "1.0.0-beta.47";
221
221
  var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
222
222
 
223
223
  //#endregion
@@ -2136,19 +2136,63 @@ function getCliSchemaInfo() {
2136
2136
  }
2137
2137
 
2138
2138
  //#endregion
2139
- //#region src/types/sourcemap.ts
2140
- function bindingifySourcemap$1(map) {
2141
- if (map == null) return;
2142
- return { inner: typeof map === "string" ? map : {
2143
- file: map.file ?? void 0,
2144
- mappings: map.mappings,
2145
- sourceRoot: "sourceRoot" in map ? map.sourceRoot ?? void 0 : void 0,
2146
- sources: map.sources?.map((s) => s ?? void 0),
2147
- sourcesContent: map.sourcesContent?.map((s) => s ?? void 0),
2148
- names: map.names,
2149
- x_google_ignoreList: map.x_google_ignoreList,
2150
- debugId: "debugId" in map ? map.debugId : void 0
2151
- } };
2139
+ //#region src/decorators/lazy.ts
2140
+ const LAZY_FIELDS_KEY = Symbol("__lazy_fields__");
2141
+ const LAZY_CACHE_PREFIX = "__cached_";
2142
+ /**
2143
+ * Legacy decorator that makes a getter lazy-evaluated and cached.
2144
+ * Also auto-registers the field for batch prefetching.
2145
+ *
2146
+ * @example
2147
+ * ```typescript
2148
+ * class MyClass {
2149
+ * @lazy
2150
+ * get expensiveValue() {
2151
+ * return someExpensiveComputation();
2152
+ * }
2153
+ * }
2154
+ * ```
2155
+ */
2156
+ function lazy(target, propertyKey, descriptor) {
2157
+ if (!target.constructor[LAZY_FIELDS_KEY]) target.constructor[LAZY_FIELDS_KEY] = /* @__PURE__ */ new Set();
2158
+ target.constructor[LAZY_FIELDS_KEY].add(propertyKey);
2159
+ const originalGetter = descriptor.get;
2160
+ const cacheKey = LAZY_CACHE_PREFIX + propertyKey;
2161
+ descriptor.get = function() {
2162
+ if (!(cacheKey in this)) this[cacheKey] = originalGetter.call(this);
2163
+ return this[cacheKey];
2164
+ };
2165
+ return descriptor;
2166
+ }
2167
+ /**
2168
+ * Get all lazy field names from a class instance.
2169
+ *
2170
+ * @param instance - Instance to inspect
2171
+ * @returns Set of lazy property names
2172
+ */
2173
+ function getLazyFields(instance$1) {
2174
+ return instance$1.constructor[LAZY_FIELDS_KEY] || /* @__PURE__ */ new Set();
2175
+ }
2176
+
2177
+ //#endregion
2178
+ //#region src/decorators/non-enumerable.ts
2179
+ /**
2180
+ * Decorator that makes a property or method non-enumerable.
2181
+ * This hides the property from enumeration (e.g., Object.keys(), for...in loops).
2182
+ *
2183
+ * @example
2184
+ * ```typescript
2185
+ * class MyClass {
2186
+ * @nonEnumerable
2187
+ * hiddenMethod() {
2188
+ * return 'This method will not show up in Object.keys()';
2189
+ * }
2190
+ * }
2191
+ * ```
2192
+ */
2193
+ function nonEnumerable(target, propertyKey, descriptor) {
2194
+ descriptor.enumerable = false;
2195
+ return descriptor;
2152
2196
  }
2153
2197
 
2154
2198
  //#endregion
@@ -2160,6 +2204,56 @@ function bindingAssetSource(source) {
2160
2204
  return { inner: source };
2161
2205
  }
2162
2206
 
2207
+ //#endregion
2208
+ //#region \0@oxc-project+runtime@0.96.0/helpers/decorate.js
2209
+ function __decorate(decorators, target, key, desc) {
2210
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2211
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2212
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2213
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
2214
+ }
2215
+
2216
+ //#endregion
2217
+ //#region src/types/output-asset-impl.ts
2218
+ var OutputAssetImpl = class {
2219
+ type = "asset";
2220
+ constructor(bindingAsset) {
2221
+ this.bindingAsset = bindingAsset;
2222
+ }
2223
+ get fileName() {
2224
+ return this.bindingAsset.getFileName();
2225
+ }
2226
+ get originalFileName() {
2227
+ return this.bindingAsset.getOriginalFileName() || null;
2228
+ }
2229
+ get originalFileNames() {
2230
+ return this.bindingAsset.getOriginalFileNames();
2231
+ }
2232
+ get name() {
2233
+ return this.bindingAsset.getName() ?? void 0;
2234
+ }
2235
+ get names() {
2236
+ return this.bindingAsset.getNames();
2237
+ }
2238
+ get source() {
2239
+ return transformAssetSource(this.bindingAsset.getSource());
2240
+ }
2241
+ __rolldown_external_memory_handle__(keepDataAlive) {
2242
+ if (keepDataAlive) this.#evaluateAllLazyFields();
2243
+ return this.bindingAsset.dropInner();
2244
+ }
2245
+ #evaluateAllLazyFields() {
2246
+ for (const field of getLazyFields(this)) this[field];
2247
+ }
2248
+ };
2249
+ __decorate([lazy], OutputAssetImpl.prototype, "fileName", null);
2250
+ __decorate([lazy], OutputAssetImpl.prototype, "originalFileName", null);
2251
+ __decorate([lazy], OutputAssetImpl.prototype, "originalFileNames", null);
2252
+ __decorate([lazy], OutputAssetImpl.prototype, "name", null);
2253
+ __decorate([lazy], OutputAssetImpl.prototype, "names", null);
2254
+ __decorate([lazy], OutputAssetImpl.prototype, "source", null);
2255
+ __decorate([nonEnumerable], OutputAssetImpl.prototype, "__rolldown_external_memory_handle__", null);
2256
+
2163
2257
  //#endregion
2164
2258
  //#region src/utils/transform-rendered-module.ts
2165
2259
  function transformToRenderedModule(bindingRenderedModule) {
@@ -2225,6 +2319,96 @@ function transformChunkModules(modules) {
2225
2319
  return result;
2226
2320
  }
2227
2321
 
2322
+ //#endregion
2323
+ //#region src/types/output-chunk-impl.ts
2324
+ var OutputChunkImpl = class {
2325
+ type = "chunk";
2326
+ constructor(bindingChunk) {
2327
+ this.bindingChunk = bindingChunk;
2328
+ }
2329
+ get fileName() {
2330
+ return this.bindingChunk.getFileName();
2331
+ }
2332
+ get name() {
2333
+ return this.bindingChunk.getName();
2334
+ }
2335
+ get exports() {
2336
+ return this.bindingChunk.getExports();
2337
+ }
2338
+ get isEntry() {
2339
+ return this.bindingChunk.getIsEntry();
2340
+ }
2341
+ get facadeModuleId() {
2342
+ return this.bindingChunk.getFacadeModuleId() || null;
2343
+ }
2344
+ get isDynamicEntry() {
2345
+ return this.bindingChunk.getIsDynamicEntry();
2346
+ }
2347
+ get sourcemapFileName() {
2348
+ return this.bindingChunk.getSourcemapFileName() || null;
2349
+ }
2350
+ get preliminaryFileName() {
2351
+ return this.bindingChunk.getPreliminaryFileName();
2352
+ }
2353
+ get code() {
2354
+ return this.bindingChunk.getCode();
2355
+ }
2356
+ get modules() {
2357
+ return transformChunkModules(this.bindingChunk.getModules());
2358
+ }
2359
+ get imports() {
2360
+ return this.bindingChunk.getImports();
2361
+ }
2362
+ get dynamicImports() {
2363
+ return this.bindingChunk.getDynamicImports();
2364
+ }
2365
+ get moduleIds() {
2366
+ return this.bindingChunk.getModuleIds();
2367
+ }
2368
+ get map() {
2369
+ const mapString = this.bindingChunk.getMap();
2370
+ return mapString ? transformToRollupSourceMap(mapString) : null;
2371
+ }
2372
+ __rolldown_external_memory_handle__(keepDataAlive) {
2373
+ if (keepDataAlive) this.#evaluateAllLazyFields();
2374
+ return this.bindingChunk.dropInner();
2375
+ }
2376
+ #evaluateAllLazyFields() {
2377
+ for (const field of getLazyFields(this)) this[field];
2378
+ }
2379
+ };
2380
+ __decorate([lazy], OutputChunkImpl.prototype, "fileName", null);
2381
+ __decorate([lazy], OutputChunkImpl.prototype, "name", null);
2382
+ __decorate([lazy], OutputChunkImpl.prototype, "exports", null);
2383
+ __decorate([lazy], OutputChunkImpl.prototype, "isEntry", null);
2384
+ __decorate([lazy], OutputChunkImpl.prototype, "facadeModuleId", null);
2385
+ __decorate([lazy], OutputChunkImpl.prototype, "isDynamicEntry", null);
2386
+ __decorate([lazy], OutputChunkImpl.prototype, "sourcemapFileName", null);
2387
+ __decorate([lazy], OutputChunkImpl.prototype, "preliminaryFileName", null);
2388
+ __decorate([lazy], OutputChunkImpl.prototype, "code", null);
2389
+ __decorate([lazy], OutputChunkImpl.prototype, "modules", null);
2390
+ __decorate([lazy], OutputChunkImpl.prototype, "imports", null);
2391
+ __decorate([lazy], OutputChunkImpl.prototype, "dynamicImports", null);
2392
+ __decorate([lazy], OutputChunkImpl.prototype, "moduleIds", null);
2393
+ __decorate([lazy], OutputChunkImpl.prototype, "map", null);
2394
+ __decorate([nonEnumerable], OutputChunkImpl.prototype, "__rolldown_external_memory_handle__", null);
2395
+
2396
+ //#endregion
2397
+ //#region src/types/sourcemap.ts
2398
+ function bindingifySourcemap$1(map) {
2399
+ if (map == null) return;
2400
+ return { inner: typeof map === "string" ? map : {
2401
+ file: map.file ?? void 0,
2402
+ mappings: map.mappings,
2403
+ sourceRoot: "sourceRoot" in map ? map.sourceRoot ?? void 0 : void 0,
2404
+ sources: map.sources?.map((s) => s ?? void 0),
2405
+ sourcesContent: map.sourcesContent?.map((s) => s ?? void 0),
2406
+ names: map.names,
2407
+ x_google_ignoreList: map.x_google_ignoreList,
2408
+ debugId: "debugId" in map ? map.debugId : void 0
2409
+ } };
2410
+ }
2411
+
2228
2412
  //#endregion
2229
2413
  //#region src/utils/transform-to-rollup-output.ts
2230
2414
  function transformToRollupSourceMap(map) {
@@ -2240,78 +2424,38 @@ function transformToRollupSourceMap(map) {
2240
2424
  return obj;
2241
2425
  }
2242
2426
  function transformToRollupOutputChunk(bindingChunk) {
2243
- const chunk = {
2244
- type: "chunk",
2245
- get code() {
2246
- return bindingChunk.code;
2247
- },
2248
- fileName: bindingChunk.fileName,
2249
- name: bindingChunk.name,
2250
- get modules() {
2251
- return transformChunkModules(bindingChunk.modules);
2252
- },
2253
- get imports() {
2254
- return bindingChunk.imports;
2255
- },
2256
- get dynamicImports() {
2257
- return bindingChunk.dynamicImports;
2258
- },
2259
- exports: bindingChunk.exports,
2260
- isEntry: bindingChunk.isEntry,
2261
- facadeModuleId: bindingChunk.facadeModuleId || null,
2262
- isDynamicEntry: bindingChunk.isDynamicEntry,
2263
- get moduleIds() {
2264
- return bindingChunk.moduleIds;
2265
- },
2266
- get map() {
2267
- return bindingChunk.map ? transformToRollupSourceMap(bindingChunk.map) : null;
2268
- },
2269
- sourcemapFileName: bindingChunk.sourcemapFileName || null,
2270
- preliminaryFileName: bindingChunk.preliminaryFileName
2271
- };
2272
- const cache = {};
2273
- return new Proxy(chunk, {
2274
- get(target, p) {
2275
- if (p in cache) return cache[p];
2276
- const value = target[p];
2277
- cache[p] = value;
2278
- return value;
2279
- },
2280
- has(target, p) {
2281
- if (p in cache) return true;
2282
- return p in target;
2283
- }
2284
- });
2427
+ return new OutputChunkImpl(bindingChunk);
2285
2428
  }
2286
2429
  function transformToMutableRollupOutputChunk(bindingChunk, changed) {
2287
2430
  const chunk = {
2288
2431
  type: "chunk",
2289
2432
  get code() {
2290
- return bindingChunk.code;
2433
+ return bindingChunk.getCode();
2291
2434
  },
2292
- fileName: bindingChunk.fileName,
2293
- name: bindingChunk.name,
2435
+ fileName: bindingChunk.getFileName(),
2436
+ name: bindingChunk.getName(),
2294
2437
  get modules() {
2295
- return transformChunkModules(bindingChunk.modules);
2438
+ return transformChunkModules(bindingChunk.getModules());
2296
2439
  },
2297
2440
  get imports() {
2298
- return bindingChunk.imports;
2441
+ return bindingChunk.getImports();
2299
2442
  },
2300
2443
  get dynamicImports() {
2301
- return bindingChunk.dynamicImports;
2444
+ return bindingChunk.getDynamicImports();
2302
2445
  },
2303
- exports: bindingChunk.exports,
2304
- isEntry: bindingChunk.isEntry,
2305
- facadeModuleId: bindingChunk.facadeModuleId || null,
2306
- isDynamicEntry: bindingChunk.isDynamicEntry,
2446
+ exports: bindingChunk.getExports(),
2447
+ isEntry: bindingChunk.getIsEntry(),
2448
+ facadeModuleId: bindingChunk.getFacadeModuleId() || null,
2449
+ isDynamicEntry: bindingChunk.getIsDynamicEntry(),
2307
2450
  get moduleIds() {
2308
- return bindingChunk.moduleIds;
2451
+ return bindingChunk.getModuleIds();
2309
2452
  },
2310
2453
  get map() {
2311
- return bindingChunk.map ? transformToRollupSourceMap(bindingChunk.map) : null;
2454
+ const map = bindingChunk.getMap();
2455
+ return map ? transformToRollupSourceMap(map) : null;
2312
2456
  },
2313
- sourcemapFileName: bindingChunk.sourcemapFileName || null,
2314
- preliminaryFileName: bindingChunk.preliminaryFileName
2457
+ sourcemapFileName: bindingChunk.getSourcemapFileName() || null,
2458
+ preliminaryFileName: bindingChunk.getPreliminaryFileName()
2315
2459
  };
2316
2460
  const cache = {};
2317
2461
  return new Proxy(chunk, {
@@ -2323,7 +2467,7 @@ function transformToMutableRollupOutputChunk(bindingChunk, changed) {
2323
2467
  },
2324
2468
  set(_target, p, newValue) {
2325
2469
  cache[p] = newValue;
2326
- changed.updated.add(bindingChunk.fileName);
2470
+ changed.updated.add(bindingChunk.getFileName());
2327
2471
  return true;
2328
2472
  },
2329
2473
  has(target, p) {
@@ -2333,36 +2477,19 @@ function transformToMutableRollupOutputChunk(bindingChunk, changed) {
2333
2477
  });
2334
2478
  }
2335
2479
  function transformToRollupOutputAsset(bindingAsset) {
2336
- const asset = {
2337
- type: "asset",
2338
- fileName: bindingAsset.fileName,
2339
- originalFileName: bindingAsset.originalFileName || null,
2340
- originalFileNames: bindingAsset.originalFileNames,
2341
- get source() {
2342
- return transformAssetSource(bindingAsset.source);
2343
- },
2344
- name: bindingAsset.name ?? void 0,
2345
- names: bindingAsset.names
2346
- };
2347
- const cache = {};
2348
- return new Proxy(asset, { get(target, p) {
2349
- if (p in cache) return cache[p];
2350
- const value = target[p];
2351
- cache[p] = value;
2352
- return value;
2353
- } });
2480
+ return new OutputAssetImpl(bindingAsset);
2354
2481
  }
2355
2482
  function transformToMutableRollupOutputAsset(bindingAsset, changed) {
2356
2483
  const asset = {
2357
2484
  type: "asset",
2358
- fileName: bindingAsset.fileName,
2359
- originalFileName: bindingAsset.originalFileName || null,
2360
- originalFileNames: bindingAsset.originalFileNames,
2485
+ fileName: bindingAsset.getFileName(),
2486
+ originalFileName: bindingAsset.getOriginalFileName() || null,
2487
+ originalFileNames: bindingAsset.getOriginalFileNames(),
2361
2488
  get source() {
2362
- return transformAssetSource(bindingAsset.source);
2489
+ return transformAssetSource(bindingAsset.getSource());
2363
2490
  },
2364
- name: bindingAsset.name ?? void 0,
2365
- names: bindingAsset.names
2491
+ name: bindingAsset.getName() ?? void 0,
2492
+ names: bindingAsset.getNames()
2366
2493
  };
2367
2494
  const cache = {};
2368
2495
  return new Proxy(asset, {
@@ -2374,7 +2501,7 @@ function transformToMutableRollupOutputAsset(bindingAsset, changed) {
2374
2501
  },
2375
2502
  set(_target, p, newValue) {
2376
2503
  cache[p] = newValue;
2377
- changed.updated.add(bindingAsset.fileName);
2504
+ changed.updated.add(bindingAsset.getFileName());
2378
2505
  return true;
2379
2506
  }
2380
2507
  });
@@ -2451,7 +2578,20 @@ var RolldownOutputImpl = class {
2451
2578
  get output() {
2452
2579
  return transformToRollupOutput(this.bindingOutputs).output;
2453
2580
  }
2581
+ __rolldown_external_memory_handle__(keepDataAlive) {
2582
+ const results = this.output.map((item) => item.__rolldown_external_memory_handle__(keepDataAlive));
2583
+ if (!results.every((r) => r.freed)) {
2584
+ const reasons = results.filter((r) => !r.freed).map((r) => r.reason).filter(Boolean);
2585
+ return {
2586
+ freed: false,
2587
+ reason: `Failed to free ${reasons.length} item(s): ${reasons.join("; ")}`
2588
+ };
2589
+ }
2590
+ return { freed: true };
2591
+ }
2454
2592
  };
2593
+ __decorate([lazy], RolldownOutputImpl.prototype, "output", null);
2594
+ __decorate([nonEnumerable], RolldownOutputImpl.prototype, "__rolldown_external_memory_handle__", null);
2455
2595
 
2456
2596
  //#endregion
2457
2597
  //#region src/utils/error.ts
@@ -2982,11 +3122,15 @@ function bindingifyTransform(args$1) {
2982
3122
  const { handler, meta, options } = normalizeHook(hook);
2983
3123
  return {
2984
3124
  plugin: async (ctx, code$1, id$1, meta$1) => {
3125
+ let magicStringInstance, astInstance;
2985
3126
  Object.defineProperties(meta$1, {
2986
3127
  magicString: { get() {
2987
- return new BindingMagicString(code$1);
3128
+ if (magicStringInstance) return magicStringInstance;
3129
+ magicStringInstance = new BindingMagicString(code$1);
3130
+ return magicStringInstance;
2988
3131
  } },
2989
3132
  ast: { get() {
3133
+ if (astInstance) return astInstance;
2990
3134
  let lang = "js";
2991
3135
  switch (meta$1.moduleType) {
2992
3136
  case "js":
@@ -2997,10 +3141,11 @@ function bindingifyTransform(args$1) {
2997
3141
  break;
2998
3142
  default: break;
2999
3143
  }
3000
- return parseAst(code$1, {
3144
+ astInstance = parseAst(code$1, {
3001
3145
  astType: meta$1.moduleType.includes("ts") ? "ts" : "js",
3002
3146
  lang
3003
3147
  });
3148
+ return astInstance;
3004
3149
  } }
3005
3150
  });
3006
3151
  const transformCtx = new TransformPluginContextImpl(args$1.outputOptions, ctx.inner(), args$1.plugin, args$1.pluginContextData, ctx, id$1, code$1, args$1.onLog, args$1.logLevel, args$1.watchMode);
@@ -4240,6 +4385,9 @@ var RolldownBuild = class RolldownBuild {
4240
4385
  const { impl } = await this.#getBundlerWithStopWorker(outputOptions);
4241
4386
  return new RolldownOutputImpl(unwrapBindingResult(await impl.write()));
4242
4387
  }
4388
+ /**
4389
+ * Close the build and free resources.
4390
+ */
4243
4391
  async close() {
4244
4392
  if (this.#bundlerImpl) {
4245
4393
  await this.#bundlerImpl.stopWorkers?.();