@rspack-canary/browser 1.6.0-canary-e28e40e9-20251022173516 → 1.6.0-canary-4ad8b49f-20251023175711

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.
package/dist/index.mjs CHANGED
@@ -34939,7 +34939,7 @@ __webpack_require__.d(exports_namespaceObject, {
34939
34939
  DllReferencePlugin: ()=>DllReferencePlugin,
34940
34940
  DynamicEntryPlugin: ()=>DynamicEntryPlugin,
34941
34941
  EntryDependency: ()=>external_rspack_wasi_browser_js_.EntryDependency,
34942
- EntryOptionPlugin: ()=>EntryOptionPlugin,
34942
+ EntryOptionPlugin: ()=>lib_EntryOptionPlugin,
34943
34943
  EntryPlugin: ()=>EntryPlugin,
34944
34944
  EnvironmentPlugin: ()=>EnvironmentPlugin,
34945
34945
  EvalDevToolModulePlugin: ()=>EvalDevToolModulePlugin,
@@ -35127,8 +35127,7 @@ class Logger {
35127
35127
  this[TIMERS_SYMBOL].set(label, process.hrtime());
35128
35128
  }
35129
35129
  timeLog(label) {
35130
- var _this_TIMERS_SYMBOL;
35131
- const prev = null == (_this_TIMERS_SYMBOL = this[TIMERS_SYMBOL]) ? void 0 : _this_TIMERS_SYMBOL.get(label);
35130
+ const prev = this[TIMERS_SYMBOL]?.get(label);
35132
35131
  if (!prev) throw new Error(`No such label '${label}' for WebpackLogger.timeLog()`);
35133
35132
  const time = process.hrtime(prev);
35134
35133
  this[LOG_SYMBOL](LogType.time, [
@@ -35137,8 +35136,7 @@ class Logger {
35137
35136
  ]);
35138
35137
  }
35139
35138
  timeEnd(label) {
35140
- var _this_TIMERS_SYMBOL;
35141
- const prev = null == (_this_TIMERS_SYMBOL = this[TIMERS_SYMBOL]) ? void 0 : _this_TIMERS_SYMBOL.get(label);
35139
+ const prev = this[TIMERS_SYMBOL]?.get(label);
35142
35140
  if (!prev) throw new Error(`No such label '${label}' for WebpackLogger.timeEnd()`);
35143
35141
  const time = process.hrtime(prev);
35144
35142
  this[TIMERS_SYMBOL].delete(label);
@@ -35148,8 +35146,7 @@ class Logger {
35148
35146
  ]);
35149
35147
  }
35150
35148
  timeAggregate(label) {
35151
- var _this_TIMERS_SYMBOL;
35152
- const prev = null == (_this_TIMERS_SYMBOL = this[TIMERS_SYMBOL]) ? void 0 : _this_TIMERS_SYMBOL.get(label);
35149
+ const prev = this[TIMERS_SYMBOL]?.get(label);
35153
35150
  if (!prev) throw new Error(`No such label '${label}' for WebpackLogger.timeAggregate()`);
35154
35151
  const time = process.hrtime(prev);
35155
35152
  this[TIMERS_SYMBOL].delete(label);
@@ -35686,13 +35683,12 @@ const smartGrouping = (items, groupConfigs)=>{
35686
35683
  const { items, used } = state;
35687
35684
  let options = state.options;
35688
35685
  if (void 0 === options) {
35689
- var _groupConfig_getOptions;
35690
35686
  const groupConfig = group.config;
35691
- state.options = options = (null == (_groupConfig_getOptions = groupConfig.getOptions) ? void 0 : _groupConfig_getOptions.call(groupConfig, group.name, Array.from(items, ({ item })=>item))) || false;
35687
+ state.options = options = groupConfig.getOptions?.(group.name, Array.from(items, ({ item })=>item)) || false;
35692
35688
  }
35693
35689
  const force = false !== options && options.force;
35694
35690
  if (!force) {
35695
- if (false !== bestGroupOptions && (null == bestGroupOptions ? void 0 : bestGroupOptions.force)) continue;
35691
+ if (false !== bestGroupOptions && bestGroupOptions?.force) continue;
35696
35692
  if (used) continue;
35697
35693
  if (items.size <= 1 || totalSize - items.size <= 1) continue;
35698
35694
  }
@@ -36200,7 +36196,6 @@ class JsSource extends lib.Source {
36200
36196
  return new lib.SourceMapSource(source.source, "inmemory://from rust", source.map);
36201
36197
  }
36202
36198
  static __to_binding(source) {
36203
- var _source_map;
36204
36199
  if (source instanceof lib.RawSource) {
36205
36200
  if (source.isBuffer()) return {
36206
36201
  source: source.buffer()
@@ -36209,7 +36204,7 @@ class JsSource extends lib.Source {
36209
36204
  source: source.source()
36210
36205
  };
36211
36206
  }
36212
- const map = JSON.stringify(null == (_source_map = source.map) ? void 0 : _source_map.call(source, {
36207
+ const map = JSON.stringify(source.map?.({
36213
36208
  columns: true
36214
36209
  }));
36215
36210
  const code = source.source();
@@ -36281,6 +36276,35 @@ Object.defineProperty(external_rspack_wasi_browser_js_.Chunk.prototype, util_def
36281
36276
  };
36282
36277
  }
36283
36278
  });
36279
+ Object.defineProperty(external_rspack_wasi_browser_js_.Chunks.prototype, "entries", {
36280
+ enumerable: true,
36281
+ configurable: true,
36282
+ value () {
36283
+ const chunks = this._values();
36284
+ let index = 0;
36285
+ return {
36286
+ [Symbol.iterator] () {
36287
+ return this;
36288
+ },
36289
+ next () {
36290
+ if (index < chunks.length) {
36291
+ const chunk = chunks[index++];
36292
+ return {
36293
+ value: [
36294
+ chunk,
36295
+ chunk
36296
+ ],
36297
+ done: false
36298
+ };
36299
+ }
36300
+ return {
36301
+ value: void 0,
36302
+ done: true
36303
+ };
36304
+ }
36305
+ };
36306
+ }
36307
+ });
36284
36308
  Object.defineProperty(external_rspack_wasi_browser_js_.Chunks.prototype, "values", {
36285
36309
  enumerable: true,
36286
36310
  configurable: true,
@@ -36666,35 +36690,31 @@ class Compilation {
36666
36690
  Compilation_class_private_field_get(this, _warnings).splice(0, Compilation_class_private_field_get(this, _warnings).length, ...warnings);
36667
36691
  }
36668
36692
  getPath(filename, data = {}) {
36669
- var _data_chunk;
36670
36693
  const pathData = {
36671
36694
  ...data
36672
36695
  };
36673
- if (data.contentHashType && (null == (_data_chunk = data.chunk) ? void 0 : _data_chunk.contentHash)) pathData.contentHash = data.chunk.contentHash[data.contentHashType];
36696
+ if (data.contentHashType && data.chunk?.contentHash) pathData.contentHash = data.chunk.contentHash[data.contentHashType];
36674
36697
  return Compilation_class_private_field_get(this, Compilation_inner).getPath(filename, pathData);
36675
36698
  }
36676
36699
  getPathWithInfo(filename, data = {}) {
36677
- var _data_chunk;
36678
36700
  const pathData = {
36679
36701
  ...data
36680
36702
  };
36681
- if (data.contentHashType && (null == (_data_chunk = data.chunk) ? void 0 : _data_chunk.contentHash)) pathData.contentHash = data.chunk.contentHash[data.contentHashType];
36703
+ if (data.contentHashType && data.chunk?.contentHash) pathData.contentHash = data.chunk.contentHash[data.contentHashType];
36682
36704
  return Compilation_class_private_field_get(this, Compilation_inner).getPathWithInfo(filename, pathData);
36683
36705
  }
36684
36706
  getAssetPath(filename, data = {}) {
36685
- var _data_chunk;
36686
36707
  const pathData = {
36687
36708
  ...data
36688
36709
  };
36689
- if (data.contentHashType && (null == (_data_chunk = data.chunk) ? void 0 : _data_chunk.contentHash)) pathData.contentHash = data.chunk.contentHash[data.contentHashType];
36710
+ if (data.contentHashType && data.chunk?.contentHash) pathData.contentHash = data.chunk.contentHash[data.contentHashType];
36690
36711
  return Compilation_class_private_field_get(this, Compilation_inner).getAssetPath(filename, pathData);
36691
36712
  }
36692
36713
  getAssetPathWithInfo(filename, data = {}) {
36693
- var _data_chunk;
36694
36714
  const pathData = {
36695
36715
  ...data
36696
36716
  };
36697
- if (data.contentHashType && (null == (_data_chunk = data.chunk) ? void 0 : _data_chunk.contentHash)) pathData.contentHash = data.chunk.contentHash[data.contentHashType];
36717
+ if (data.contentHashType && data.chunk?.contentHash) pathData.contentHash = data.chunk.contentHash[data.contentHashType];
36698
36718
  return Compilation_class_private_field_get(this, Compilation_inner).getAssetPathWithInfo(filename, pathData);
36699
36719
  }
36700
36720
  getLogger(name) {
@@ -37482,8 +37502,7 @@ css_extract_define_property(CssExtractRspackPlugin, "pluginName", utils_PLUGIN_N
37482
37502
  css_extract_define_property(CssExtractRspackPlugin, "loader", LOADER_PATH);
37483
37503
  const DataUriPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.DataUriPlugin, ()=>{}, "compilation");
37484
37504
  const DefinePlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.DefinePlugin, function(define1) {
37485
- var _this_options_output_environment;
37486
- const supportsBigIntLiteral = (null == (_this_options_output_environment = this.options.output.environment) ? void 0 : _this_options_output_environment.bigIntLiteral) ?? false;
37505
+ const supportsBigIntLiteral = this.options.output.environment?.bigIntLiteral ?? false;
37487
37506
  return normalizeValue(define1, supportsBigIntLiteral);
37488
37507
  }, "compilation");
37489
37508
  const normalizeValue = (define1, supportsBigIntLiteral)=>{
@@ -37551,10 +37570,10 @@ const DllEntryPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPlugi
37551
37570
  name: options.name
37552
37571
  }));
37553
37572
  const DllReferenceAgencyPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.DllReferenceAgencyPlugin, (options)=>options);
37554
- class EntryOptionPlugin_EntryOptionPlugin {
37573
+ class EntryOptionPlugin {
37555
37574
  apply(compiler) {
37556
37575
  compiler.hooks.entryOption.tap("EntryOptionPlugin", (context, entry)=>{
37557
- EntryOptionPlugin_EntryOptionPlugin.applyEntryOption(compiler, context, entry);
37576
+ EntryOptionPlugin.applyEntryOption(compiler, context, entry);
37558
37577
  return true;
37559
37578
  });
37560
37579
  }
@@ -37562,7 +37581,7 @@ class EntryOptionPlugin_EntryOptionPlugin {
37562
37581
  if ("function" == typeof entry) new DynamicEntryPlugin(context, entry).apply(compiler);
37563
37582
  else for (const name of Object.keys(entry)){
37564
37583
  const desc = entry[name];
37565
- const options = EntryOptionPlugin_EntryOptionPlugin.entryDescriptionToOptions(compiler, name, desc);
37584
+ const options = EntryOptionPlugin.entryDescriptionToOptions(compiler, name, desc);
37566
37585
  if (void 0 === desc.import) throw new Error("desc.import should not be `undefined` once `EntryOptionPlugin.applyEntryOption` is called");
37567
37586
  for (const entry of desc.import)new EntryPlugin(context, entry, options).apply(compiler);
37568
37587
  }
@@ -37583,7 +37602,7 @@ class EntryOptionPlugin_EntryOptionPlugin {
37583
37602
  return options;
37584
37603
  }
37585
37604
  }
37586
- const EntryOptionPlugin = EntryOptionPlugin_EntryOptionPlugin;
37605
+ const lib_EntryOptionPlugin = EntryOptionPlugin;
37587
37606
  const OriginEntryPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.EntryPlugin, (context, entry, options = "")=>{
37588
37607
  const entryOptions = "string" == typeof options ? {
37589
37608
  name: options
@@ -37629,7 +37648,7 @@ class DynamicEntryPlugin extends RspackBuiltinPlugin {
37629
37648
  entry: async ()=>{
37630
37649
  const result = await this.entry();
37631
37650
  return Object.entries(result).map(([name, desc])=>{
37632
- const options = EntryOptionPlugin.entryDescriptionToOptions(compiler, name, desc);
37651
+ const options = lib_EntryOptionPlugin.entryDescriptionToOptions(compiler, name, desc);
37633
37652
  return {
37634
37653
  import: desc.import,
37635
37654
  options: getRawEntryOptions(options)
@@ -37737,7 +37756,6 @@ function EsmLibraryPlugin_define_property(obj, key, value) {
37737
37756
  }
37738
37757
  class EsmLibraryPlugin {
37739
37758
  apply(compiler) {
37740
- var _this_options;
37741
37759
  new RemoveDuplicateModulesPlugin().apply(compiler);
37742
37760
  const { splitChunks } = compiler.options.optimization;
37743
37761
  if (splitChunks) {
@@ -37749,7 +37767,7 @@ class EsmLibraryPlugin {
37749
37767
  compiler.__internal__registerBuiltinPlugin({
37750
37768
  name: external_rspack_wasi_browser_js_.BuiltinPluginName.EsmLibraryPlugin,
37751
37769
  options: {
37752
- preserveModules: null == (_this_options = this.options) ? void 0 : _this_options.preserveModules
37770
+ preserveModules: this.options?.preserveModules
37753
37771
  }
37754
37772
  });
37755
37773
  }
@@ -37892,10 +37910,10 @@ const makeCacheableWithContext = (fn)=>{
37892
37910
  } else innerCache = new Map();
37893
37911
  const boundFn = (context, identifier)=>{
37894
37912
  let cachedResult;
37895
- let innerSubCache = null == innerCache ? void 0 : innerCache.get(context);
37913
+ let innerSubCache = innerCache?.get(context);
37896
37914
  if (void 0 === innerSubCache) {
37897
37915
  innerSubCache = new Map();
37898
- null == innerCache || innerCache.set(context, innerSubCache);
37916
+ innerCache?.set(context, innerSubCache);
37899
37917
  } else cachedResult = innerSubCache.get(identifier);
37900
37918
  if (void 0 !== cachedResult) return cachedResult;
37901
37919
  const result = fn(context, identifier);
@@ -37916,10 +37934,10 @@ const makeCacheableWithContext = (fn)=>{
37916
37934
  if (void 0 === innerSubCache) innerCache.set(context, innerSubCache = new Map());
37917
37935
  } else innerSubCache = new Map();
37918
37936
  const boundFn = (identifier)=>{
37919
- const cachedResult = null == innerSubCache ? void 0 : innerSubCache.get(identifier);
37937
+ const cachedResult = innerSubCache?.get(identifier);
37920
37938
  if (void 0 !== cachedResult) return cachedResult;
37921
37939
  const result = fn(context, identifier);
37922
- null == innerSubCache || innerSubCache.set(identifier, result);
37940
+ innerSubCache?.set(identifier, result);
37923
37941
  return result;
37924
37942
  };
37925
37943
  return boundFn;
@@ -38380,7 +38398,7 @@ class Message extends Error {
38380
38398
  this.stack = void 0;
38381
38399
  Error.captureStackTrace(this);
38382
38400
  const match = this.stack.split("\n")[3].match(CURRENT_METHOD_REGEXP);
38383
- this.message = (null == match ? void 0 : match[1]) ? createMessage(match[1]) : createMessage();
38401
+ this.message = match?.[1] ? createMessage(match[1]) : createMessage();
38384
38402
  }
38385
38403
  }
38386
38404
  class AbstractMethodError extends lib_WebpackError {
@@ -38608,11 +38626,10 @@ class BulkUpdateDecorator extends Hash {
38608
38626
  }
38609
38627
  class DebugHash extends Hash {
38610
38628
  update(data) {
38611
- var _stack;
38612
38629
  let normalizedData;
38613
38630
  normalizedData = createHash_Buffer.isBuffer(data) ? data.toString("utf-8") : data;
38614
38631
  if (normalizedData.startsWith("debug-digest-")) normalizedData = createHash_Buffer.from(normalizedData.slice(13), "hex").toString();
38615
- this.string += `[${normalizedData}](${null == (_stack = new Error().stack) ? void 0 : _stack.split("\n", 3)[2]})\n`;
38632
+ this.string += `[${normalizedData}](${new Error().stack?.split("\n", 3)[2]})\n`;
38616
38633
  return this;
38617
38634
  }
38618
38635
  digest(encoding) {
@@ -38965,12 +38982,10 @@ function dirname(path) {
38965
38982
  return path.slice(0, idx);
38966
38983
  }
38967
38984
  function getCurrentLoader(loaderContext, index = loaderContext.loaderIndex) {
38968
- var _loaderContext_loaders;
38969
- if ((null == (_loaderContext_loaders = loaderContext.loaders) ? void 0 : _loaderContext_loaders.length) && index < loaderContext.loaders.length && index >= 0 && loaderContext.loaders[index]) return loaderContext.loaders[index];
38985
+ if (loaderContext.loaders?.length && index < loaderContext.loaders.length && index >= 0 && loaderContext.loaders[index]) return loaderContext.loaders[index];
38970
38986
  return null;
38971
38987
  }
38972
38988
  async function runLoaders(compiler, context) {
38973
- var _compiler_options;
38974
38989
  const loaderState = context.loaderState;
38975
38990
  const pitch = loaderState === external_rspack_wasi_browser_js_.JsLoaderState.Pitching;
38976
38991
  const { resource } = context;
@@ -39216,7 +39231,7 @@ async function runLoaders(compiler, context) {
39216
39231
  loaderContext._module = context._module;
39217
39232
  loaderContext.getOptions = ()=>{
39218
39233
  const loader = getCurrentLoader(loaderContext);
39219
- let options = null == loader ? void 0 : loader.options;
39234
+ let options = loader?.options;
39220
39235
  if ("string" == typeof options) if (options.startsWith("{") && options.endsWith("}")) try {
39221
39236
  options = JSON.parse(options);
39222
39237
  } catch (e) {
@@ -39304,10 +39319,10 @@ async function runLoaders(compiler, context) {
39304
39319
  _module: {
39305
39320
  type: loaderContext._module.type,
39306
39321
  identifier: loaderContext._module.identifier(),
39307
- matchResource: null == normalModule ? void 0 : normalModule.matchResource,
39308
- request: null == normalModule ? void 0 : normalModule.request,
39309
- userRequest: null == normalModule ? void 0 : normalModule.userRequest,
39310
- rawRequest: null == normalModule ? void 0 : normalModule.rawRequest
39322
+ matchResource: normalModule?.matchResource,
39323
+ request: normalModule?.request,
39324
+ userRequest: normalModule?.userRequest,
39325
+ rawRequest: normalModule?.rawRequest
39311
39326
  }
39312
39327
  };
39313
39328
  Object.assign(workerLoaderContext, compiler.options.loader);
@@ -39438,7 +39453,7 @@ async function runLoaders(compiler, context) {
39438
39453
  }
39439
39454
  };
39440
39455
  };
39441
- const enableParallelism = (currentLoaderObject)=>compiler.options.experiments.parallelLoader && (null == currentLoaderObject ? void 0 : currentLoaderObject.parallel);
39456
+ const enableParallelism = (currentLoaderObject)=>compiler.options.experiments.parallelLoader && currentLoaderObject?.parallel;
39442
39457
  const isomorphoicRun = async (fn, args)=>{
39443
39458
  const currentLoaderObject = getCurrentLoader(loaderContext);
39444
39459
  const parallelism = enableParallelism(currentLoaderObject);
@@ -39461,7 +39476,7 @@ async function runLoaders(compiler, context) {
39461
39476
  args
39462
39477
  }, getWorkerLoaderHandlers()) || [];
39463
39478
  else {
39464
- if (loaderState === external_rspack_wasi_browser_js_.JsLoaderState.Normal) convertArgs(args, !!(null == currentLoaderObject ? void 0 : currentLoaderObject.raw));
39479
+ if (loaderState === external_rspack_wasi_browser_js_.JsLoaderState.Normal) convertArgs(args, !!currentLoaderObject?.raw);
39465
39480
  result = await utils_runSyncOrAsync(fn, loaderContext, args) || [];
39466
39481
  }
39467
39482
  trace_JavaScriptTracer.endAsync({
@@ -39554,16 +39569,16 @@ async function runLoaders(compiler, context) {
39554
39569
  resource: resource
39555
39570
  }
39556
39571
  });
39557
- if (compiler.options.experiments.cache && (null == (_compiler_options = compiler.options) ? void 0 : _compiler_options.cache)) commitCustomFieldsToRust(context._module.buildInfo);
39572
+ if (compiler.options.experiments.cache && compiler.options?.cache) commitCustomFieldsToRust(context._module.buildInfo);
39558
39573
  return context;
39559
39574
  }
39560
39575
  const loader_runner_PATH_QUERY_FRAGMENT_REGEXP = /^((?:\u200b.|[^?#\u200b])*)(\?(?:\u200b.|[^#\u200b])*)?(#.*)?$/;
39561
39576
  function parsePathQueryFragment(str) {
39562
39577
  const match = loader_runner_PATH_QUERY_FRAGMENT_REGEXP.exec(str);
39563
39578
  return {
39564
- path: (null == match ? void 0 : match[1].replace(/\u200b(.)/g, "$1")) || "",
39565
- query: (null == match ? void 0 : match[2]) ? match[2].replace(/\u200b(.)/g, "$1") : "",
39566
- fragment: (null == match ? void 0 : match[3]) || ""
39579
+ path: match?.[1].replace(/\u200b(.)/g, "$1") || "",
39580
+ query: match?.[2] ? match[2].replace(/\u200b(.)/g, "$1") : "",
39581
+ fragment: match?.[3] || ""
39567
39582
  };
39568
39583
  }
39569
39584
  const BUILTIN_LOADER_PREFIX = "builtin:";
@@ -39937,14 +39952,13 @@ function getRawParserOptions(parser, type) {
39937
39952
  throw new Error(`unreachable: unknown module type: ${type}`);
39938
39953
  }
39939
39954
  function getRawJavascriptParserOptions(parser) {
39940
- var _parser_dynamicImportPreload, _parser_dynamicImportPrefetch, _parser_url;
39941
39955
  return {
39942
39956
  dynamicImportMode: parser.dynamicImportMode,
39943
- dynamicImportPreload: null == (_parser_dynamicImportPreload = parser.dynamicImportPreload) ? void 0 : _parser_dynamicImportPreload.toString(),
39944
- dynamicImportPrefetch: null == (_parser_dynamicImportPrefetch = parser.dynamicImportPrefetch) ? void 0 : _parser_dynamicImportPrefetch.toString(),
39957
+ dynamicImportPreload: parser.dynamicImportPreload?.toString(),
39958
+ dynamicImportPrefetch: parser.dynamicImportPrefetch?.toString(),
39945
39959
  dynamicImportFetchPriority: parser.dynamicImportFetchPriority,
39946
39960
  importMeta: parser.importMeta,
39947
- url: null == (_parser_url = parser.url) ? void 0 : _parser_url.toString(),
39961
+ url: parser.url?.toString(),
39948
39962
  exprContextCritical: parser.exprContextCritical,
39949
39963
  unknownContextCritical: parser.unknownContextCritical,
39950
39964
  wrappedContextCritical: parser.wrappedContextCritical,
@@ -40224,7 +40238,7 @@ class ExternalsPlugin extends RspackBuiltinPlugin {
40224
40238
  externalType: type
40225
40239
  });
40226
40240
  });
40227
- if (null == promise ? void 0 : promise.then) promise.then((result)=>resolve({
40241
+ if (promise?.then) promise.then((result)=>resolve({
40228
40242
  result: getRawExternalItemValueFormFnResult(result),
40229
40243
  externalType: void 0
40230
40244
  }), (e)=>reject(e));
@@ -40348,9 +40362,8 @@ class HttpUriPlugin extends RspackBuiltinPlugin {
40348
40362
  }
40349
40363
  const compilationOptionsMap = new WeakMap();
40350
40364
  const getPluginOptions = (compilation, uid)=>{
40351
- var _compilationOptionsMap_get;
40352
40365
  if (!(compilation instanceof Compilation)) throw new TypeError("The 'compilation' argument must be an instance of Compilation");
40353
- return null == (_compilationOptionsMap_get = compilationOptionsMap.get(compilation)) ? void 0 : _compilationOptionsMap_get[uid];
40366
+ return compilationOptionsMap.get(compilation)?.[uid];
40354
40367
  };
40355
40368
  const setPluginOptions = (compilation, uid, options)=>{
40356
40369
  const optionsMap = compilationOptionsMap.get(compilation) || {};
@@ -40429,7 +40442,6 @@ const HtmlRspackPluginImpl = base_create(external_rspack_wasi_browser_js_.Builti
40429
40442
  cleanPluginOptions(stats.compilation, uid);
40430
40443
  });
40431
40444
  function generateRenderData(data) {
40432
- var _json_htmlRspackPlugin_tags, _json_htmlRspackPlugin, _json_htmlRspackPlugin_tags1, _json_htmlRspackPlugin1;
40433
40445
  const json = JSON.parse(data);
40434
40446
  if ("function" != typeof c.templateParameters) json.compilation = compilation;
40435
40447
  const renderTag = function() {
@@ -40438,11 +40450,11 @@ const HtmlRspackPluginImpl = base_create(external_rspack_wasi_browser_js_.Builti
40438
40450
  const renderTagList = function() {
40439
40451
  return this.join("");
40440
40452
  };
40441
- if (Array.isArray(null == (_json_htmlRspackPlugin = json.htmlRspackPlugin) ? void 0 : null == (_json_htmlRspackPlugin_tags = _json_htmlRspackPlugin.tags) ? void 0 : _json_htmlRspackPlugin_tags.headTags)) {
40453
+ if (Array.isArray(json.htmlRspackPlugin?.tags?.headTags)) {
40442
40454
  for (const tag of json.htmlRspackPlugin.tags.headTags)tag.toString = renderTag;
40443
40455
  json.htmlRspackPlugin.tags.headTags.toString = renderTagList;
40444
40456
  }
40445
- if (Array.isArray(null == (_json_htmlRspackPlugin1 = json.htmlRspackPlugin) ? void 0 : null == (_json_htmlRspackPlugin_tags1 = _json_htmlRspackPlugin1.tags) ? void 0 : _json_htmlRspackPlugin_tags1.bodyTags)) {
40457
+ if (Array.isArray(json.htmlRspackPlugin?.tags?.bodyTags)) {
40446
40458
  for (const tag of json.htmlRspackPlugin.tags.bodyTags)tag.toString = renderTag;
40447
40459
  json.htmlRspackPlugin.tags.bodyTags.toString = renderTagList;
40448
40460
  }
@@ -40560,6 +40572,7 @@ HtmlRspackPlugin.getHooks = HtmlRspackPlugin.getCompilationHooks = getPluginHook
40560
40572
  HtmlRspackPlugin.version = 5;
40561
40573
  const IgnorePlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.IgnorePlugin, (options)=>options);
40562
40574
  const InferAsyncModulesPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.InferAsyncModulesPlugin, ()=>{}, "compilation");
40575
+ const InlineExportsPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.InlineExportsPlugin, ()=>{}, "compilation");
40563
40576
  function JavascriptModulesPlugin_define_property(obj, key, value) {
40564
40577
  if (key in obj) Object.defineProperty(obj, key, {
40565
40578
  value: value,
@@ -40607,17 +40620,16 @@ const LibManifestPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPl
40607
40620
  };
40608
40621
  });
40609
40622
  const LightningCssMinimizerRspackPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.LightningCssMinimizerRspackPlugin, (options)=>{
40610
- var _options_minimizerOptions, _options_minimizerOptions1, _options_minimizerOptions2;
40611
- const { include, exclude, draft, nonStandard, pseudoClasses, drafts } = (null == options ? void 0 : options.minimizerOptions) ?? {};
40612
- const targets = (null == options ? void 0 : null == (_options_minimizerOptions = options.minimizerOptions) ? void 0 : _options_minimizerOptions.targets) ?? "fully supports es6";
40623
+ const { include, exclude, draft, nonStandard, pseudoClasses, drafts } = options?.minimizerOptions ?? {};
40624
+ const targets = options?.minimizerOptions?.targets ?? "fully supports es6";
40613
40625
  return {
40614
- test: null == options ? void 0 : options.test,
40615
- include: null == options ? void 0 : options.include,
40616
- exclude: null == options ? void 0 : options.exclude,
40617
- removeUnusedLocalIdents: (null == options ? void 0 : options.removeUnusedLocalIdents) ?? true,
40626
+ test: options?.test,
40627
+ include: options?.include,
40628
+ exclude: options?.exclude,
40629
+ removeUnusedLocalIdents: options?.removeUnusedLocalIdents ?? true,
40618
40630
  minimizerOptions: {
40619
- errorRecovery: (null == options ? void 0 : null == (_options_minimizerOptions1 = options.minimizerOptions) ? void 0 : _options_minimizerOptions1.errorRecovery) ?? true,
40620
- unusedSymbols: (null == options ? void 0 : null == (_options_minimizerOptions2 = options.minimizerOptions) ? void 0 : _options_minimizerOptions2.unusedSymbols) ?? [],
40631
+ errorRecovery: options?.minimizerOptions?.errorRecovery ?? true,
40632
+ unusedSymbols: options?.minimizerOptions?.unusedSymbols ?? [],
40621
40633
  include: include ? toFeatures(include) : void 0,
40622
40634
  exclude: exclude ? toFeatures(exclude) : void 0,
40623
40635
  targets: "string" == typeof targets ? [
@@ -40693,13 +40705,10 @@ const lazyCompilationMiddleware = (compiler)=>{
40693
40705
  ...middlewareByCompiler.keys()
40694
40706
  ];
40695
40707
  return (req, res, next)=>{
40696
- const key = keys.find((key)=>{
40697
- var _req_url;
40698
- return null == (_req_url = req.url) ? void 0 : _req_url.startsWith(key);
40699
- });
40700
- if (!key) return null == next ? void 0 : next();
40708
+ const key = keys.find((key)=>req.url?.startsWith(key));
40709
+ if (!key) return next?.();
40701
40710
  const middleware = middlewareByCompiler.get(key);
40702
- return null == middleware ? void 0 : middleware(req, res, next);
40711
+ return middleware?.(req, res, next);
40703
40712
  };
40704
40713
  }
40705
40714
  if (compiler.options.experiments.lazyCompilation) {
@@ -40727,8 +40736,7 @@ function applyPlugin(compiler, options, activeModules) {
40727
40736
  const lazyCompilationMiddlewareInternal = (compiler, activeModules, lazyCompilationPrefix)=>{
40728
40737
  const logger = compiler.getInfrastructureLogger("LazyCompilation");
40729
40738
  return (req, res, next)=>{
40730
- var _req_url;
40731
- if (!(null == (_req_url = req.url) ? void 0 : _req_url.startsWith(lazyCompilationPrefix))) return null == next ? void 0 : next();
40739
+ if (!req.url?.startsWith(lazyCompilationPrefix)) return next?.();
40732
40740
  const modules = req.url.slice(lazyCompilationPrefix.length).split("@").map(decodeURIComponent);
40733
40741
  req.socket.setNoDelay(true);
40734
40742
  res.setHeader("content-type", "text/event-stream");
@@ -41142,8 +41150,7 @@ class SubresourceIntegrityPlugin extends NativeSubresourceIntegrityPlugin {
41142
41150
  compiler.hooks.compilation.tap(SubresourceIntegrityPlugin_PLUGIN_NAME, (compilation)=>{
41143
41151
  compilation.hooks.statsFactory.tap(SubresourceIntegrityPlugin_PLUGIN_NAME, (statsFactory)=>{
41144
41152
  statsFactory.hooks.extract.for("asset").tap(SubresourceIntegrityPlugin_PLUGIN_NAME, (object, asset)=>{
41145
- var _asset_info;
41146
- const contenthash = null == (_asset_info = asset.info) ? void 0 : _asset_info.contenthash;
41153
+ const contenthash = asset.info?.contenthash;
41147
41154
  if (contenthash) {
41148
41155
  const shaHashes = (Array.isArray(contenthash) ? contenthash : [
41149
41156
  contenthash
@@ -41262,13 +41269,12 @@ function getRawExtractCommentsOptions(extractComments) {
41262
41269
  }
41263
41270
  }
41264
41271
  const SwcJsMinimizerRspackPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.SwcJsMinimizerRspackPlugin, (options)=>{
41265
- var _options_minimizerOptions, _options_minimizerOptions1, _options_minimizerOptions2, _options_minimizerOptions3, _options_minimizerOptions4, _options_minimizerOptions5;
41266
- let compress = (null == options ? void 0 : null == (_options_minimizerOptions = options.minimizerOptions) ? void 0 : _options_minimizerOptions.compress) ?? true;
41267
- const mangle = (null == options ? void 0 : null == (_options_minimizerOptions1 = options.minimizerOptions) ? void 0 : _options_minimizerOptions1.mangle) ?? true;
41268
- const ecma = (null == options ? void 0 : null == (_options_minimizerOptions2 = options.minimizerOptions) ? void 0 : _options_minimizerOptions2.ecma) ?? 5;
41272
+ let compress = options?.minimizerOptions?.compress ?? true;
41273
+ const mangle = options?.minimizerOptions?.mangle ?? true;
41274
+ const ecma = options?.minimizerOptions?.ecma ?? 5;
41269
41275
  const format = {
41270
41276
  comments: false,
41271
- ...null == options ? void 0 : null == (_options_minimizerOptions3 = options.minimizerOptions) ? void 0 : _options_minimizerOptions3.format
41277
+ ...options?.minimizerOptions?.format
41272
41278
  };
41273
41279
  if (compress && "object" == typeof compress) compress = {
41274
41280
  passes: 2,
@@ -41278,17 +41284,17 @@ const SwcJsMinimizerRspackPlugin = base_create(external_rspack_wasi_browser_js_.
41278
41284
  passes: 2
41279
41285
  };
41280
41286
  return {
41281
- test: null == options ? void 0 : options.test,
41282
- include: null == options ? void 0 : options.include,
41283
- exclude: null == options ? void 0 : options.exclude,
41284
- extractComments: getRawExtractCommentsOptions(null == options ? void 0 : options.extractComments),
41287
+ test: options?.test,
41288
+ include: options?.include,
41289
+ exclude: options?.exclude,
41290
+ extractComments: getRawExtractCommentsOptions(options?.extractComments),
41285
41291
  minimizerOptions: {
41286
41292
  compress,
41287
41293
  mangle,
41288
41294
  ecma,
41289
41295
  format,
41290
- minify: null == options ? void 0 : null == (_options_minimizerOptions4 = options.minimizerOptions) ? void 0 : _options_minimizerOptions4.minify,
41291
- module: null == options ? void 0 : null == (_options_minimizerOptions5 = options.minimizerOptions) ? void 0 : _options_minimizerOptions5.module
41296
+ minify: options?.minimizerOptions?.minify,
41297
+ module: options?.minimizerOptions?.module
41292
41298
  }
41293
41299
  };
41294
41300
  }, "compilation");
@@ -42419,9 +42425,8 @@ const applyRspackOptionsBaseDefaults = (options)=>{
42419
42425
  applyInfrastructureLoggingDefaults(options.infrastructureLogging);
42420
42426
  };
42421
42427
  const applyInfrastructureLoggingDefaults = (infrastructureLogging)=>{
42422
- var _infrastructureLogging_stream;
42423
42428
  F(infrastructureLogging, "stream", ()=>defaults_process.stderr);
42424
- const tty = (null == (_infrastructureLogging_stream = infrastructureLogging.stream) ? void 0 : _infrastructureLogging_stream.isTTY) && "dumb" !== defaults_process.env.TERM;
42429
+ const tty = infrastructureLogging.stream?.isTTY && "dumb" !== defaults_process.env.TERM;
42425
42430
  D(infrastructureLogging, "level", "info");
42426
42431
  D(infrastructureLogging, "debug", false);
42427
42432
  D(infrastructureLogging, "colors", tty);
@@ -42469,7 +42474,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
42469
42474
  if ("object" == typeof rspackFuture) {
42470
42475
  D(rspackFuture, "bundlerInfo", {});
42471
42476
  if ("object" == typeof rspackFuture.bundlerInfo) {
42472
- D(rspackFuture.bundlerInfo, "version", "1.6.0-canary-e28e40e9-20251022173516");
42477
+ D(rspackFuture.bundlerInfo, "version", "1.6.0-canary-4ad8b49f-20251023175711");
42473
42478
  D(rspackFuture.bundlerInfo, "bundler", "rspack");
42474
42479
  D(rspackFuture.bundlerInfo, "force", !library);
42475
42480
  }
@@ -42710,7 +42715,7 @@ const applyOutputDefaults = (output, { context, outputModule, targetProperties:
42710
42715
  const environment = output.environment;
42711
42716
  const optimistic = (v)=>v || void 0 === v;
42712
42717
  const conditionallyOptimistic = (v, c)=>void 0 === v && c || v;
42713
- F(environment, "globalThis", ()=>null == tp ? void 0 : tp.globalThis);
42718
+ F(environment, "globalThis", ()=>tp?.globalThis);
42714
42719
  F(environment, "bigIntLiteral", ()=>tp && optimistic(tp.bigIntLiteral));
42715
42720
  F(environment, "const", ()=>tp && optimistic(tp.const));
42716
42721
  F(environment, "arrowFunction", ()=>tp && optimistic(tp.arrowFunction));
@@ -42720,9 +42725,9 @@ const applyOutputDefaults = (output, { context, outputModule, targetProperties:
42720
42725
  F(environment, "optionalChaining", ()=>tp && optimistic(tp.optionalChaining));
42721
42726
  F(environment, "nodePrefixForCoreModules", ()=>tp && optimistic(tp.nodePrefixForCoreModules));
42722
42727
  F(environment, "templateLiteral", ()=>tp && optimistic(tp.templateLiteral));
42723
- F(environment, "dynamicImport", ()=>conditionallyOptimistic(null == tp ? void 0 : tp.dynamicImport, output.module));
42724
- F(environment, "dynamicImportInWorker", ()=>conditionallyOptimistic(null == tp ? void 0 : tp.dynamicImportInWorker, output.module));
42725
- F(environment, "module", ()=>conditionallyOptimistic(null == tp ? void 0 : tp.module, output.module));
42728
+ F(environment, "dynamicImport", ()=>conditionallyOptimistic(tp?.dynamicImport, output.module));
42729
+ F(environment, "dynamicImportInWorker", ()=>conditionallyOptimistic(tp?.dynamicImportInWorker, output.module));
42730
+ F(environment, "module", ()=>conditionallyOptimistic(tp?.module, output.module));
42726
42731
  F(environment, "document", ()=>tp && optimistic(tp.document));
42727
42732
  D(output, "filename", output.module ? "[name].mjs" : "[name].js");
42728
42733
  F(output, "iife", ()=>!output.module);
@@ -42877,13 +42882,13 @@ const applyOutputDefaults = (output, { context, outputModule, targetProperties:
42877
42882
  });
42878
42883
  };
42879
42884
  const applyExternalsPresetsDefaults = (externalsPresets, { targetProperties, buildHttp })=>{
42880
- D(externalsPresets, "web", !buildHttp && (null == targetProperties ? void 0 : targetProperties.web));
42881
- D(externalsPresets, "node", null == targetProperties ? void 0 : targetProperties.node);
42882
- D(externalsPresets, "electron", null == targetProperties ? void 0 : targetProperties.electron);
42883
- D(externalsPresets, "electronMain", (null == targetProperties ? void 0 : targetProperties.electron) && targetProperties.electronMain);
42884
- D(externalsPresets, "electronPreload", (null == targetProperties ? void 0 : targetProperties.electron) && targetProperties.electronPreload);
42885
- D(externalsPresets, "electronRenderer", (null == targetProperties ? void 0 : targetProperties.electron) && targetProperties.electronRenderer);
42886
- D(externalsPresets, "nwjs", null == targetProperties ? void 0 : targetProperties.nwjs);
42885
+ D(externalsPresets, "web", !buildHttp && targetProperties?.web);
42886
+ D(externalsPresets, "node", targetProperties?.node);
42887
+ D(externalsPresets, "electron", targetProperties?.electron);
42888
+ D(externalsPresets, "electronMain", targetProperties?.electron && targetProperties.electronMain);
42889
+ D(externalsPresets, "electronPreload", targetProperties?.electron && targetProperties.electronPreload);
42890
+ D(externalsPresets, "electronRenderer", targetProperties?.electron && targetProperties.electronRenderer);
42891
+ D(externalsPresets, "nwjs", targetProperties?.nwjs);
42887
42892
  };
42888
42893
  const applyLoaderDefaults = (loader, { targetProperties, environment })=>{
42889
42894
  F(loader, "target", ()=>{
@@ -42904,15 +42909,15 @@ const applyLoaderDefaults = (loader, { targetProperties, environment })=>{
42904
42909
  const applyNodeDefaults = (node, { outputModule, targetProperties })=>{
42905
42910
  if (false === node) return;
42906
42911
  F(node, "global", ()=>{
42907
- if (null == targetProperties ? void 0 : targetProperties.global) return false;
42912
+ if (targetProperties?.global) return false;
42908
42913
  return "warn";
42909
42914
  });
42910
42915
  F(node, "__dirname", ()=>{
42911
- if (null == targetProperties ? void 0 : targetProperties.node) return outputModule ? "node-module" : "eval-only";
42916
+ if (targetProperties?.node) return outputModule ? "node-module" : "eval-only";
42912
42917
  return "warn-mock";
42913
42918
  });
42914
42919
  F(node, "__filename", ()=>{
42915
- if (null == targetProperties ? void 0 : targetProperties.node) return outputModule ? "node-module" : "eval-only";
42920
+ if (targetProperties?.node) return outputModule ? "node-module" : "eval-only";
42916
42921
  return "warn-mock";
42917
42922
  });
42918
42923
  };
@@ -43032,7 +43037,7 @@ const getResolveDefaults = ({ context, targetProperties, mode, css })=>{
43032
43037
  ".wasm"
43033
43038
  ];
43034
43039
  const tp = targetProperties;
43035
- const browserField = (null == tp ? void 0 : tp.web) && (!tp.node || tp.electron && tp.electronRenderer);
43040
+ const browserField = tp?.web && (!tp.node || tp.electron && tp.electronRenderer);
43036
43041
  const aliasFields = browserField ? [
43037
43042
  "browser"
43038
43043
  ] : [];
@@ -43332,7 +43337,6 @@ const getNormalizedRspackOptions = (config)=>({
43332
43337
  return {
43333
43338
  ...experiments,
43334
43339
  cache: optionalNestedConfig(experiments.cache, (cache)=>{
43335
- var _cache_storage;
43336
43340
  if ("boolean" == typeof cache) return cache;
43337
43341
  if ("memory" === cache.type) return cache;
43338
43342
  const snapshot = cache.snapshot || {};
@@ -43355,7 +43359,7 @@ const getNormalizedRspackOptions = (config)=>({
43355
43359
  },
43356
43360
  storage: {
43357
43361
  type: "filesystem",
43358
- directory: path_browserify_default().resolve(config.context || normalization_process.cwd(), (null == (_cache_storage = cache.storage) ? void 0 : _cache_storage.directory) || "node_modules/.cache/rspack")
43362
+ directory: path_browserify_default().resolve(config.context || normalization_process.cwd(), cache.storage?.directory || "node_modules/.cache/rspack")
43359
43363
  }
43360
43364
  };
43361
43365
  }),
@@ -43551,13 +43555,13 @@ function rmrf(fs, p, callback) {
43551
43555
  });
43552
43556
  }
43553
43557
  const join = (fs, rootPath, filename)=>{
43554
- if (null == fs ? void 0 : fs.join) return fs.join(rootPath, filename);
43558
+ if (fs?.join) return fs.join(rootPath, filename);
43555
43559
  if (path_browserify_default().posix.isAbsolute(rootPath)) return path_browserify_default().posix.join(rootPath, filename);
43556
43560
  if (path_browserify_default().win32.isAbsolute(rootPath)) return path_browserify_default().win32.join(rootPath, filename);
43557
43561
  throw new Error(`${rootPath} is neither a posix nor a windows path, and there is no 'join' method defined in the file system`);
43558
43562
  };
43559
43563
  const fs_dirname = (fs, absPath)=>{
43560
- if (null == fs ? void 0 : fs.dirname) return fs.dirname(absPath);
43564
+ if (fs?.dirname) return fs.dirname(absPath);
43561
43565
  if (path_browserify_default().posix.isAbsolute(absPath)) return path_browserify_default().posix.dirname(absPath);
43562
43566
  if (path_browserify_default().win32.isAbsolute(absPath)) return path_browserify_default().win32.dirname(absPath);
43563
43567
  throw new Error(`${absPath} is neither a posix nor a windows path, and there is no 'dirname' method defined in the file system`);
@@ -44657,10 +44661,9 @@ const createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>
44657
44661
  return getCompiler().__internal__get_compilation().hooks.runtimeModule;
44658
44662
  }, function(queried) {
44659
44663
  return function({ module: module1, chunk }) {
44660
- var _module_source, _module_source1;
44661
- const originSource = null == (_module_source = module1.source) ? void 0 : _module_source.source;
44664
+ const originSource = module1.source?.source;
44662
44665
  queried.call(module1, chunk);
44663
- const newSource = null == (_module_source1 = module1.source) ? void 0 : _module_source1.source;
44666
+ const newSource = module1.source?.source;
44664
44667
  if (newSource && newSource !== originSource) return module1;
44665
44668
  };
44666
44669
  }),
@@ -44690,7 +44693,7 @@ const createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>
44690
44693
  }, function(queried) {
44691
44694
  return function({ entry, id, codegenResults, runtimeModules }) {
44692
44695
  try {
44693
- const __nested_webpack_require_6719_6738__ = (id)=>{
44696
+ const __nested_webpack_require_6499_6518__ = (id)=>{
44694
44697
  const cached = moduleCache[id];
44695
44698
  if (void 0 !== cached) {
44696
44699
  if (cached.error) throw cached.error;
@@ -44704,7 +44707,7 @@ const createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>
44704
44707
  loaded: false,
44705
44708
  error: void 0
44706
44709
  },
44707
- require: __nested_webpack_require_6719_6738__
44710
+ require: __nested_webpack_require_6499_6518__
44708
44711
  };
44709
44712
  for (const handler of interceptModuleExecution)handler(execOptions);
44710
44713
  const result = codegenResults.map[id]["build time"];
@@ -44714,15 +44717,15 @@ const createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>
44714
44717
  codeGenerationResult: new CodeGenerationResult(result),
44715
44718
  moduleObject
44716
44719
  }, {
44717
- __webpack_require__: __nested_webpack_require_6719_6738__
44720
+ __webpack_require__: __nested_webpack_require_6499_6518__
44718
44721
  }), "Compilation.hooks.executeModule");
44719
44722
  moduleObject.loaded = true;
44720
44723
  return moduleObject.exports;
44721
44724
  };
44722
- const moduleCache = __nested_webpack_require_6719_6738__[RuntimeGlobals.moduleCache.replace(`${RuntimeGlobals.require}.`, "")] = {};
44723
- const interceptModuleExecution = __nested_webpack_require_6719_6738__[RuntimeGlobals.interceptModuleExecution.replace(`${RuntimeGlobals.require}.`, "")] = [];
44724
- for (const runtimeModule of runtimeModules)__nested_webpack_require_6719_6738__(runtimeModule);
44725
- const executeResult = __nested_webpack_require_6719_6738__(entry);
44725
+ const moduleCache = __nested_webpack_require_6499_6518__[RuntimeGlobals.moduleCache.replace(`${RuntimeGlobals.require}.`, "")] = {};
44726
+ const interceptModuleExecution = __nested_webpack_require_6499_6518__[RuntimeGlobals.interceptModuleExecution.replace(`${RuntimeGlobals.require}.`, "")] = [];
44727
+ for (const runtimeModule of runtimeModules)__nested_webpack_require_6499_6518__(runtimeModule);
44728
+ const executeResult = __nested_webpack_require_6499_6518__(entry);
44726
44729
  getCompiler().__internal__get_module_execution_results_map().set(id, executeResult);
44727
44730
  } catch (e) {
44728
44731
  getCompiler().__internal__get_module_execution_results_map().set(id, e);
@@ -44873,12 +44876,10 @@ const createCompilerHooksRegisters = (getCompiler, createTap)=>({
44873
44876
  targetPath,
44874
44877
  outputPath,
44875
44878
  get source () {
44876
- var _getCompiler___internal__get_compilation_getAsset;
44877
- return null == (_getCompiler___internal__get_compilation_getAsset = getCompiler().__internal__get_compilation().getAsset(filename)) ? void 0 : _getCompiler___internal__get_compilation_getAsset.source;
44879
+ return getCompiler().__internal__get_compilation().getAsset(filename)?.source;
44878
44880
  },
44879
44881
  get content () {
44880
- var _this_source;
44881
- return null == (_this_source = this.source) ? void 0 : _this_source.buffer();
44882
+ return this.source?.buffer();
44882
44883
  }
44883
44884
  });
44884
44885
  };
@@ -45205,21 +45206,14 @@ class NativeWatchFileSystem {
45205
45206
  if ("function" != typeof callbackUndelayed && callbackUndelayed) throw new Error("Invalid arguments: 'callbackUndelayed'");
45206
45207
  const nativeWatcher = this.getNativeWatcher(options);
45207
45208
  nativeWatcher.watch(this.formatWatchDependencies(files), this.formatWatchDependencies(directories), this.formatWatchDependencies(missing), BigInt(startTime), (err, result)=>{
45208
- var _class_private_field_get1;
45209
45209
  if (err) return void callback(err, new Map(), new Map(), new Set(), new Set());
45210
45210
  nativeWatcher.pause();
45211
45211
  const changedFiles = result.changedFiles;
45212
45212
  const removedFiles = result.removedFiles;
45213
- if (null == (_class_private_field_get1 = NativeWatchFileSystem_class_private_field_get(this, _inputFileSystem)) ? void 0 : _class_private_field_get1.purge) {
45213
+ if (NativeWatchFileSystem_class_private_field_get(this, _inputFileSystem)?.purge) {
45214
45214
  const fs = NativeWatchFileSystem_class_private_field_get(this, _inputFileSystem);
45215
- for (const item of changedFiles){
45216
- var _fs_purge;
45217
- null == (_fs_purge = fs.purge) || _fs_purge.call(fs, item);
45218
- }
45219
- for (const item of removedFiles){
45220
- var _fs_purge1;
45221
- null == (_fs_purge1 = fs.purge) || _fs_purge1.call(fs, item);
45222
- }
45215
+ for (const item of changedFiles)fs.purge?.(item);
45216
+ for (const item of removedFiles)fs.purge?.(item);
45223
45217
  }
45224
45218
  callback(err, new Map(), new Map(), new Set(changedFiles), new Set(removedFiles));
45225
45219
  }, (fileName)=>{
@@ -45260,8 +45254,7 @@ class NativeWatchFileSystem {
45260
45254
  return nativeWatcher;
45261
45255
  }
45262
45256
  triggerEvent(kind, path) {
45263
- var _class_private_field_get1;
45264
- null == (_class_private_field_get1 = NativeWatchFileSystem_class_private_field_get(this, NativeWatchFileSystem_inner)) || _class_private_field_get1.triggerEvent(kind, path);
45257
+ NativeWatchFileSystem_class_private_field_get(this, NativeWatchFileSystem_inner)?.triggerEvent(kind, path);
45265
45258
  }
45266
45259
  formatWatchDependencies(dependencies) {
45267
45260
  if (NativeWatchFileSystem_class_private_field_get(this, _isFirstWatch)) return [
@@ -45343,9 +45336,8 @@ class VirtualModulesPlugin {
45343
45336
  notifyWatchers(VirtualModulesPlugin_class_private_field_get(this, _compiler), fullPath, Date.now());
45344
45337
  }
45345
45338
  getVirtualFileStore() {
45346
- var _class_private_field_get1;
45347
45339
  if (VirtualModulesPlugin_class_private_field_get(this, _store)) return VirtualModulesPlugin_class_private_field_get(this, _store);
45348
- const store = null == (_class_private_field_get1 = VirtualModulesPlugin_class_private_field_get(this, _compiler)) ? void 0 : _class_private_field_get1.__internal__get_virtual_file_store();
45340
+ const store = VirtualModulesPlugin_class_private_field_get(this, _compiler)?.__internal__get_virtual_file_store();
45349
45341
  if (!store) throw new Error("Virtual file store has not been initialized");
45350
45342
  VirtualModulesPlugin_class_private_field_set(this, _store, store);
45351
45343
  return store;
@@ -45914,8 +45906,7 @@ class Compiler {
45914
45906
  });
45915
45907
  }
45916
45908
  purgeInputFileSystem() {
45917
- var _this_inputFileSystem_purge, _this_inputFileSystem;
45918
- null == (_this_inputFileSystem = this.inputFileSystem) || null == (_this_inputFileSystem_purge = _this_inputFileSystem.purge) || _this_inputFileSystem_purge.call(_this_inputFileSystem);
45909
+ this.inputFileSystem?.purge?.();
45919
45910
  }
45920
45911
  createChildCompiler(compilation, compilerName, compilerIndex, outputOptions, plugins) {
45921
45912
  const options = {
@@ -45989,18 +45980,17 @@ class Compiler {
45989
45980
  this.hooks.shutdown.callAsync((err)=>{
45990
45981
  if (err) return callback(err);
45991
45982
  this.cache.shutdown(()=>{
45992
- var _class_private_field_get1;
45993
- null == (_class_private_field_get1 = Compiler_class_private_field_get(this, _instance)) || _class_private_field_get1.close();
45983
+ Compiler_class_private_field_get(this, _instance)?.close();
45994
45984
  callback();
45995
45985
  });
45996
45986
  });
45997
45987
  }
45998
45988
  __internal__rebuild(modifiedFiles, removedFiles, callback) {
45999
45989
  Compiler_class_private_method_get(this, _getInstance, getInstance).call(this, (error, instance)=>{
46000
- if (error) return null == callback ? void 0 : callback(error);
45990
+ if (error) return callback?.(error);
46001
45991
  instance.rebuild(Array.from(modifiedFiles || []), Array.from(removedFiles || []), (error)=>{
46002
- if (error) return null == callback ? void 0 : callback(error);
46003
- null == callback || callback(null);
45992
+ if (error) return callback?.(error);
45993
+ callback?.(null);
46004
45994
  });
46005
45995
  });
46006
45996
  }
@@ -46015,8 +46005,7 @@ class Compiler {
46015
46005
  return compilation;
46016
46006
  }
46017
46007
  __internal__get_virtual_file_store() {
46018
- var _class_private_field_get1;
46019
- return null == (_class_private_field_get1 = Compiler_class_private_field_get(this, _instance)) ? void 0 : _class_private_field_get1.getVirtualFileStore();
46008
+ return Compiler_class_private_field_get(this, _instance)?.getVirtualFileStore();
46020
46009
  }
46021
46010
  __internal__registerBuiltinPlugin(plugin) {
46022
46011
  Compiler_class_private_field_get(this, _builtinPlugins).push(plugin);
@@ -46413,7 +46402,7 @@ class MultiStats {
46413
46402
  return this.stats.some((stat)=>stat.hasWarnings());
46414
46403
  }
46415
46404
  toJson(options) {
46416
- const childOptions = MultiStats_class_private_method_get(this, _createChildOptions, createChildOptions).call(this, options || {}, {
46405
+ const childOptions = MultiStats_class_private_method_get(this, _createChildOptions, createChildOptions).call(this, options, {
46417
46406
  forToString: false
46418
46407
  });
46419
46408
  const obj = {};
@@ -46425,7 +46414,7 @@ class MultiStats {
46425
46414
  return obj;
46426
46415
  });
46427
46416
  if (childOptions.version) {
46428
- obj.rspackVersion = "1.6.0-canary-e28e40e9-20251022173516";
46417
+ obj.rspackVersion = "1.6.0-canary-4ad8b49f-20251023175711";
46429
46418
  obj.version = "5.75.0";
46430
46419
  }
46431
46420
  if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
@@ -46452,7 +46441,7 @@ class MultiStats {
46452
46441
  return obj;
46453
46442
  }
46454
46443
  toString(options) {
46455
- const childOptions = MultiStats_class_private_method_get(this, _createChildOptions, createChildOptions).call(this, options || {}, {
46444
+ const childOptions = MultiStats_class_private_method_get(this, _createChildOptions, createChildOptions).call(this, options, {
46456
46445
  forToString: true
46457
46446
  });
46458
46447
  const results = this.stats.map((stat, idx)=>{
@@ -46470,8 +46459,8 @@ class MultiStats {
46470
46459
  this.stats = stats;
46471
46460
  }
46472
46461
  }
46473
- function createChildOptions(options, context) {
46474
- const { children: childrenOptions, ...baseOptions } = "string" == typeof options ? {
46462
+ function createChildOptions(options = {}, context) {
46463
+ const { children: childrenOptions, ...baseOptions } = "string" == typeof options || "boolean" == typeof options ? {
46475
46464
  preset: options
46476
46465
  } : options;
46477
46466
  const children = this.stats.map((stat, idx)=>{
@@ -46773,10 +46762,7 @@ class MultiCompiler {
46773
46762
  });
46774
46763
  }
46775
46764
  purgeInputFileSystem() {
46776
- for (const compiler of this.compilers){
46777
- var _compiler_inputFileSystem_purge, _compiler_inputFileSystem;
46778
- null == (_compiler_inputFileSystem = compiler.inputFileSystem) || null == (_compiler_inputFileSystem_purge = _compiler_inputFileSystem.purge) || _compiler_inputFileSystem_purge.call(_compiler_inputFileSystem);
46779
- }
46765
+ for (const compiler of this.compilers)compiler.inputFileSystem?.purge?.();
46780
46766
  }
46781
46767
  close(callback) {
46782
46768
  asyncLib.each(this.compilers, (compiler, cb)=>{
@@ -46810,7 +46796,7 @@ class MultiCompiler {
46810
46796
  };
46811
46797
  this.compilers = normalizedCompilers;
46812
46798
  this._options = {
46813
- parallelism: (null == options ? void 0 : options.parallelism) || 1 / 0
46799
+ parallelism: options?.parallelism || 1 / 0
46814
46800
  };
46815
46801
  this.dependencies = new WeakMap();
46816
46802
  this.running = false;
@@ -46955,7 +46941,7 @@ class MemoryCachePlugin {
46955
46941
  name: MemoryCachePlugin.PLUGIN_NAME,
46956
46942
  stage: Cache.STAGE_MEMORY
46957
46943
  }, (identifier, etag, data)=>{
46958
- const dataEtag = "function" == typeof (null == etag ? void 0 : etag.toString) ? etag.toString() : etag;
46944
+ const dataEtag = "function" == typeof etag?.toString ? etag.toString() : etag;
46959
46945
  cache.set(identifier, {
46960
46946
  etag: dataEtag,
46961
46947
  data
@@ -46966,7 +46952,7 @@ class MemoryCachePlugin {
46966
46952
  stage: Cache.STAGE_MEMORY
46967
46953
  }, (identifier, etag, gotHandlers)=>{
46968
46954
  const cacheEntry = cache.get(identifier);
46969
- const dataEtag = "function" == typeof (null == etag ? void 0 : etag.toString) ? etag.toString() : etag;
46955
+ const dataEtag = "function" == typeof etag?.toString ? etag.toString() : etag;
46970
46956
  if (null === cacheEntry) return null;
46971
46957
  if (void 0 !== cacheEntry) return cacheEntry.etag === dataEtag ? cacheEntry.data : null;
46972
46958
  gotHandlers.push((result, callback)=>{
@@ -47316,12 +47302,9 @@ const ASSETS_GROUPERS = {
47316
47302
  groupAssetsByInfo: (groupConfigs)=>{
47317
47303
  const groupByAssetInfoFlag = (name)=>{
47318
47304
  groupConfigs.push({
47319
- getKeys: (asset)=>{
47320
- var _asset_info;
47321
- return (null == (_asset_info = asset.info) ? void 0 : _asset_info[name]) ? [
47305
+ getKeys: (asset)=>asset.info?.[name] ? [
47322
47306
  "1"
47323
- ] : void 0;
47324
- },
47307
+ ] : void 0,
47325
47308
  createGroup: (key, children)=>({
47326
47309
  type: "assets by info",
47327
47310
  info: {
@@ -47555,10 +47538,7 @@ const RESULT_SORTERS = {
47555
47538
  };
47556
47539
  const MODULES_SORTER = {
47557
47540
  _: (comparators)=>{
47558
- comparators.push(compareSelect((m)=>m.commonAttributes.depth, compareNumbers), compareSelect((m)=>m.commonAttributes.preOrderIndex, compareNumbers), compareSelect((m)=>{
47559
- var _m_commonAttributes_moduleDescriptor;
47560
- return null == (_m_commonAttributes_moduleDescriptor = m.commonAttributes.moduleDescriptor) ? void 0 : _m_commonAttributes_moduleDescriptor.identifier;
47561
- }, DefaultStatsFactoryPlugin_compareIds));
47541
+ comparators.push(compareSelect((m)=>m.commonAttributes.depth, compareNumbers), compareSelect((m)=>m.commonAttributes.preOrderIndex, compareNumbers), compareSelect((m)=>m.commonAttributes.moduleDescriptor?.identifier, DefaultStatsFactoryPlugin_compareIds));
47562
47542
  }
47563
47543
  };
47564
47544
  const SORTERS = {
@@ -47699,7 +47679,6 @@ const SIMPLE_EXTRACTORS = {
47699
47679
  let currentList = rootList;
47700
47680
  let processedLogEntries = 0;
47701
47681
  for (const entry of logEntries){
47702
- var _entry_args;
47703
47682
  let type = entry.type;
47704
47683
  const typeBitFlag = getLogTypeBitFlag(type);
47705
47684
  if (!debugMode && (acceptedTypes & typeBitFlag) !== typeBitFlag) continue;
@@ -47711,7 +47690,7 @@ const SIMPLE_EXTRACTORS = {
47711
47690
  if (depthInCollapsedGroup > 0) depthInCollapsedGroup--;
47712
47691
  continue;
47713
47692
  }
47714
- const message = (null == (_entry_args = entry.args) ? void 0 : _entry_args.length) ? util.format(entry.args[0], ...entry.args.slice(1)) : "";
47693
+ const message = entry.args?.length ? util.format(entry.args[0], ...entry.args.slice(1)) : "";
47715
47694
  const newEntry = {
47716
47695
  type,
47717
47696
  message,
@@ -47740,7 +47719,7 @@ const SIMPLE_EXTRACTORS = {
47740
47719
  },
47741
47720
  version: (object)=>{
47742
47721
  object.version = "5.75.0";
47743
- object.rspackVersion = "1.6.0-canary-e28e40e9-20251022173516";
47722
+ object.rspackVersion = "1.6.0-canary-4ad8b49f-20251023175711";
47744
47723
  },
47745
47724
  env: (object, _compilation, _context, { _env })=>{
47746
47725
  object.env = _env;
@@ -47967,7 +47946,6 @@ const SIMPLE_EXTRACTORS = {
47967
47946
  },
47968
47947
  module$visible: {
47969
47948
  _: (object, module1, context, _options, factory)=>{
47970
- var _module_issuerDescriptor, _module_issuerDescriptor1;
47971
47949
  const { type } = context;
47972
47950
  const { commonAttributes } = module1;
47973
47951
  if (commonAttributes.moduleDescriptor) {
@@ -47983,8 +47961,8 @@ const SIMPLE_EXTRACTORS = {
47983
47961
  object.optional = commonAttributes.optional;
47984
47962
  object.orphan = commonAttributes.orphan;
47985
47963
  object.dependent = module1.dependent;
47986
- object.issuer = null == (_module_issuerDescriptor = module1.issuerDescriptor) ? void 0 : _module_issuerDescriptor.identifier;
47987
- object.issuerName = null == (_module_issuerDescriptor1 = module1.issuerDescriptor) ? void 0 : _module_issuerDescriptor1.name;
47964
+ object.issuer = module1.issuerDescriptor?.identifier;
47965
+ object.issuerName = module1.issuerDescriptor?.name;
47988
47966
  object.issuerPath = module1.issuerDescriptor && factory.create(`${type.slice(0, -8)}.issuerPath`, module1.issuerPath, context);
47989
47967
  object.failed = commonAttributes.failed;
47990
47968
  object.errors = commonAttributes.errors;
@@ -47993,10 +47971,9 @@ const SIMPLE_EXTRACTORS = {
47993
47971
  if (profile) object.profile = factory.create(`${type}.profile`, profile, context);
47994
47972
  },
47995
47973
  ids: (object, module1)=>{
47996
- var _module_issuerDescriptor;
47997
47974
  const { commonAttributes } = module1;
47998
47975
  if (commonAttributes.moduleDescriptor) object.id = commonAttributes.moduleDescriptor.id;
47999
- object.issuerId = null == (_module_issuerDescriptor = module1.issuerDescriptor) ? void 0 : _module_issuerDescriptor.id;
47976
+ object.issuerId = module1.issuerDescriptor?.id;
48000
47977
  object.chunks = commonAttributes.chunks;
48001
47978
  },
48002
47979
  moduleAssets: (object, module1)=>{
@@ -48136,8 +48113,7 @@ const SIMPLE_EXTRACTORS = {
48136
48113
  Object.assign(object, statsChunkOrigin);
48137
48114
  },
48138
48115
  ids: (object, origin)=>{
48139
- var _origin_moduleDescriptor;
48140
- object.moduleId = null == (_origin_moduleDescriptor = origin.moduleDescriptor) ? void 0 : _origin_moduleDescriptor.id;
48116
+ object.moduleId = origin.moduleDescriptor?.id;
48141
48117
  }
48142
48118
  },
48143
48119
  error: EXTRACT_ERROR,
@@ -48562,7 +48538,7 @@ const SIMPLE_PRINTERS = {
48562
48538
  "asset.emitted": (emitted, { green, formatFlag })=>emitted ? green(formatFlag("emitted")) : void 0,
48563
48539
  "asset.comparedForEmit": (comparedForEmit, { yellow, formatFlag })=>comparedForEmit ? yellow(formatFlag("compared for emit")) : void 0,
48564
48540
  "asset.cached": (cached, { green, formatFlag })=>cached ? green(formatFlag("cached")) : void 0,
48565
- "asset.isOverSizeLimit": (isOverSizeLimit, { yellow, formatFlag })=>isOverSizeLimit ? null == yellow ? void 0 : yellow(formatFlag("big")) : void 0,
48541
+ "asset.isOverSizeLimit": (isOverSizeLimit, { yellow, formatFlag })=>isOverSizeLimit ? yellow?.(formatFlag("big")) : void 0,
48566
48542
  "asset.info.immutable": (immutable, { green, formatFlag })=>immutable ? green(formatFlag("immutable")) : void 0,
48567
48543
  "asset.info.javascriptModule": (javascriptModule, { formatFlag })=>javascriptModule ? formatFlag("javascript module") : void 0,
48568
48544
  "asset.info.sourceFilename": (sourceFilename, { formatFlag })=>sourceFilename ? formatFlag(true === sourceFilename ? "from source file" : `from: ${sourceFilename}`) : void 0,
@@ -48595,7 +48571,7 @@ const SIMPLE_PRINTERS = {
48595
48571
  "module.codeGenerated": (codeGenerated, { formatFlag, yellow })=>codeGenerated ? yellow(formatFlag("code generated")) : void 0,
48596
48572
  "module.buildTimeExecuted": (buildTimeExecuted, { formatFlag, green })=>buildTimeExecuted ? green(formatFlag("build time executed")) : void 0,
48597
48573
  "module.cached": (cached, { formatFlag, green })=>cached ? green(formatFlag("cached")) : void 0,
48598
- "module.assets": (assets, { formatFlag, magenta })=>(null == assets ? void 0 : assets.length) ? magenta(formatFlag(`${assets.length} ${DefaultStatsPrinterPlugin_plural(assets.length, "asset", "assets")}`)) : void 0,
48574
+ "module.assets": (assets, { formatFlag, magenta })=>assets?.length ? magenta(formatFlag(`${assets.length} ${DefaultStatsPrinterPlugin_plural(assets.length, "asset", "assets")}`)) : void 0,
48599
48575
  "module.warnings": (warnings, { formatFlag, yellow })=>true === warnings ? yellow(formatFlag("warnings")) : warnings ? yellow(formatFlag(`${warnings} ${DefaultStatsPrinterPlugin_plural(warnings, "warning", "warnings")}`)) : void 0,
48600
48576
  "module.errors": (errors, { formatFlag, red })=>true === errors ? red(formatFlag("errors")) : errors ? red(formatFlag(`${errors} ${DefaultStatsPrinterPlugin_plural(errors, "error", "errors")}`)) : void 0,
48601
48577
  "module.providedExports": (providedExports, { formatFlag, cyan })=>{
@@ -49388,7 +49364,7 @@ class RspackOptionsApply {
49388
49364
  new AssetModulesPlugin().apply(compiler);
49389
49365
  if (options.experiments.asyncWebAssembly) new AsyncWebAssemblyModulesPlugin().apply(compiler);
49390
49366
  if (options.experiments.css) new CssModulesPlugin().apply(compiler);
49391
- new EntryOptionPlugin().apply(compiler);
49367
+ new lib_EntryOptionPlugin().apply(compiler);
49392
49368
  assertNotNill(options.context);
49393
49369
  compiler.hooks.entryOption.call(options.context, options.entry);
49394
49370
  new RuntimePlugin().apply(compiler);
@@ -49404,6 +49380,7 @@ class RspackOptionsApply {
49404
49380
  if (options.optimization.providedExports) new FlagDependencyExportsPlugin().apply(compiler);
49405
49381
  if (options.optimization.usedExports) new FlagDependencyUsagePlugin("global" === options.optimization.usedExports).apply(compiler);
49406
49382
  if (options.optimization.concatenateModules) new ModuleConcatenationPlugin().apply(compiler);
49383
+ if (options.experiments.inlineConst || options.experiments.inlineEnum) new InlineExportsPlugin().apply(compiler);
49407
49384
  if (options.optimization.mangleExports) new MangleExportsPlugin("size" !== options.optimization.mangleExports).apply(compiler);
49408
49385
  if (options.output.enabledLibraryTypes && options.output.enabledLibraryTypes.length > 0) for (const type of options.output.enabledLibraryTypes)new EnableLibraryPlugin(type).apply(compiler);
49409
49386
  if (options.optimization.splitChunks) new SplitChunksPlugin(options.optimization.splitChunks).apply(compiler);
@@ -49611,9 +49588,8 @@ class DllReferencePlugin {
49611
49588
  if ("manifest" in this.options) {
49612
49589
  const manifest = this.options.manifest;
49613
49590
  if ("string" == typeof manifest) {
49614
- var _compiler_inputFileSystem;
49615
49591
  const manifestParameter = manifest;
49616
- null == (_compiler_inputFileSystem = compiler.inputFileSystem) || _compiler_inputFileSystem.readFile(manifestParameter, "utf8", (err, result)=>{
49592
+ compiler.inputFileSystem?.readFile(manifestParameter, "utf8", (err, result)=>{
49617
49593
  if (err) return reject(err);
49618
49594
  if (!result) return reject(new DllManifestError(manifestParameter, `Can't read anything from ${manifestParameter}`));
49619
49595
  try {
@@ -49881,7 +49857,6 @@ function NodeWatchFileSystem_define_property(obj, key, value) {
49881
49857
  }
49882
49858
  class NodeWatchFileSystem {
49883
49859
  watch(files, directories, missing, startTime, options, callback, callbackUndelayed) {
49884
- var _this_watcher, _this_watcher1;
49885
49860
  if (!files || "function" != typeof files[Symbol.iterator]) throw new Error("Invalid arguments: 'files'");
49886
49861
  if (!directories || "function" != typeof directories[Symbol.iterator]) throw new Error("Invalid arguments: 'directories'");
49887
49862
  if (!missing || "function" != typeof missing[Symbol.iterator]) throw new Error("Invalid arguments: 'missing'");
@@ -49892,38 +49867,27 @@ class NodeWatchFileSystem {
49892
49867
  const oldWatcher = this.watcher;
49893
49868
  const Watchpack = __webpack_require__("../../node_modules/.pnpm/watchpack@2.4.4/node_modules/watchpack/lib/watchpack.js");
49894
49869
  this.watcher = new Watchpack(options);
49895
- if (callbackUndelayed) {
49896
- var _this_watcher2;
49897
- null == (_this_watcher2 = this.watcher) || _this_watcher2.once("change", callbackUndelayed);
49898
- }
49870
+ if (callbackUndelayed) this.watcher?.once("change", callbackUndelayed);
49899
49871
  const fetchTimeInfo = ()=>{
49900
- var _this_watcher;
49901
49872
  const fileTimeInfoEntries = new Map();
49902
49873
  const contextTimeInfoEntries = new Map();
49903
- null == (_this_watcher = this.watcher) || _this_watcher.collectTimeInfoEntries(fileTimeInfoEntries, contextTimeInfoEntries);
49874
+ this.watcher?.collectTimeInfoEntries(fileTimeInfoEntries, contextTimeInfoEntries);
49904
49875
  return {
49905
49876
  fileTimeInfoEntries,
49906
49877
  contextTimeInfoEntries
49907
49878
  };
49908
49879
  };
49909
- null == (_this_watcher = this.watcher) || _this_watcher.once("aggregated", (changes, removals)=>{
49910
- var _this_watcher, _this_inputFileSystem;
49911
- null == (_this_watcher = this.watcher) || _this_watcher.pause();
49912
- if (null == (_this_inputFileSystem = this.inputFileSystem) ? void 0 : _this_inputFileSystem.purge) {
49880
+ this.watcher?.once("aggregated", (changes, removals)=>{
49881
+ this.watcher?.pause();
49882
+ if (this.inputFileSystem?.purge) {
49913
49883
  const fs = this.inputFileSystem;
49914
- for (const item of changes){
49915
- var _fs_purge;
49916
- null == (_fs_purge = fs.purge) || _fs_purge.call(fs, item);
49917
- }
49918
- for (const item of removals){
49919
- var _fs_purge1;
49920
- null == (_fs_purge1 = fs.purge) || _fs_purge1.call(fs, item);
49921
- }
49884
+ for (const item of changes)fs.purge?.(item);
49885
+ for (const item of removals)fs.purge?.(item);
49922
49886
  }
49923
49887
  const { fileTimeInfoEntries, contextTimeInfoEntries } = fetchTimeInfo();
49924
49888
  callback(null, fileTimeInfoEntries, contextTimeInfoEntries, changes, removals);
49925
49889
  });
49926
- null == (_this_watcher1 = this.watcher) || _this_watcher1.watch({
49890
+ this.watcher?.watch({
49927
49891
  files,
49928
49892
  directories,
49929
49893
  missing,
@@ -49941,45 +49905,30 @@ class NodeWatchFileSystem {
49941
49905
  if (this.watcher) this.watcher.pause();
49942
49906
  },
49943
49907
  getAggregatedRemovals: util_default().deprecate(()=>{
49944
- var _this_watcher, _this_inputFileSystem;
49945
- const items = null == (_this_watcher = this.watcher) ? void 0 : _this_watcher.aggregatedRemovals;
49946
- if (items && (null == (_this_inputFileSystem = this.inputFileSystem) ? void 0 : _this_inputFileSystem.purge)) {
49908
+ const items = this.watcher?.aggregatedRemovals;
49909
+ if (items && this.inputFileSystem?.purge) {
49947
49910
  const fs = this.inputFileSystem;
49948
- for (const item of items){
49949
- var _fs_purge;
49950
- null == (_fs_purge = fs.purge) || _fs_purge.call(fs, item);
49951
- }
49911
+ for (const item of items)fs.purge?.(item);
49952
49912
  }
49953
49913
  return items ?? new Set();
49954
49914
  }, "Watcher.getAggregatedRemovals is deprecated in favor of Watcher.getInfo since that's more performant.", "DEP_WEBPACK_WATCHER_GET_AGGREGATED_REMOVALS"),
49955
49915
  getAggregatedChanges: util_default().deprecate(()=>{
49956
- var _this_watcher, _this_inputFileSystem;
49957
- const items = null == (_this_watcher = this.watcher) ? void 0 : _this_watcher.aggregatedChanges;
49958
- if (items && (null == (_this_inputFileSystem = this.inputFileSystem) ? void 0 : _this_inputFileSystem.purge)) {
49916
+ const items = this.watcher?.aggregatedChanges;
49917
+ if (items && this.inputFileSystem?.purge) {
49959
49918
  const fs = this.inputFileSystem;
49960
- for (const item of items){
49961
- var _fs_purge;
49962
- null == (_fs_purge = fs.purge) || _fs_purge.call(fs, item);
49963
- }
49919
+ for (const item of items)fs.purge?.(item);
49964
49920
  }
49965
49921
  return items ?? new Set();
49966
49922
  }, "Watcher.getAggregatedChanges is deprecated in favor of Watcher.getInfo since that's more performant.", "DEP_WEBPACK_WATCHER_GET_AGGREGATED_CHANGES"),
49967
49923
  getFileTimeInfoEntries: util_default().deprecate(()=>fetchTimeInfo().fileTimeInfoEntries, "Watcher.getFileTimeInfoEntries is deprecated in favor of Watcher.getInfo since that's more performant.", "DEP_WEBPACK_WATCHER_FILE_TIME_INFO_ENTRIES"),
49968
49924
  getContextTimeInfoEntries: util_default().deprecate(()=>fetchTimeInfo().contextTimeInfoEntries, "Watcher.getContextTimeInfoEntries is deprecated in favor of Watcher.getInfo since that's more performant.", "DEP_WEBPACK_WATCHER_CONTEXT_TIME_INFO_ENTRIES"),
49969
49925
  getInfo: ()=>{
49970
- var _this_watcher, _this_watcher1, _this_inputFileSystem;
49971
- const removals = (null == (_this_watcher = this.watcher) ? void 0 : _this_watcher.aggregatedRemovals) ?? new Set();
49972
- const changes = (null == (_this_watcher1 = this.watcher) ? void 0 : _this_watcher1.aggregatedChanges) ?? new Set();
49973
- if (null == (_this_inputFileSystem = this.inputFileSystem) ? void 0 : _this_inputFileSystem.purge) {
49926
+ const removals = this.watcher?.aggregatedRemovals ?? new Set();
49927
+ const changes = this.watcher?.aggregatedChanges ?? new Set();
49928
+ if (this.inputFileSystem?.purge) {
49974
49929
  const fs = this.inputFileSystem;
49975
- if (removals) for (const item of removals){
49976
- var _fs_purge;
49977
- null == (_fs_purge = fs.purge) || _fs_purge.call(fs, item);
49978
- }
49979
- if (changes) for (const item of changes){
49980
- var _fs_purge1;
49981
- null == (_fs_purge1 = fs.purge) || _fs_purge1.call(fs, item);
49982
- }
49930
+ if (removals) for (const item of removals)fs.purge?.(item);
49931
+ if (changes) for (const item of changes)fs.purge?.(item);
49983
49932
  }
49984
49933
  const { fileTimeInfoEntries, contextTimeInfoEntries } = fetchTimeInfo();
49985
49934
  return {
@@ -50167,9 +50116,8 @@ class NodeEnvironmentPlugin {
50167
50116
  else compiler.watchFileSystem = new NodeWatchFileSystem(inputFileSystem);
50168
50117
  compiler.hooks.beforeRun.tap("NodeEnvironmentPlugin", (compiler)=>{
50169
50118
  if (compiler.inputFileSystem === inputFileSystem) {
50170
- var _inputFileSystem_purge;
50171
50119
  compiler.fsStartTime = Date.now();
50172
- null == (_inputFileSystem_purge = inputFileSystem.purge) || _inputFileSystem_purge.call(inputFileSystem);
50120
+ inputFileSystem.purge?.();
50173
50121
  }
50174
50122
  });
50175
50123
  }
@@ -50737,7 +50685,7 @@ function transformSync(source, options) {
50737
50685
  const _options = JSON.stringify(options || {});
50738
50686
  return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
50739
50687
  }
50740
- const exports_rspackVersion = "1.6.0-canary-e28e40e9-20251022173516";
50688
+ const exports_rspackVersion = "1.6.0-canary-4ad8b49f-20251023175711";
50741
50689
  const exports_version = "5.75.0";
50742
50690
  const exports_WebpackError = Error;
50743
50691
  const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
@@ -50832,15 +50780,15 @@ const validateContext = ({ context })=>{
50832
50780
  if (context && !(0, path_browserify.isAbsolute)(context)) throw new Error(`${ERROR_PREFIX} "context" must be an absolute path, get "${context}".`);
50833
50781
  };
50834
50782
  const validateSplitChunks = ({ optimization })=>{
50835
- if (null == optimization ? void 0 : optimization.splitChunks) {
50783
+ if (optimization?.splitChunks) {
50836
50784
  const { minChunks } = optimization.splitChunks;
50837
50785
  if (void 0 !== minChunks && minChunks < 1) throw new Error(`${ERROR_PREFIX} "optimization.splitChunks.minChunks" must be greater than or equal to 1, get \`${minChunks}\`.`);
50838
50786
  }
50839
50787
  };
50840
50788
  const validateExternalUmd = ({ output, externals, externalsType })=>{
50841
50789
  let isLibraryUmd = false;
50842
- const library = null == output ? void 0 : output.library;
50843
- isLibraryUmd = "object" == typeof library && "type" in library ? "umd" === library.type : (null == output ? void 0 : output.libraryTarget) === "umd";
50790
+ const library = output?.library;
50791
+ isLibraryUmd = "object" == typeof library && "type" in library ? "umd" === library.type : output?.libraryTarget === "umd";
50844
50792
  if (!isLibraryUmd || void 0 !== externalsType && "umd" !== externalsType) return;
50845
50793
  const checkExternalItem = (externalItem)=>{
50846
50794
  if ("object" == typeof externalItem && null !== externalItem) for (const value of Object.values(externalItem))checkExternalItemValue(value);
@@ -50996,11 +50944,10 @@ class BrowserHttpImportEsmPlugin {
50996
50944
  return new URL(request, issuer).href;
50997
50945
  }
50998
50946
  resolveNodeModule(resolvedRequest) {
50999
- var _this_options_dependencyVersions;
51000
50947
  let domain = "";
51001
50948
  if ("function" == typeof this.options.domain) domain = this.options.domain(resolvedRequest);
51002
50949
  else if ("string" == typeof this.options.domain) domain = this.options.domain;
51003
- const version = (null == (_this_options_dependencyVersions = this.options.dependencyVersions) ? void 0 : _this_options_dependencyVersions[resolvedRequest.packageName]) || "latest";
50950
+ const version = this.options.dependencyVersions?.[resolvedRequest.packageName] || "latest";
51004
50951
  const versionedRequest = getRequestWithVersion(resolvedRequest.request, version);
51005
50952
  return `${domain}/${versionedRequest}`;
51006
50953
  }
@@ -51108,7 +51055,7 @@ class BrowserRequirePlugin {
51108
51055
  const { path: loaderPath } = (0, external_rspack_wasi_browser_js_.sync)("", id);
51109
51056
  if (!loaderPath) throw new Error(`Cannot find loader of ${id}`);
51110
51057
  const data = browser_fs["default"].readFileSync(loaderPath);
51111
- const code = (null == data ? void 0 : data.toString()) || "";
51058
+ const code = data?.toString() || "";
51112
51059
  const module1 = {
51113
51060
  exports: {}
51114
51061
  };
@@ -51145,4 +51092,4 @@ var __webpack_exports__EntryDependency = external_rspack_wasi_browser_js_.EntryD
51145
51092
  var __webpack_exports__ExternalModule = external_rspack_wasi_browser_js_.ExternalModule;
51146
51093
  var __webpack_exports__Module = external_rspack_wasi_browser_js_.Module;
51147
51094
  var __webpack_exports__NormalModule = external_rspack_wasi_browser_js_.NormalModule;
51148
- export { BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, DefinePlugin, DllPlugin, DllReferencePlugin, DynamicEntryPlugin, EntryOptionPlugin, EntryPlugin, EnvironmentPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, ExternalsPlugin, HotModuleReplacementPlugin, HtmlRspackPlugin, IgnorePlugin, LightningCssMinimizerRspackPlugin, LoaderOptionsPlugin, LoaderTargetPlugin, ModuleFilenameHelpers_namespaceObject as ModuleFilenameHelpers, MultiCompiler, MultiStats, NoEmitOnErrorsPlugin, NormalModuleReplacementPlugin, ProgressPlugin, ProvidePlugin, RspackOptionsApply, RuntimeGlobals, RuntimeModule, RuntimePlugin, SourceMapDevToolPlugin, Stats, statsFactoryUtils_StatsErrorCode as StatsErrorCode, SwcJsMinimizerRspackPlugin, Template, ValidationError, WarnCaseSensitiveModulesPlugin, exports_WebpackError as WebpackError, RspackOptionsApply as WebpackOptionsApply, builtinMemFs, exports_config as config, container, electron, exports_experiments as experiments, javascript, exports_library as library, exports_node as node, optimize, src_rspack as rspack, exports_rspackVersion as rspackVersion, sharing, sources, exports_util as util, exports_version as version, exports_wasm as wasm, web, webworker, __webpack_exports__AsyncDependenciesBlock as AsyncDependenciesBlock, __webpack_exports__ConcatenatedModule as ConcatenatedModule, __webpack_exports__ContextModule as ContextModule, __webpack_exports__Dependency as Dependency, __webpack_exports__EntryDependency as EntryDependency, __webpack_exports__ExternalModule as ExternalModule, __webpack_exports__Module as Module, __webpack_exports__NormalModule as NormalModule };
51095
+ export { BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, DefinePlugin, DllPlugin, DllReferencePlugin, DynamicEntryPlugin, lib_EntryOptionPlugin as EntryOptionPlugin, EntryPlugin, EnvironmentPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, ExternalsPlugin, HotModuleReplacementPlugin, HtmlRspackPlugin, IgnorePlugin, LightningCssMinimizerRspackPlugin, LoaderOptionsPlugin, LoaderTargetPlugin, ModuleFilenameHelpers_namespaceObject as ModuleFilenameHelpers, MultiCompiler, MultiStats, NoEmitOnErrorsPlugin, NormalModuleReplacementPlugin, ProgressPlugin, ProvidePlugin, RspackOptionsApply, RuntimeGlobals, RuntimeModule, RuntimePlugin, SourceMapDevToolPlugin, Stats, statsFactoryUtils_StatsErrorCode as StatsErrorCode, SwcJsMinimizerRspackPlugin, Template, ValidationError, WarnCaseSensitiveModulesPlugin, exports_WebpackError as WebpackError, RspackOptionsApply as WebpackOptionsApply, builtinMemFs, exports_config as config, container, electron, exports_experiments as experiments, javascript, exports_library as library, exports_node as node, optimize, src_rspack as rspack, exports_rspackVersion as rspackVersion, sharing, sources, exports_util as util, exports_version as version, exports_wasm as wasm, web, webworker, __webpack_exports__AsyncDependenciesBlock as AsyncDependenciesBlock, __webpack_exports__ConcatenatedModule as ConcatenatedModule, __webpack_exports__ContextModule as ContextModule, __webpack_exports__Dependency as Dependency, __webpack_exports__EntryDependency as EntryDependency, __webpack_exports__ExternalModule as ExternalModule, __webpack_exports__Module as Module, __webpack_exports__NormalModule as NormalModule };