@rspack/core 1.3.8 → 1.3.10

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.js CHANGED
@@ -238,6 +238,11 @@ var __webpack_modules__ = {
238
238
  module.exports = import("../compiled/tinypool/dist/index.js").then(function(module) {
239
239
  return module;
240
240
  });
241
+ },
242
+ "node:inspector": function(module) {
243
+ module.exports = import("node:inspector").then(function(module) {
244
+ return module;
245
+ });
241
246
  }
242
247
  }, __webpack_module_cache__ = {};
243
248
  function __webpack_require__(moduleId) {
@@ -418,6 +423,8 @@ for(var __webpack_i__ in (()=>{
418
423
  web: ()=>web,
419
424
  webworker: ()=>webworker
420
425
  });
426
+ var external_node_os_ = __webpack_require__("node:os");
427
+ "darwin" === __webpack_require__.n(external_node_os_)().platform() && void 0 === process.env.WATCHPACK_WATCHER_LIMIT && (process.env.WATCHPACK_WATCHER_LIMIT = "20");
421
428
  var binding_ = __webpack_require__("@rspack/binding"), binding_default = __webpack_require__.n(binding_);
422
429
  let lite_tapable_namespaceObject = require("@rspack/lite-tapable"), CHUNK_GROUP_MAPPINGS = new WeakMap();
423
430
  class ChunkGroup {
@@ -587,6 +594,9 @@ for(var __webpack_i__ in (()=>{
587
594
  constructor(binding){
588
595
  this.#inner = binding;
589
596
  }
597
+ hasChunkEntryDependentChunks(chunk) {
598
+ return this.#inner.hasChunkEntryDependentChunks(Chunk.__to_binding(chunk));
599
+ }
590
600
  getChunkModules(chunk) {
591
601
  return this.#inner.getChunkModules(Chunk.__to_binding(chunk));
592
602
  }
@@ -833,10 +843,10 @@ for(var __webpack_i__ in (()=>{
833
843
  return this.compilation.endTime;
834
844
  }
835
845
  hasErrors() {
836
- return this.#inner.hasErrors();
846
+ return this.#compilation.errors.length > 0 || this.#compilation.children.some((child)=>child.getStats().hasErrors());
837
847
  }
838
848
  hasWarnings() {
839
- return this.#inner.hasWarnings();
849
+ return this.#compilation.hooks.processWarnings.call(this.#compilation.warnings).length > 0 || this.#compilation.children.some((child)=>child.getStats().hasWarnings());
840
850
  }
841
851
  toJson(opts, forToString) {
842
852
  let options = this.compilation.createStatsOptions(opts, {
@@ -1518,6 +1528,13 @@ for(var __webpack_i__ in (()=>{
1518
1528
  value (value) {
1519
1529
  return this._has(Chunk.__to_binding(value));
1520
1530
  }
1531
+ }), Object.defineProperty(binding_.Sources.prototype, "get", {
1532
+ enumerable: !0,
1533
+ configurable: !0,
1534
+ value (sourceType) {
1535
+ let originalSource = this._get(sourceType);
1536
+ return originalSource ? JsSource.__from_binding(originalSource) : null;
1537
+ }
1521
1538
  });
1522
1539
  let checkCompilation = (compilation)=>{
1523
1540
  if (!(compilation instanceof Compilation)) throw TypeError('The \'compilation\' argument must be an instance of Compilation. This usually occurs when multiple versions of "@rspack/core" are used, or when the code in "@rspack/core" is executed multiple times.');
@@ -1545,6 +1562,7 @@ for(var __webpack_i__ in (()=>{
1545
1562
  };
1546
1563
  needAdditionalPass;
1547
1564
  #addIncludeDispatcher;
1565
+ #addEntryDispatcher;
1548
1566
  [Compilation_computedKey];
1549
1567
  constructor(compiler, inner){
1550
1568
  this.#inner = inner, this.#shutdown = !1;
@@ -1666,7 +1684,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1666
1684
  seal: new lite_tapable_namespaceObject.SyncHook([]),
1667
1685
  afterSeal: new lite_tapable_namespaceObject.AsyncSeriesHook([]),
1668
1686
  needAdditionalPass: new lite_tapable_namespaceObject.SyncBailHook([])
1669
- }, this.compiler = compiler, this.resolverFactory = compiler.resolverFactory, this.inputFileSystem = compiler.inputFileSystem, this.options = compiler.options, this.outputOptions = compiler.options.output, this.logging = new Map(), this.childrenCounters = {}, this.children = [], this.needAdditionalPass = !1, this.chunkGraph = ChunkGraph.__from_binding(inner.chunkGraph), this.moduleGraph = ModuleGraph.__from_binding(inner.moduleGraph), this.#addIncludeDispatcher = new AddIncludeDispatcher(inner.addInclude.bind(inner)), this[binding_.COMPILATION_HOOKS_MAP_SYMBOL] = new WeakMap();
1687
+ }, this.compiler = compiler, this.resolverFactory = compiler.resolverFactory, this.inputFileSystem = compiler.inputFileSystem, this.options = compiler.options, this.outputOptions = compiler.options.output, this.logging = new Map(), this.childrenCounters = {}, this.children = [], this.needAdditionalPass = !1, this.chunkGraph = ChunkGraph.__from_binding(inner.chunkGraph), this.moduleGraph = ModuleGraph.__from_binding(inner.moduleGraph), this.#addIncludeDispatcher = new AddEntryItemDispatcher(inner.addInclude.bind(inner)), this.#addEntryDispatcher = new AddEntryItemDispatcher(inner.addEntry.bind(inner)), this[binding_.COMPILATION_HOOKS_MAP_SYMBOL] = new WeakMap();
1670
1688
  }
1671
1689
  get hash() {
1672
1690
  return this.#inner.hash;
@@ -1723,6 +1741,9 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1723
1741
  get entries() {
1724
1742
  return new Entries(this.#inner.entries);
1725
1743
  }
1744
+ get codeGenerationResults() {
1745
+ return this.#inner.codeGenerationResults;
1746
+ }
1726
1747
  #createCachedAssets() {
1727
1748
  return new Proxy({}, {
1728
1749
  get: (_, property)=>{
@@ -1858,11 +1879,14 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1858
1879
  inner.spliceDiagnostic(0, length, errors.map((error)=>JsRspackDiagnostic.__to_binding(error, binding_.JsRspackSeverity.Error)));
1859
1880
  }
1860
1881
  get warnings() {
1861
- let inner = this.#inner, processWarningsHook = this.hooks.processWarnings, warnings = inner.getWarnings();
1882
+ let inner = this.#inner, warnings = inner.getWarnings();
1862
1883
  for (let item of [
1863
1884
  {
1864
1885
  method: "push",
1865
- handler: (target, thisArg, warns)=>Reflect.apply(target, thisArg, processWarningsHook.call(warns).map((warn)=>(inner.pushDiagnostic(JsRspackDiagnostic.__to_binding(warn, binding_.JsRspackSeverity.Warn)), warn)))
1886
+ handler (target, thisArg, warns) {
1887
+ for (let warn of warns)inner.pushDiagnostic(JsRspackDiagnostic.__to_binding(warn, binding_.JsRspackSeverity.Warn));
1888
+ return Reflect.apply(target, thisArg, warns);
1889
+ }
1866
1890
  },
1867
1891
  {
1868
1892
  method: "pop",
@@ -1874,15 +1898,12 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1874
1898
  },
1875
1899
  {
1876
1900
  method: "unshift",
1877
- handler (target, thisArg, warns) {
1878
- let warnings = processWarningsHook.call(warns);
1879
- return inner.spliceDiagnostic(0, 0, warnings.map((warn)=>JsRspackDiagnostic.__to_binding(warn, binding_.JsRspackSeverity.Warn))), Reflect.apply(target, thisArg, warnings);
1880
- }
1901
+ handler: (target, thisArg, warns)=>(inner.spliceDiagnostic(0, 0, warns.map((warn)=>JsRspackDiagnostic.__to_binding(warn, binding_.JsRspackSeverity.Warn))), Reflect.apply(target, thisArg, warns))
1881
1902
  },
1882
1903
  {
1883
1904
  method: "splice",
1884
1905
  handler (target, thisArg, [startIdx, delCount, ...warns]) {
1885
- let warnList = (warns = processWarningsHook.call(warns)).map((warn)=>JsRspackDiagnostic.__to_binding(warn, binding_.JsRspackSeverity.Warn));
1906
+ let warnList = warns.map((warn)=>JsRspackDiagnostic.__to_binding(warn, binding_.JsRspackSeverity.Warn));
1886
1907
  return inner.spliceDiagnostic(startIdx, startIdx + delCount, warnList), Reflect.apply(target, thisArg, [
1887
1908
  startIdx,
1888
1909
  delCount,
@@ -1992,6 +2013,11 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1992
2013
  addInclude(context, dependency, options, callback) {
1993
2014
  this.#addIncludeDispatcher.call(context, dependency, options, callback);
1994
2015
  }
2016
+ addEntry(context, dependency, optionsOrName, callback) {
2017
+ this.#addEntryDispatcher.call(context, dependency, "object" == typeof optionsOrName ? optionsOrName : {
2018
+ name: optionsOrName
2019
+ }, callback);
2020
+ }
1995
2021
  __internal__getAssetSource(filename) {
1996
2022
  let rawSource = this.#inner.getAssetSource(filename);
1997
2023
  if (rawSource) return JsSource.__from_binding(rawSource);
@@ -2036,7 +2062,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2036
2062
  static PROCESS_ASSETS_STAGE_ANALYSE = 4000;
2037
2063
  static PROCESS_ASSETS_STAGE_REPORT = 5000;
2038
2064
  }
2039
- class AddIncludeDispatcher {
2065
+ class AddEntryItemDispatcher {
2040
2066
  #inner;
2041
2067
  #running;
2042
2068
  #args = [];
@@ -2137,7 +2163,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2137
2163
  compiler.hooks.thisCompilation.tap("executeModule", (compilation)=>{
2138
2164
  compiler.__internal__get_module_execution_results_map().clear(), compilation.hooks.executeModule.tap("executeModule", (options, context)=>{
2139
2165
  let moduleObject = options.moduleObject, source = options.codeGenerationResult.get("javascript");
2140
- try {
2166
+ if (void 0 !== source) try {
2141
2167
  external_node_vm_default().runInThisContext(`(function(module, __webpack_module__, __webpack_exports__, exports, ${RuntimeGlobals.require}) {\n${source}\n})`, {
2142
2168
  filename: moduleObject.id
2143
2169
  }).call(moduleObject.exports, moduleObject, moduleObject, moduleObject.exports, moduleObject.exports, context.__webpack_require__);
@@ -3059,16 +3085,15 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
3059
3085
  });
3060
3086
  let external_node_fs_namespaceObject = require("node:fs");
3061
3087
  var external_node_fs_default = __webpack_require__.n(external_node_fs_namespaceObject);
3062
- let external_node_inspector_namespaceObject = require("node:inspector");
3063
- var external_node_inspector_default = __webpack_require__.n(external_node_inspector_namespaceObject);
3064
3088
  class JavaScriptTracer {
3065
3089
  static startTime;
3066
3090
  static events;
3067
3091
  static layer;
3068
3092
  static output;
3069
3093
  static session;
3070
- static initJavaScriptTrace(layer, output) {
3071
- this.session = new (external_node_inspector_default()).Session(), this.layer = layer, this.output = output, this.events = [];
3094
+ static async initJavaScriptTrace(layer, output) {
3095
+ let { Session } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "node:inspector"));
3096
+ this.session = new Session(), this.layer = layer, this.output = output, this.events = [];
3072
3097
  let hrtime = process.hrtime();
3073
3098
  this.startTime = 1000000 * hrtime[0] + Math.round(hrtime[1] / 1000);
3074
3099
  }
@@ -4191,7 +4216,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
4191
4216
  }
4192
4217
  function getRawCssParserOptions(parser) {
4193
4218
  return {
4194
- namedExports: parser.namedExports
4219
+ namedExports: parser.namedExports,
4220
+ url: parser.url
4195
4221
  };
4196
4222
  }
4197
4223
  function getRawGeneratorOptions(generator, type) {
@@ -4255,7 +4281,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
4255
4281
  };
4256
4282
  if ("function" == typeof dataUrl && null !== dataUrl) return (source, context)=>dataUrl(source, context);
4257
4283
  throw Error(`unreachable: AssetGeneratorDataUrl type should be one of "options", "function", but got ${dataUrl}`);
4258
- }(options.dataUrl) : void 0
4284
+ }(options.dataUrl) : void 0,
4285
+ binary: options.binary
4259
4286
  };
4260
4287
  }
4261
4288
  function getRawAssetResourceGeneratorOptions(options) {
@@ -4264,7 +4291,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
4264
4291
  filename: options.filename,
4265
4292
  outputPath: options.outputPath,
4266
4293
  publicPath: options.publicPath,
4267
- importMode: options.importMode
4294
+ importMode: options.importMode,
4295
+ binary: options.binary
4268
4296
  };
4269
4297
  }
4270
4298
  function getRawCssAutoOrModuleGeneratorOptions(options) {
@@ -4844,7 +4872,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
4844
4872
  return !1;
4845
4873
  }
4846
4874
  }
4847
- let compilationOptionsMap = new WeakMap(), templateRenderFunction = zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.any())).returns(zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.promise(zod_index_js_namespaceObject.z.string()))), templateParamFunction = zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.any())).returns(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.any()).or(zod_index_js_namespaceObject.z.promise(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.any())))), templateFilenameFunction = zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.string()), pluginOptionsSchema = zod_index_js_namespaceObject.z.strictObject({
4875
+ let compilationOptionsMap = new WeakMap(), templateRenderFunction = zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.any())).returns(zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.promise(zod_index_js_namespaceObject.z.string()))), templateParamFunction = zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.any())).returns(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.any()).or(zod_index_js_namespaceObject.z.promise(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.any())))), templateFilenameFunction = zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.string()), pluginOptionsSchema = zod_index_js_namespaceObject.z.object({
4848
4876
  filename: zod_index_js_namespaceObject.z.string().or(templateFilenameFunction).optional(),
4849
4877
  template: zod_index_js_namespaceObject.z.string().refine((val)=>!val.includes("!"), ()=>({
4850
4878
  message: "HtmlRspackPlugin does not support template path with loader yet"
@@ -4887,14 +4915,19 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
4887
4915
  favicon: zod_index_js_namespaceObject.z.string().optional(),
4888
4916
  meta: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string()))).optional(),
4889
4917
  hash: zod_index_js_namespaceObject.z.boolean().optional()
4890
- }), setPluginOptions = (compilation, options)=>{
4891
- compilationOptionsMap.set(compilation, options);
4892
- }, cleanPluginOptions = (compilation)=>{
4893
- compilationOptionsMap.delete(compilation);
4894
- }, HtmlRspackPluginImpl = base_create(binding_.BuiltinPluginName.HtmlRspackPlugin, function(c = {}) {
4918
+ }), getPluginOptions = (compilation, uid)=>{
4919
+ if (!(compilation instanceof Compilation)) throw TypeError("The 'compilation' argument must be an instance of Compilation");
4920
+ return compilationOptionsMap.get(compilation)?.[uid];
4921
+ }, setPluginOptions = (compilation, uid, options)=>{
4922
+ let optionsMap = compilationOptionsMap.get(compilation) || {};
4923
+ optionsMap[uid] = options, compilationOptionsMap.set(compilation, optionsMap);
4924
+ }, cleanPluginOptions = (compilation, uid)=>{
4925
+ let optionsMap = compilationOptionsMap.get(compilation) || {};
4926
+ delete optionsMap[uid], 0 === Object.keys(optionsMap).length ? compilationOptionsMap.delete(compilation) : compilationOptionsMap.set(compilation, optionsMap);
4927
+ }, HTML_PLUGIN_UID = 0, HtmlRspackPluginImpl = base_create(binding_.BuiltinPluginName.HtmlRspackPlugin, function(c = {}) {
4895
4928
  let templateParameters, templateFn, filenames;
4896
4929
  validate(c, pluginOptionsSchema);
4897
- let meta = {};
4930
+ let uid = HTML_PLUGIN_UID++, meta = {};
4898
4931
  for(let key in c.meta){
4899
4932
  let value = c.meta[key];
4900
4933
  "string" == typeof value ? meta[key] = {
@@ -4931,9 +4964,9 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
4931
4964
  return json;
4932
4965
  }
4933
4966
  this.hooks.compilation.tap("HtmlRspackPlugin", (compilationInstance)=>{
4934
- setPluginOptions(compilation = compilationInstance, c);
4967
+ setPluginOptions(compilation = compilationInstance, uid, c);
4935
4968
  }), this.hooks.done.tap("HtmlRspackPlugin", (stats)=>{
4936
- cleanPluginHooks(stats.compilation), cleanPluginOptions(stats.compilation);
4969
+ cleanPluginHooks(stats.compilation), cleanPluginOptions(stats.compilation, uid);
4937
4970
  });
4938
4971
  let templateContent = c.templateContent;
4939
4972
  if ("function" == typeof templateContent) templateFn = async (data)=>{
@@ -4988,7 +5021,8 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
4988
5021
  base,
4989
5022
  templateFn,
4990
5023
  templateContent,
4991
- templateParameters
5024
+ templateParameters,
5025
+ uid
4992
5026
  };
4993
5027
  }), HtmlRspackPlugin = HtmlRspackPluginImpl, voidTags = [
4994
5028
  "area",
@@ -5012,10 +5046,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
5012
5046
  voidTag: voidTags.includes(tagName),
5013
5047
  attributes: attributes || {},
5014
5048
  innerHTML
5015
- }), HtmlRspackPlugin.getCompilationOptions = (compilation)=>{
5016
- if (!(compilation instanceof Compilation)) throw TypeError("The 'compilation' argument must be an instance of Compilation");
5017
- return compilationOptionsMap.get(compilation);
5018
- }, HtmlRspackPlugin.getHooks = HtmlRspackPlugin.getCompilationHooks = (compilation)=>{
5049
+ }), HtmlRspackPlugin.getHooks = HtmlRspackPlugin.getCompilationHooks = (compilation)=>{
5019
5050
  checkCompilation(compilation);
5020
5051
  let hooks = hooks_compilationHooksMap.get(compilation);
5021
5052
  return void 0 === hooks && (hooks = {
@@ -5511,7 +5542,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
5511
5542
  integrities = new Map();
5512
5543
  options;
5513
5544
  validateError = null;
5514
- constructor(options){
5545
+ constructor(options = {}){
5515
5546
  let validateError = null;
5516
5547
  if ("object" != typeof options) throw Error("SubResourceIntegrity: argument must be an object");
5517
5548
  try {
@@ -6495,7 +6526,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6495
6526
  }, applyExperimentsDefaults = (experiments, { production, development })=>{
6496
6527
  F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "layers", !1), D(experiments, "topLevelAwait", !0), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !1), D(experiments.incremental, "providedExports", !1), D(experiments.incremental, "dependenciesDiagnostics", !1), D(experiments.incremental, "sideEffects", !1), D(experiments.incremental, "buildChunkGraph", !1), D(experiments.incremental, "moduleIds", !1), D(experiments.incremental, "chunkIds", !1), D(experiments.incremental, "modulesHashes", !1), D(experiments.incremental, "modulesCodegen", !1), D(experiments.incremental, "modulesRuntimeRequirements", !1), D(experiments.incremental, "chunksRuntimeRequirements", !1), D(experiments.incremental, "chunksHashes", !1), D(experiments.incremental, "chunksRender", !1), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !0), D(experiments, "parallelLoader", !1);
6497
6528
  }, applybundlerInfoDefaults = (rspackFuture, library)=>{
6498
- "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.3.8"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
6529
+ "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.3.10"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
6499
6530
  }, applySnapshotDefaults = (_snapshot, _env)=>{}, applyJavascriptParserOptionsDefaults = (parserOptions)=>{
6500
6531
  D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "wrappedContextCritical", !1), D(parserOptions, "wrappedContextRegExp", /.*/), D(parserOptions, "strictExportPresence", !1), D(parserOptions, "requireAsExpression", !0), D(parserOptions, "requireDynamic", !0), D(parserOptions, "requireResolve", !0), D(parserOptions, "importDynamic", !0), D(parserOptions, "worker", [
6501
6532
  "..."
@@ -6503,7 +6534,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6503
6534
  }, applyJsonGeneratorOptionsDefaults = (generatorOptions)=>{
6504
6535
  D(generatorOptions, "JSONParse", !0);
6505
6536
  }, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode })=>{
6506
- assertNotNill(module.parser), assertNotNill(module.generator), F(module.parser, "asset", ()=>({})), assertNotNill(module.parser.asset), F(module.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module.parser.asset.dataUrlCondition && D(module.parser.asset.dataUrlCondition, "maxSize", 8096), F(module.parser, "javascript", ()=>({})), assertNotNill(module.parser.javascript), applyJavascriptParserOptionsDefaults(module.parser.javascript), F(module.parser, JSON_MODULE_TYPE, ()=>({})), assertNotNill(module.parser[JSON_MODULE_TYPE]), D(module.parser[JSON_MODULE_TYPE], "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER), F(module.generator, "json", ()=>({})), assertNotNill(module.generator.json), applyJsonGeneratorOptionsDefaults(module.generator.json), css && (F(module.parser, "css", ()=>({})), assertNotNill(module.parser.css), D(module.parser.css, "namedExports", !0), F(module.parser, "css/auto", ()=>({})), assertNotNill(module.parser["css/auto"]), D(module.parser["css/auto"], "namedExports", !0), F(module.parser, "css/module", ()=>({})), assertNotNill(module.parser["css/module"]), D(module.parser["css/module"], "namedExports", !0), F(module.generator, "css", ()=>({})), assertNotNill(module.generator.css), D(module.generator.css, "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator.css, "esModule", !0), F(module.generator, "css/auto", ()=>({})), assertNotNill(module.generator["css/auto"]), D(module.generator["css/auto"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/auto"], "exportsConvention", "as-is"), D(module.generator["css/auto"], "localIdentName", "[uniqueName]-[id]-[local]"), D(module.generator["css/auto"], "esModule", !0), F(module.generator, "css/module", ()=>({})), assertNotNill(module.generator["css/module"]), D(module.generator["css/module"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/module"], "exportsConvention", "as-is"), D(module.generator["css/module"], "localIdentName", "[uniqueName]-[id]-[local]"), D(module.generator["css/module"], "esModule", !0)), A(module, "defaultRules", ()=>{
6537
+ assertNotNill(module.parser), assertNotNill(module.generator), F(module.parser, "asset", ()=>({})), assertNotNill(module.parser.asset), F(module.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module.parser.asset.dataUrlCondition && D(module.parser.asset.dataUrlCondition, "maxSize", 8096), F(module.parser, "javascript", ()=>({})), assertNotNill(module.parser.javascript), applyJavascriptParserOptionsDefaults(module.parser.javascript), F(module.parser, JSON_MODULE_TYPE, ()=>({})), assertNotNill(module.parser[JSON_MODULE_TYPE]), D(module.parser[JSON_MODULE_TYPE], "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER), F(module.generator, "json", ()=>({})), assertNotNill(module.generator.json), applyJsonGeneratorOptionsDefaults(module.generator.json), css && (F(module.parser, "css", ()=>({})), assertNotNill(module.parser.css), D(module.parser.css, "namedExports", !0), D(module.parser.css, "url", !0), F(module.parser, "css/auto", ()=>({})), assertNotNill(module.parser["css/auto"]), D(module.parser["css/auto"], "namedExports", !0), D(module.parser["css/auto"], "url", !0), F(module.parser, "css/module", ()=>({})), assertNotNill(module.parser["css/module"]), D(module.parser["css/module"], "namedExports", !0), D(module.parser["css/module"], "url", !0), F(module.generator, "css", ()=>({})), assertNotNill(module.generator.css), D(module.generator.css, "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator.css, "esModule", !0), F(module.generator, "css/auto", ()=>({})), assertNotNill(module.generator["css/auto"]), D(module.generator["css/auto"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/auto"], "exportsConvention", "as-is"), D(module.generator["css/auto"], "localIdentName", "[uniqueName]-[id]-[local]"), D(module.generator["css/auto"], "esModule", !0), F(module.generator, "css/module", ()=>({})), assertNotNill(module.generator["css/module"]), D(module.generator["css/module"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/module"], "exportsConvention", "as-is"), D(module.generator["css/module"], "localIdentName", "[uniqueName]-[id]-[local]"), D(module.generator["css/module"], "esModule", !0)), A(module, "defaultRules", ()=>{
6507
6538
  let esm = {
6508
6539
  type: "javascript/esm",
6509
6540
  resolve: {
@@ -6637,7 +6668,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6637
6668
  if ("ENOENT" !== err.code) throw err.message += `\nwhile determining default 'output.uniqueName' from 'name' in ${pkgPath}`, err;
6638
6669
  return "";
6639
6670
  }
6640
- }), F(output, "devtoolNamespace", ()=>output.uniqueName), F(output, "module", ()=>!!outputModule), D(output, "filename", output.module ? "[name].mjs" : "[name].js"), F(output, "iife", ()=>!output.module), F(output, "chunkFilename", ()=>{
6671
+ }), F(output, "devtoolNamespace", ()=>output.uniqueName), F(output, "module", ()=>!!outputModule);
6672
+ let environment = output.environment, optimistic = (v)=>v || void 0 === v, conditionallyOptimistic = (v, c)=>void 0 === v && c || v;
6673
+ F(environment, "globalThis", ()=>tp?.globalThis), F(environment, "bigIntLiteral", ()=>tp && optimistic(tp.bigIntLiteral)), F(environment, "const", ()=>tp && optimistic(tp.const)), F(environment, "arrowFunction", ()=>tp && optimistic(tp.arrowFunction)), F(environment, "asyncFunction", ()=>tp && optimistic(tp.asyncFunction)), F(environment, "forOf", ()=>tp && optimistic(tp.forOf)), F(environment, "destructuring", ()=>tp && optimistic(tp.destructuring)), F(environment, "optionalChaining", ()=>tp && optimistic(tp.optionalChaining)), F(environment, "nodePrefixForCoreModules", ()=>tp && optimistic(tp.nodePrefixForCoreModules)), F(environment, "templateLiteral", ()=>tp && optimistic(tp.templateLiteral)), F(environment, "dynamicImport", ()=>conditionallyOptimistic(tp?.dynamicImport, output.module)), F(environment, "dynamicImportInWorker", ()=>conditionallyOptimistic(tp?.dynamicImportInWorker, output.module)), F(environment, "module", ()=>conditionallyOptimistic(tp?.module, output.module)), F(environment, "document", ()=>tp && optimistic(tp.document)), D(output, "filename", output.module ? "[name].mjs" : "[name].js"), F(output, "iife", ()=>!output.module), F(output, "chunkFilename", ()=>{
6641
6674
  let filename = output.filename;
6642
6675
  if ("function" != typeof filename) {
6643
6676
  let hasName = filename.includes("[name]"), hasId = filename.includes("[id]"), hasChunkHash = filename.includes("[chunkhash]"), hasContentHash = filename.includes("[contenthash]");
@@ -6656,7 +6689,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6656
6689
  if (tp) {
6657
6690
  let helpMessage = isAffectedByBrowserslist ? "Make sure that your 'browserslist' includes only platforms that support these features or select an appropriate 'target' to allow selecting a chunk format by default. Alternatively specify the 'output.chunkFormat' directly." : "Select an appropriate 'target' to allow selecting one by default, or specify the 'output.chunkFormat' directly.";
6658
6691
  if (output.module) {
6659
- if (tp.dynamicImport) return "module";
6692
+ if (environment.dynamicImport) return "module";
6660
6693
  if (tp.document) return "array-push";
6661
6694
  throw Error(`For the selected environment is no default ESM chunk format available:\nESM exports can be chosen when 'import()' is available.\nJSONP Array push can be chosen when 'document' is available.\n${helpMessage}`);
6662
6695
  }
@@ -6678,9 +6711,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6678
6711
  if (tp.nodeBuiltins) return "async-node";
6679
6712
  break;
6680
6713
  case "module":
6681
- if (tp.dynamicImport) return "import";
6714
+ if (environment.dynamicImport) return "import";
6682
6715
  }
6683
- if (null === tp.require || null === tp.nodeBuiltins || null === tp.document || null === tp.importScripts) return "universal";
6716
+ if ((null === tp.require || null === tp.nodeBuiltins || null === tp.document || null === tp.importScripts) && output.module && environment.dynamicImport) return "universal";
6684
6717
  }
6685
6718
  return !1;
6686
6719
  }), F(output, "workerChunkLoading", ()=>{
@@ -6694,9 +6727,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6694
6727
  if (tp.nodeBuiltins) return "async-node";
6695
6728
  break;
6696
6729
  case "module":
6697
- if (tp.dynamicImportInWorker) return "import";
6730
+ if (environment.dynamicImportInWorker) return "import";
6698
6731
  }
6699
- if (null === tp.require || null === tp.nodeBuiltins || null === tp.importScriptsInWorker) return "universal";
6732
+ if ((null === tp.require || null === tp.nodeBuiltins || null === tp.importScriptsInWorker) && output.module && environment.dynamicImport) return "universal";
6700
6733
  }
6701
6734
  return !1;
6702
6735
  }), F(output, "wasmLoading", ()=>{
@@ -6732,8 +6765,6 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6732
6765
  let enabledWasmLoadingTypes = new Set();
6733
6766
  return output.wasmLoading && enabledWasmLoadingTypes.add(output.wasmLoading), output.workerWasmLoading && enabledWasmLoadingTypes.add(output.workerWasmLoading), Array.from(enabledWasmLoadingTypes);
6734
6767
  });
6735
- let environment = output.environment, optimistic = (v)=>v || void 0 === v, conditionallyOptimistic = (v, c)=>void 0 === v && c || v;
6736
- F(environment, "globalThis", ()=>tp?.globalThis), F(environment, "bigIntLiteral", ()=>tp && optimistic(tp.bigIntLiteral)), F(environment, "const", ()=>tp && optimistic(tp.const)), F(environment, "arrowFunction", ()=>tp && optimistic(tp.arrowFunction)), F(environment, "asyncFunction", ()=>tp && optimistic(tp.asyncFunction)), F(environment, "forOf", ()=>tp && optimistic(tp.forOf)), F(environment, "destructuring", ()=>tp && optimistic(tp.destructuring)), F(environment, "optionalChaining", ()=>tp && optimistic(tp.optionalChaining)), F(environment, "nodePrefixForCoreModules", ()=>tp && optimistic(tp.nodePrefixForCoreModules)), F(environment, "templateLiteral", ()=>tp && optimistic(tp.templateLiteral)), F(environment, "dynamicImport", ()=>conditionallyOptimistic(tp?.dynamicImport, output.module)), F(environment, "dynamicImportInWorker", ()=>conditionallyOptimistic(tp?.dynamicImportInWorker, output.module)), F(environment, "module", ()=>conditionallyOptimistic(tp?.module, output.module)), F(environment, "document", ()=>tp && optimistic(tp.document));
6737
6768
  }, applyExternalsPresetsDefaults = (externalsPresets, { targetProperties, buildHttp })=>{
6738
6769
  D(externalsPresets, "web", !buildHttp && targetProperties?.web), D(externalsPresets, "node", targetProperties?.node), D(externalsPresets, "electron", targetProperties?.electron), D(externalsPresets, "electronMain", targetProperties?.electron && targetProperties.electronMain), D(externalsPresets, "electronPreload", targetProperties?.electron && targetProperties.electronPreload), D(externalsPresets, "electronRenderer", targetProperties?.electron && targetProperties.electronRenderer), D(externalsPresets, "nwjs", targetProperties?.nwjs);
6739
6770
  }, applyLoaderDefaults = (loader, { targetProperties, environment })=>{
@@ -7398,7 +7429,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7398
7429
  },
7399
7430
  arm: "gnueabihf"
7400
7431
  }
7401
- }, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.3.8", getAddonPlatformArchAbi = ()=>{
7432
+ }, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.3.10", getAddonPlatformArchAbi = ()=>{
7402
7433
  let { platform, arch } = process, binding = "";
7403
7434
  binding += platform;
7404
7435
  let abi = NodePlatformArchToAbi[platform][arch];
@@ -7450,49 +7481,56 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7450
7481
  BINDING_VERSION,
7451
7482
  ADDON_VERSION
7452
7483
  ].every((v, _, arr)=>v === arr[0]) ? null : Error(`Unmatched version @rspack/core@${CORE_VERSION}, @rspack/binding@${BINDING_VERSION}, @rspack/binding-${platformArchAbi}@${ADDON_VERSION}.\nRspack requires these versions to be the same or you may have installed the wrong version. Otherwise, Rspack may not work properly.`);
7453
- }, createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap)=>({
7484
+ }, createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap)=>{
7485
+ let getOptions = (uid)=>getPluginOptions(getCompiler().__internal__get_compilation(), uid);
7486
+ return {
7454
7487
  registerHtmlPluginBeforeAssetTagGenerationTaps: createTap(binding_.RegisterJsTapKind.HtmlPluginBeforeAssetTagGeneration, function() {
7455
7488
  return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).beforeAssetTagGeneration;
7456
7489
  }, function(queried) {
7457
7490
  return async function(data) {
7458
- let compilationId = data.compilationId, res = await queried.promise({
7491
+ let { compilationId, uid } = data, res = await queried.promise({
7459
7492
  ...data,
7460
7493
  plugin: {
7461
- options: HtmlRspackPlugin.getCompilationOptions(getCompiler().__internal__get_compilation()) || {}
7494
+ options: getOptions(uid)
7462
7495
  }
7463
7496
  });
7464
- return res.compilationId = compilationId, res;
7497
+ return res.compilationId = compilationId, res.uid = uid, res;
7465
7498
  };
7466
7499
  }),
7467
7500
  registerHtmlPluginAlterAssetTagsTaps: createTap(binding_.RegisterJsTapKind.HtmlPluginAlterAssetTags, function() {
7468
7501
  return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).alterAssetTags;
7469
7502
  }, function(queried) {
7470
7503
  return async function(data) {
7471
- let compilationId = data.compilationId, res = await queried.promise(data);
7472
- return res.compilationId = compilationId, res;
7504
+ let { compilationId, uid } = data, res = await queried.promise({
7505
+ ...data,
7506
+ plugin: {
7507
+ options: getOptions(uid)
7508
+ }
7509
+ });
7510
+ return res.compilationId = compilationId, res.uid = uid, res;
7473
7511
  };
7474
7512
  }),
7475
7513
  registerHtmlPluginAlterAssetTagGroupsTaps: createTap(binding_.RegisterJsTapKind.HtmlPluginAlterAssetTagGroups, function() {
7476
7514
  return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).alterAssetTagGroups;
7477
7515
  }, function(queried) {
7478
7516
  return async function(data) {
7479
- let compilationId = data.compilationId, res = await queried.promise({
7517
+ let { compilationId, uid } = data, res = await queried.promise({
7480
7518
  ...data,
7481
7519
  plugin: {
7482
- options: HtmlRspackPlugin.getCompilationOptions(getCompiler().__internal__get_compilation()) || {}
7520
+ options: getOptions(uid)
7483
7521
  }
7484
7522
  });
7485
- return res.compilationId = compilationId, res;
7523
+ return res.compilationId = compilationId, res.uid = uid, res;
7486
7524
  };
7487
7525
  }),
7488
7526
  registerHtmlPluginAfterTemplateExecutionTaps: createTap(binding_.RegisterJsTapKind.HtmlPluginAfterTemplateExecution, function() {
7489
7527
  return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).afterTemplateExecution;
7490
7528
  }, function(queried) {
7491
7529
  return async function(data) {
7492
- let compilationId = data.compilationId, res = await queried.promise({
7530
+ let { compilationId, uid } = data, res = await queried.promise({
7493
7531
  ...data,
7494
7532
  plugin: {
7495
- options: HtmlRspackPlugin.getCompilationOptions(getCompiler().__internal__get_compilation()) || {}
7533
+ options: getOptions(uid)
7496
7534
  }
7497
7535
  });
7498
7536
  return res.compilationId = compilationId, res;
@@ -7502,158 +7540,30 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7502
7540
  return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).beforeEmit;
7503
7541
  }, function(queried) {
7504
7542
  return async function(data) {
7505
- let compilationId = data.compilationId, res = await queried.promise({
7543
+ let { compilationId, uid } = data, res = await queried.promise({
7506
7544
  ...data,
7507
7545
  plugin: {
7508
- options: HtmlRspackPlugin.getCompilationOptions(getCompiler().__internal__get_compilation()) || {}
7546
+ options: getOptions(uid)
7509
7547
  }
7510
7548
  });
7511
- return res.compilationId = compilationId, res;
7549
+ return res.compilationId = compilationId, res.uid = uid, res;
7512
7550
  };
7513
7551
  }),
7514
7552
  registerHtmlPluginAfterEmitTaps: createTap(binding_.RegisterJsTapKind.HtmlPluginAfterEmit, function() {
7515
7553
  return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).afterEmit;
7516
7554
  }, function(queried) {
7517
7555
  return async function(data) {
7518
- let compilationId = data.compilationId, res = await queried.promise({
7556
+ let { compilationId, uid } = data, res = await queried.promise({
7519
7557
  ...data,
7520
7558
  plugin: {
7521
- options: HtmlRspackPlugin.getCompilationOptions(getCompiler().__internal__get_compilation()) || {}
7559
+ options: getOptions(uid)
7522
7560
  }
7523
7561
  });
7524
- return res.compilationId = compilationId, res;
7562
+ return res.compilationId = compilationId, res.uid = uid, res;
7525
7563
  };
7526
7564
  })
7527
- });
7528
- class ContextModuleFactoryBeforeResolveData {
7529
- #inner;
7530
- static __from_binding(binding) {
7531
- return new ContextModuleFactoryBeforeResolveData(binding);
7532
- }
7533
- static __to_binding(data) {
7534
- return data.#inner;
7535
- }
7536
- constructor(binding){
7537
- this.#inner = binding, Object.defineProperties(this, {
7538
- context: {
7539
- enumerable: !0,
7540
- get: ()=>binding.context,
7541
- set (val) {
7542
- binding.context = val;
7543
- }
7544
- },
7545
- request: {
7546
- enumerable: !0,
7547
- get: ()=>binding.request,
7548
- set (val) {
7549
- binding.request = val;
7550
- }
7551
- },
7552
- regExp: {
7553
- enumerable: !0,
7554
- get: ()=>binding.regExp,
7555
- set (val) {
7556
- binding.regExp = val;
7557
- }
7558
- },
7559
- recursive: {
7560
- enumerable: !0,
7561
- get: ()=>binding.recursive,
7562
- set (val) {
7563
- binding.recursive = val;
7564
- }
7565
- }
7566
- });
7567
- }
7568
- }
7569
- class ContextModuleFactoryAfterResolveData {
7570
- #inner;
7571
- static __from_binding(binding) {
7572
- return new ContextModuleFactoryAfterResolveData(binding);
7573
- }
7574
- static __to_binding(data) {
7575
- return data.#inner;
7576
- }
7577
- constructor(binding){
7578
- this.#inner = binding, Object.defineProperties(this, {
7579
- resource: {
7580
- enumerable: !0,
7581
- get: ()=>binding.resource,
7582
- set (val) {
7583
- binding.resource = val;
7584
- }
7585
- },
7586
- context: {
7587
- enumerable: !0,
7588
- get: ()=>binding.context,
7589
- set (val) {
7590
- binding.context = val;
7591
- }
7592
- },
7593
- request: {
7594
- enumerable: !0,
7595
- get: ()=>binding.request,
7596
- set (val) {
7597
- binding.request = val;
7598
- }
7599
- },
7600
- regExp: {
7601
- enumerable: !0,
7602
- get: ()=>binding.regExp,
7603
- set (val) {
7604
- binding.regExp = val;
7605
- }
7606
- },
7607
- recursive: {
7608
- enumerable: !0,
7609
- get: ()=>binding.recursive,
7610
- set (val) {
7611
- binding.recursive = val;
7612
- }
7613
- },
7614
- dependencies: {
7615
- enumerable: !0,
7616
- get: ()=>binding.dependencies
7617
- }
7618
- });
7619
- }
7620
- }
7621
- Object.defineProperty(binding_.Module.prototype, "identifier", {
7622
- enumerable: !0,
7623
- configurable: !0,
7624
- value () {
7625
- return this[binding_.MODULE_IDENTIFIER_SYMBOL];
7626
- }
7627
- }), Object.defineProperty(binding_.Module.prototype, "readableIdentifier", {
7628
- enumerable: !0,
7629
- configurable: !0,
7630
- value () {
7631
- return this._readableIdentifier;
7632
- }
7633
- }), Object.defineProperty(binding_.Module.prototype, "originalSource", {
7634
- enumerable: !0,
7635
- configurable: !0,
7636
- value () {
7637
- let originalSource = this._originalSource();
7638
- return originalSource ? JsSource.__from_binding(originalSource) : null;
7639
- }
7640
- }), Object.defineProperty(binding_.Module.prototype, "emitFile", {
7641
- enumerable: !0,
7642
- configurable: !0,
7643
- value (filename, source, assetInfo) {
7644
- return this._emitFile(filename, JsSource.__to_binding(source), assetInfo);
7645
- }
7646
- });
7647
- class CodeGenerationResult {
7648
- #inner;
7649
- constructor(result){
7650
- this.#inner = result;
7651
- }
7652
- get(sourceType) {
7653
- return this.#inner.sources[sourceType];
7654
- }
7655
- }
7656
- let RESERVED_RUNTIME_GLOBALS = new Map();
7565
+ };
7566
+ }, RESERVED_RUNTIME_GLOBALS = new Map();
7657
7567
  function __from_binding_runtime_globals(runtimeRequirements) {
7658
7568
  let res = new Set();
7659
7569
  for (let flag of runtimeRequirements.value)flag in RuntimeGlobals ? res.add(RuntimeGlobals[flag]) : res.add(flag);
@@ -7742,7 +7652,17 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7742
7652
  asyncModule: "__webpack_require__.a"
7743
7653
  };
7744
7654
  for (let entry of Object.entries(RuntimeGlobals))RESERVED_RUNTIME_GLOBALS.set(entry[1], entry[0]);
7745
- let isReservedRuntimeGlobal = (r)=>RESERVED_RUNTIME_GLOBALS.has(r), createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>({
7655
+ let isReservedRuntimeGlobal = (r)=>RESERVED_RUNTIME_GLOBALS.has(r);
7656
+ class CodeGenerationResult {
7657
+ #inner;
7658
+ constructor(result){
7659
+ this.#inner = result;
7660
+ }
7661
+ get(sourceType) {
7662
+ return this.#inner.sources[sourceType];
7663
+ }
7664
+ }
7665
+ let createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>({
7746
7666
  registerCompilationAdditionalTreeRuntimeRequirementsTaps: createTap(binding_.RegisterJsTapKind.CompilationAdditionalTreeRuntimeRequirements, function() {
7747
7667
  return getCompiler().__internal__get_compilation().hooks.additionalTreeRuntimeRequirements;
7748
7668
  }, function(queried) {
@@ -7803,7 +7723,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7803
7723
  }, function(queried) {
7804
7724
  return function({ entry, id, codegenResults, runtimeModules }) {
7805
7725
  try {
7806
- let __nested_webpack_require_4807_4826__ = (id)=>{
7726
+ let __nested_webpack_require_4944_4963__ = (id)=>{
7807
7727
  let cached = moduleCache[id];
7808
7728
  if (void 0 !== cached) {
7809
7729
  if (cached.error) throw cached.error;
@@ -7817,7 +7737,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7817
7737
  loaded: !1,
7818
7738
  error: void 0
7819
7739
  },
7820
- require: __nested_webpack_require_4807_4826__
7740
+ require: __nested_webpack_require_4944_4963__
7821
7741
  };
7822
7742
  for (let handler of interceptModuleExecution)handler(execOptions);
7823
7743
  let result = codegenResults.map[id]["build time"], moduleObject = execOptions.module;
@@ -7825,11 +7745,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7825
7745
  codeGenerationResult: new CodeGenerationResult(result),
7826
7746
  moduleObject
7827
7747
  }, {
7828
- __webpack_require__: __nested_webpack_require_4807_4826__
7748
+ __webpack_require__: __nested_webpack_require_4944_4963__
7829
7749
  }), "Compilation.hooks.executeModule"), moduleObject.loaded = !0, moduleObject.exports;
7830
- }, moduleCache = __nested_webpack_require_4807_4826__[RuntimeGlobals.moduleCache.replace(`${RuntimeGlobals.require}.`, "")] = {}, interceptModuleExecution = __nested_webpack_require_4807_4826__[RuntimeGlobals.interceptModuleExecution.replace(`${RuntimeGlobals.require}.`, "")] = [];
7831
- for (let runtimeModule of runtimeModules)__nested_webpack_require_4807_4826__(runtimeModule);
7832
- let executeResult = __nested_webpack_require_4807_4826__(entry);
7750
+ }, moduleCache = __nested_webpack_require_4944_4963__[RuntimeGlobals.moduleCache.replace(`${RuntimeGlobals.require}.`, "")] = {}, interceptModuleExecution = __nested_webpack_require_4944_4963__[RuntimeGlobals.interceptModuleExecution.replace(`${RuntimeGlobals.require}.`, "")] = [];
7751
+ for (let runtimeModule of runtimeModules)__nested_webpack_require_4944_4963__(runtimeModule);
7752
+ let executeResult = __nested_webpack_require_4944_4963__(entry);
7833
7753
  getCompiler().__internal__get_module_execution_results_map().set(id, executeResult);
7834
7754
  } catch (e) {
7835
7755
  throw getCompiler().__internal__get_module_execution_results_map().set(id, e), e;
@@ -7983,7 +7903,127 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7983
7903
  });
7984
7904
  };
7985
7905
  })
7986
- }), createContextModuleFactoryHooksRegisters = (getCompiler, createTap, createMapTap)=>({
7906
+ });
7907
+ class ContextModuleFactoryBeforeResolveData {
7908
+ #inner;
7909
+ static __from_binding(binding) {
7910
+ return new ContextModuleFactoryBeforeResolveData(binding);
7911
+ }
7912
+ static __to_binding(data) {
7913
+ return data.#inner;
7914
+ }
7915
+ constructor(binding){
7916
+ this.#inner = binding, Object.defineProperties(this, {
7917
+ context: {
7918
+ enumerable: !0,
7919
+ get: ()=>binding.context,
7920
+ set (val) {
7921
+ binding.context = val;
7922
+ }
7923
+ },
7924
+ request: {
7925
+ enumerable: !0,
7926
+ get: ()=>binding.request,
7927
+ set (val) {
7928
+ binding.request = val;
7929
+ }
7930
+ },
7931
+ regExp: {
7932
+ enumerable: !0,
7933
+ get: ()=>binding.regExp,
7934
+ set (val) {
7935
+ binding.regExp = val;
7936
+ }
7937
+ },
7938
+ recursive: {
7939
+ enumerable: !0,
7940
+ get: ()=>binding.recursive,
7941
+ set (val) {
7942
+ binding.recursive = val;
7943
+ }
7944
+ }
7945
+ });
7946
+ }
7947
+ }
7948
+ class ContextModuleFactoryAfterResolveData {
7949
+ #inner;
7950
+ static __from_binding(binding) {
7951
+ return new ContextModuleFactoryAfterResolveData(binding);
7952
+ }
7953
+ static __to_binding(data) {
7954
+ return data.#inner;
7955
+ }
7956
+ constructor(binding){
7957
+ this.#inner = binding, Object.defineProperties(this, {
7958
+ resource: {
7959
+ enumerable: !0,
7960
+ get: ()=>binding.resource,
7961
+ set (val) {
7962
+ binding.resource = val;
7963
+ }
7964
+ },
7965
+ context: {
7966
+ enumerable: !0,
7967
+ get: ()=>binding.context,
7968
+ set (val) {
7969
+ binding.context = val;
7970
+ }
7971
+ },
7972
+ request: {
7973
+ enumerable: !0,
7974
+ get: ()=>binding.request,
7975
+ set (val) {
7976
+ binding.request = val;
7977
+ }
7978
+ },
7979
+ regExp: {
7980
+ enumerable: !0,
7981
+ get: ()=>binding.regExp,
7982
+ set (val) {
7983
+ binding.regExp = val;
7984
+ }
7985
+ },
7986
+ recursive: {
7987
+ enumerable: !0,
7988
+ get: ()=>binding.recursive,
7989
+ set (val) {
7990
+ binding.recursive = val;
7991
+ }
7992
+ },
7993
+ dependencies: {
7994
+ enumerable: !0,
7995
+ get: ()=>binding.dependencies
7996
+ }
7997
+ });
7998
+ }
7999
+ }
8000
+ Object.defineProperty(binding_.Module.prototype, "identifier", {
8001
+ enumerable: !0,
8002
+ configurable: !0,
8003
+ value () {
8004
+ return this[binding_.MODULE_IDENTIFIER_SYMBOL];
8005
+ }
8006
+ }), Object.defineProperty(binding_.Module.prototype, "readableIdentifier", {
8007
+ enumerable: !0,
8008
+ configurable: !0,
8009
+ value () {
8010
+ return this._readableIdentifier;
8011
+ }
8012
+ }), Object.defineProperty(binding_.Module.prototype, "originalSource", {
8013
+ enumerable: !0,
8014
+ configurable: !0,
8015
+ value () {
8016
+ let originalSource = this._originalSource();
8017
+ return originalSource ? JsSource.__from_binding(originalSource) : null;
8018
+ }
8019
+ }), Object.defineProperty(binding_.Module.prototype, "emitFile", {
8020
+ enumerable: !0,
8021
+ configurable: !0,
8022
+ value (filename, source, assetInfo) {
8023
+ return this._emitFile(filename, JsSource.__to_binding(source), assetInfo);
8024
+ }
8025
+ });
8026
+ let createContextModuleFactoryHooksRegisters = (getCompiler, createTap, createMapTap)=>({
7987
8027
  registerContextModuleFactoryBeforeResolveTaps: createTap(binding_.RegisterJsTapKind.ContextModuleFactoryBeforeResolve, function() {
7988
8028
  return getCompiler().__internal__get_compilation_params().contextModuleFactory.hooks.beforeResolve;
7989
8029
  }, function(queried) {
@@ -8294,7 +8334,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8294
8334
  let startTime = Date.now();
8295
8335
  this.running = !0;
8296
8336
  let instanceBinding = __webpack_require__("@rspack/binding"), isRuntimeShutdown = !1, finalCallback = (err, stats)=>{
8297
- this.idle = !0, this.cache.beginIdle(), this.idle = !0, this.running = !1, err && this.hooks.failed.call(err), callback && callback(err, stats), this.hooks.afterDone.call(stats), instanceBinding.shutdownAsyncRuntime();
8337
+ this.idle = !0, this.cache.beginIdle(), this.idle = !0, this.running = !1, err && this.hooks.failed.call(err), callback && callback(err, stats), this.hooks.afterDone.call(stats), instanceBinding.shutdownAsyncRuntime(), instanceBinding.cleanupGlobalTrace();
8298
8338
  }, onCompiled = (err, _compilation)=>{
8299
8339
  if (err) return finalCallback(err);
8300
8340
  if (_compilation.hooks.needAdditionalPass.call()) {
@@ -8568,7 +8608,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8568
8608
  obj.children = this.stats.map((stat, idx)=>{
8569
8609
  let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
8570
8610
  return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
8571
- }), childOptions.version && (obj.rspackVersion = "1.3.8", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
8611
+ }), childOptions.version && (obj.rspackVersion = "1.3.10", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
8572
8612
  let mapError = (j, obj)=>({
8573
8613
  ...obj,
8574
8614
  compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
@@ -8950,7 +8990,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8950
8990
  } else items.push(itemOrGroup);
8951
8991
  if (groupsSize + items.length <= max) children = groups.length > 0 ? groups.concat(items) : items;
8952
8992
  else if (0 === groups.length) {
8953
- let limit = max - +!filteredChildrenLineReserved;
8993
+ let limit = max - !filteredChildrenLineReserved;
8954
8994
  filteredChildren = items.length - limit, items.length = limit, children = items;
8955
8995
  } else {
8956
8996
  let limit = groups.length + (filteredChildrenLineReserved || 0 === items.length ? 0 : 1);
@@ -9059,6 +9099,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9059
9099
  errors: result,
9060
9100
  filtered
9061
9101
  };
9102
+ }, warningFromStatsWarning = (warning)=>{
9103
+ let res = Error(warning.message);
9104
+ return res.name = warning.name || "StatsWarning", Object.assign(res, warning), res;
9062
9105
  }, GROUP_EXTENSION_REGEXP = /(\.[^.]+?)(?:\?|(?: \+ \d+ modules?)?$)/, GROUP_PATH_REGEXP = /(.+)[/\\][^/\\]+?(?:\?|(?: \+ \d+ modules?)?$)/, ITEM_NAMES = {
9063
9106
  "compilation.children[]": "compilation",
9064
9107
  "compilation.modules[]": "module",
@@ -9361,10 +9404,21 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9361
9404
  compilation: {
9362
9405
  _: (object, compilation, context, options)=>{
9363
9406
  let statsCompilation = context.getStatsCompilation(compilation);
9364
- context.makePathsRelative || (context.makePathsRelative = makePathsRelative.bindContextCache(compilation.compiler.context, compilation.compiler.root)), context.cachedGetErrors || (context.cachedGetErrors = (_compilation)=>statsCompilation.errors), context.cachedGetWarnings || (context.cachedGetWarnings = (_compilation)=>{
9365
- let warnings = statsCompilation.warnings;
9366
- return compilation.hooks.processWarnings.call(warnings);
9367
- }), compilation.name && (object.name = compilation.name);
9407
+ if (context.makePathsRelative || (context.makePathsRelative = makePathsRelative.bindContextCache(compilation.compiler.context, compilation.compiler.root)), !context.cachedGetErrors) {
9408
+ let map = new WeakMap();
9409
+ context.cachedGetErrors = (compilation)=>{
9410
+ var errors;
9411
+ return map.get(compilation) || (errors = statsCompilation.errors, map.set(compilation, errors), errors);
9412
+ };
9413
+ }
9414
+ if (!context.cachedGetWarnings) {
9415
+ let map = new WeakMap();
9416
+ context.cachedGetWarnings = (compilation)=>{
9417
+ var warnings;
9418
+ return map.get(compilation) || (warnings = compilation.hooks.processWarnings.call(statsCompilation.warnings.map(warningFromStatsWarning)), map.set(compilation, warnings), warnings);
9419
+ };
9420
+ }
9421
+ compilation.name && (object.name = compilation.name);
9368
9422
  let logging = options.logging, loggingDebug = options.loggingDebug, loggingTrace = options.loggingTrace;
9369
9423
  if (logging || loggingDebug && loggingDebug.length > 0) {
9370
9424
  let acceptedTypes, collapsedGroups = !1;
@@ -9444,7 +9498,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9444
9498
  object.hash = context.getStatsCompilation(compilation).hash;
9445
9499
  },
9446
9500
  version: (object)=>{
9447
- object.version = "5.75.0", object.rspackVersion = "1.3.8";
9501
+ object.version = "5.75.0", object.rspackVersion = "1.3.10";
9448
9502
  },
9449
9503
  env: (object, _compilation, _context, { _env })=>{
9450
9504
  object.env = _env;
@@ -12120,12 +12174,15 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12120
12174
  maxSize: zod_index_js_namespaceObject.z.number().optional()
12121
12175
  }), assetParserOptions = zod_index_js_namespaceObject.z.strictObject({
12122
12176
  dataUrlCondition: assetParserDataUrlOptions.optional()
12123
- }), cssParserNamedExports = zod_index_js_namespaceObject.z.boolean(), cssParserOptions = zod_index_js_namespaceObject.z.strictObject({
12124
- namedExports: cssParserNamedExports.optional()
12177
+ }), cssParserNamedExports = zod_index_js_namespaceObject.z.boolean(), cssParserUrl = zod_index_js_namespaceObject.z.boolean(), cssParserOptions = zod_index_js_namespaceObject.z.strictObject({
12178
+ namedExports: cssParserNamedExports.optional(),
12179
+ url: cssParserUrl.optional()
12125
12180
  }), cssAutoParserOptions = zod_index_js_namespaceObject.z.strictObject({
12126
- namedExports: cssParserNamedExports.optional()
12181
+ namedExports: cssParserNamedExports.optional(),
12182
+ url: cssParserUrl.optional()
12127
12183
  }), cssModuleParserOptions = zod_index_js_namespaceObject.z.strictObject({
12128
- namedExports: cssParserNamedExports.optional()
12184
+ namedExports: cssParserNamedExports.optional(),
12185
+ url: cssParserUrl.optional()
12129
12186
  }), dynamicImportMode = zod_index_js_namespaceObject.z.enum([
12130
12187
  "eager",
12131
12188
  "lazy",
@@ -12188,7 +12245,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12188
12245
  "javascript/auto": javascriptParserOptions.optional(),
12189
12246
  "javascript/dynamic": javascriptParserOptions.optional(),
12190
12247
  "javascript/esm": javascriptParserOptions.optional()
12191
- }), parserOptionsByModuleTypeUnknown = zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.any())), parserOptionsByModuleType = parserOptionsByModuleTypeKnown.or(parserOptionsByModuleTypeUnknown), assetGeneratorDataUrlOptions = zod_index_js_namespaceObject.z.strictObject({
12248
+ }), assetGeneratorDataUrlOptions = zod_index_js_namespaceObject.z.strictObject({
12192
12249
  encoding: zod_index_js_namespaceObject.z.literal(!1).or(zod_index_js_namespaceObject.z.literal("base64")).optional(),
12193
12250
  mimetype: zod_index_js_namespaceObject.z.string().optional()
12194
12251
  }), assetGeneratorDataUrlFunction = zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.instanceof(Buffer), zod_index_js_namespaceObject.z.strictObject({
@@ -12199,7 +12256,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12199
12256
  }), assetResourceGeneratorOptions = zod_index_js_namespaceObject.z.strictObject({
12200
12257
  emit: zod_index_js_namespaceObject.z.boolean().optional(),
12201
12258
  filename: zod_filename.optional(),
12202
- publicPath: zod_publicPath.optional()
12259
+ publicPath: zod_publicPath.optional(),
12260
+ outputPath: zod_filename.optional()
12203
12261
  }), assetGeneratorOptions = assetInlineGeneratorOptions.merge(assetResourceGeneratorOptions), cssGeneratorExportsConvention = zod_index_js_namespaceObject.z.enum([
12204
12262
  "as-is",
12205
12263
  "camel-case",
@@ -12229,11 +12287,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12229
12287
  "css/auto": cssAutoGeneratorOptions.optional(),
12230
12288
  "css/module": cssModuleGeneratorOptions.optional(),
12231
12289
  json: jsonGeneratorOptions.optional()
12232
- }), generatorOptionsByModuleTypeUnknown = zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.any())), generatorOptionsByModuleType = generatorOptionsByModuleTypeKnown.or(generatorOptionsByModuleTypeUnknown), noParseOptionSingle = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.boolean())), noParseOption = noParseOptionSingle.or(zod_index_js_namespaceObject.z.array(noParseOptionSingle)), moduleOptions = zod_index_js_namespaceObject.z.strictObject({
12290
+ }), noParseOptionSingle = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.boolean())), noParseOption = noParseOptionSingle.or(zod_index_js_namespaceObject.z.array(noParseOptionSingle)), moduleOptions = zod_index_js_namespaceObject.z.strictObject({
12233
12291
  defaultRules: ruleSetRules.optional(),
12234
12292
  rules: ruleSetRules.optional(),
12235
- parser: parserOptionsByModuleType.optional(),
12236
- generator: generatorOptionsByModuleType.optional(),
12293
+ parser: parserOptionsByModuleTypeKnown.optional(),
12294
+ generator: generatorOptionsByModuleTypeKnown.optional(),
12237
12295
  noParse: noParseOption.optional()
12238
12296
  }), allowTarget = zod_index_js_namespaceObject.z.union([
12239
12297
  zod_index_js_namespaceObject.z.enum([
@@ -13103,7 +13161,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
13103
13161
  let _options = JSON.stringify(options || {});
13104
13162
  return binding_default().transform(source, _options);
13105
13163
  }
13106
- let exports_rspackVersion = "1.3.8", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
13164
+ let exports_rspackVersion = "1.3.10", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
13107
13165
  getNormalizedRspackOptions: getNormalizedRspackOptions,
13108
13166
  applyRspackOptionsDefaults: applyRspackOptionsDefaults,
13109
13167
  getNormalizedWebpackOptions: getNormalizedRspackOptions,
@@ -13184,7 +13242,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
13184
13242
  }, exports_experiments = {
13185
13243
  globalTrace: {
13186
13244
  async register (filter, layer, output) {
13187
- JavaScriptTracer.initJavaScriptTrace(layer, output), (0, binding_.registerGlobalTrace)(filter, layer, output), JavaScriptTracer.initCpuProfiler();
13245
+ await JavaScriptTracer.initJavaScriptTrace(layer, output), (0, binding_.registerGlobalTrace)(filter, layer, output), JavaScriptTracer.initCpuProfiler();
13188
13246
  },
13189
13247
  async cleanup () {
13190
13248
  (0, binding_.cleanupGlobalTrace)(), JavaScriptTracer.cleanupJavaScriptTrace();