@rspack/core 1.3.3 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -718,6 +718,7 @@ __export(index_exports, {
718
718
  LightningCssMinimizerRspackPlugin: () => LightningCssMinimizerRspackPlugin,
719
719
  LoaderOptionsPlugin: () => LoaderOptionsPlugin,
720
720
  LoaderTargetPlugin: () => LoaderTargetPlugin,
721
+ Module: () => import_binding79.Module,
721
722
  ModuleFilenameHelpers: () => ModuleFilenameHelpers_exports,
722
723
  MultiCompiler: () => MultiCompiler,
723
724
  MultiStats: () => MultiStats,
@@ -791,6 +792,7 @@ __export(exports_exports, {
791
792
  LightningCssMinimizerRspackPlugin: () => LightningCssMinimizerRspackPlugin,
792
793
  LoaderOptionsPlugin: () => LoaderOptionsPlugin,
793
794
  LoaderTargetPlugin: () => LoaderTargetPlugin,
795
+ Module: () => import_binding79.Module,
794
796
  ModuleFilenameHelpers: () => ModuleFilenameHelpers_exports,
795
797
  MultiCompiler: () => MultiCompiler,
796
798
  MultiStats: () => MultiStats,
@@ -831,6 +833,7 @@ __export(exports_exports, {
831
833
  var import_package = require("../package.json");
832
834
 
833
835
  // src/Compilation.ts
836
+ var binding = __toESM(require("@rspack/binding"));
834
837
  var import_binding = require("@rspack/binding");
835
838
  var liteTapable = __toESM(require("@rspack/lite-tapable"));
836
839
 
@@ -838,13 +841,13 @@ var liteTapable = __toESM(require("@rspack/lite-tapable"));
838
841
  var CHUNK_GROUP_MAPPINGS = /* @__PURE__ */ new WeakMap();
839
842
  var ChunkGroup = class _ChunkGroup {
840
843
  #inner;
841
- static __from_binding(binding14) {
842
- let chunkGroup = CHUNK_GROUP_MAPPINGS.get(binding14);
844
+ static __from_binding(binding15) {
845
+ let chunkGroup = CHUNK_GROUP_MAPPINGS.get(binding15);
843
846
  if (chunkGroup) {
844
847
  return chunkGroup;
845
848
  }
846
- chunkGroup = new _ChunkGroup(binding14);
847
- CHUNK_GROUP_MAPPINGS.set(binding14, chunkGroup);
849
+ chunkGroup = new _ChunkGroup(binding15);
850
+ CHUNK_GROUP_MAPPINGS.set(binding15, chunkGroup);
848
851
  return chunkGroup;
849
852
  }
850
853
  constructor(inner) {
@@ -854,7 +857,7 @@ var ChunkGroup = class _ChunkGroup {
854
857
  enumerable: true,
855
858
  get: () => {
856
859
  return this.#inner.chunks.map(
857
- (binding14) => Chunk.__from_binding(binding14)
860
+ (binding15) => Chunk.__from_binding(binding15)
858
861
  );
859
862
  }
860
863
  },
@@ -893,7 +896,7 @@ var ChunkGroup = class _ChunkGroup {
893
896
  return this.#inner.getFiles();
894
897
  }
895
898
  getParents() {
896
- return this.#inner.getParents().map((binding14) => _ChunkGroup.__from_binding(binding14));
899
+ return this.#inner.getParents().map((binding15) => _ChunkGroup.__from_binding(binding15));
897
900
  }
898
901
  isInitial() {
899
902
  return this.#inner.isInitial();
@@ -910,97 +913,97 @@ var ChunkGroup = class _ChunkGroup {
910
913
  var CHUNK_MAPPINGS = /* @__PURE__ */ new WeakMap();
911
914
  var Chunk = class _Chunk {
912
915
  #inner;
913
- static __from_binding(binding14) {
914
- let chunk = CHUNK_MAPPINGS.get(binding14);
916
+ static __from_binding(binding15) {
917
+ let chunk = CHUNK_MAPPINGS.get(binding15);
915
918
  if (chunk) {
916
919
  return chunk;
917
920
  }
918
- chunk = new _Chunk(binding14);
919
- CHUNK_MAPPINGS.set(binding14, chunk);
921
+ chunk = new _Chunk(binding15);
922
+ CHUNK_MAPPINGS.set(binding15, chunk);
920
923
  return chunk;
921
924
  }
922
925
  static __to_binding(chunk) {
923
926
  return chunk.#inner;
924
927
  }
925
- constructor(binding14) {
926
- this.#inner = binding14;
928
+ constructor(binding15) {
929
+ this.#inner = binding15;
927
930
  Object.defineProperties(this, {
928
931
  name: {
929
932
  enumerable: true,
930
933
  get: () => {
931
- return binding14.name;
934
+ return binding15.name;
932
935
  }
933
936
  },
934
937
  id: {
935
938
  enumerable: true,
936
939
  get: () => {
937
- return binding14.id;
940
+ return binding15.id;
938
941
  }
939
942
  },
940
943
  ids: {
941
944
  enumerable: true,
942
945
  get: () => {
943
- return binding14.ids;
946
+ return binding15.ids;
944
947
  }
945
948
  },
946
949
  idNameHints: {
947
950
  enumerable: true,
948
951
  get: () => {
949
- return binding14.idNameHints;
952
+ return binding15.idNameHints;
950
953
  }
951
954
  },
952
955
  filenameTemplate: {
953
956
  enumerable: true,
954
957
  get: () => {
955
- return binding14.filenameTemplate;
958
+ return binding15.filenameTemplate;
956
959
  }
957
960
  },
958
961
  cssFilenameTemplate: {
959
962
  enumerable: true,
960
963
  get: () => {
961
- return binding14.cssFilenameTemplate;
964
+ return binding15.cssFilenameTemplate;
962
965
  }
963
966
  },
964
967
  files: {
965
968
  enumerable: true,
966
969
  get: () => {
967
- return new Set(binding14.files);
970
+ return new Set(binding15.files);
968
971
  }
969
972
  },
970
973
  runtime: {
971
974
  enumerable: true,
972
975
  get: () => {
973
- return new Set(binding14.runtime);
976
+ return new Set(binding15.runtime);
974
977
  }
975
978
  },
976
979
  hash: {
977
980
  enumerable: true,
978
981
  get: () => {
979
- return binding14.hash;
982
+ return binding15.hash;
980
983
  }
981
984
  },
982
985
  contentHash: {
983
986
  enumerable: true,
984
987
  get: () => {
985
- return binding14.contentHash;
988
+ return binding15.contentHash;
986
989
  }
987
990
  },
988
991
  renderedHash: {
989
992
  enumerable: true,
990
993
  get: () => {
991
- return binding14.renderedHash;
994
+ return binding15.renderedHash;
992
995
  }
993
996
  },
994
997
  chunkReason: {
995
998
  enumerable: true,
996
999
  get: () => {
997
- return binding14.chunkReason;
1000
+ return binding15.chunkReason;
998
1001
  }
999
1002
  },
1000
1003
  auxiliaryFiles: {
1001
1004
  enumerable: true,
1002
1005
  get: () => {
1003
- return new Set(binding14.auxiliaryFiles);
1006
+ return new Set(binding15.auxiliaryFiles);
1004
1007
  }
1005
1008
  }
1006
1009
  });
@@ -1016,7 +1019,7 @@ var Chunk = class _Chunk {
1016
1019
  }
1017
1020
  get groupsIterable() {
1018
1021
  return new Set(
1019
- this.#inner.groups().map((binding14) => ChunkGroup.__from_binding(binding14))
1022
+ this.#inner.groups().map((binding15) => ChunkGroup.__from_binding(binding15))
1020
1023
  );
1021
1024
  }
1022
1025
  getChunkMaps(realHash) {
@@ -1048,17 +1051,17 @@ var Chunk = class _Chunk {
1048
1051
  }
1049
1052
  getAllAsyncChunks() {
1050
1053
  return new Set(
1051
- this.#inner.getAllAsyncChunks().map((binding14) => _Chunk.__from_binding(binding14))
1054
+ this.#inner.getAllAsyncChunks().map((binding15) => _Chunk.__from_binding(binding15))
1052
1055
  );
1053
1056
  }
1054
1057
  getAllInitialChunks() {
1055
1058
  return new Set(
1056
- this.#inner.getAllInitialChunks().map((binding14) => _Chunk.__from_binding(binding14))
1059
+ this.#inner.getAllInitialChunks().map((binding15) => _Chunk.__from_binding(binding15))
1057
1060
  );
1058
1061
  }
1059
1062
  getAllReferencedChunks() {
1060
1063
  return new Set(
1061
- this.#inner.getAllReferencedChunks().map((binding14) => _Chunk.__from_binding(binding14))
1064
+ this.#inner.getAllReferencedChunks().map((binding15) => _Chunk.__from_binding(binding15))
1062
1065
  );
1063
1066
  }
1064
1067
  getEntryOptions() {
@@ -1077,11 +1080,11 @@ function toJsRuntimeSpec(runtime) {
1077
1080
  // src/ChunkGraph.ts
1078
1081
  var ChunkGraph = class _ChunkGraph {
1079
1082
  #inner;
1080
- static __from_binding(binding14) {
1081
- return new _ChunkGraph(binding14);
1083
+ static __from_binding(binding15) {
1084
+ return new _ChunkGraph(binding15);
1082
1085
  }
1083
- constructor(binding14) {
1084
- this.#inner = binding14;
1086
+ constructor(binding15) {
1087
+ this.#inner = binding15;
1085
1088
  }
1086
1089
  getChunkModules(chunk) {
1087
1090
  return this.#inner.getChunkModules(Chunk.__to_binding(chunk));
@@ -1096,7 +1099,7 @@ var ChunkGraph = class _ChunkGraph {
1096
1099
  return this.#inner.getNumberOfEntryModules(Chunk.__to_binding(chunk));
1097
1100
  }
1098
1101
  getChunkEntryDependentChunksIterable(chunk) {
1099
- return this.#inner.getChunkEntryDependentChunksIterable(Chunk.__to_binding(chunk)).map((binding14) => Chunk.__from_binding(binding14));
1102
+ return this.#inner.getChunkEntryDependentChunksIterable(Chunk.__to_binding(chunk)).map((binding15) => Chunk.__from_binding(binding15));
1100
1103
  }
1101
1104
  getChunkModulesIterableBySourceType(chunk, sourceType) {
1102
1105
  return this.#inner.getChunkModulesIterableBySourceType(
@@ -1105,10 +1108,10 @@ var ChunkGraph = class _ChunkGraph {
1105
1108
  );
1106
1109
  }
1107
1110
  getModuleChunks(module2) {
1108
- return this.#inner.getModuleChunks(module2).map((binding14) => Chunk.__from_binding(binding14));
1111
+ return this.#inner.getModuleChunks(module2).map((binding15) => Chunk.__from_binding(binding15));
1109
1112
  }
1110
1113
  getModuleChunksIterable(module2) {
1111
- return this.#inner.getModuleChunks(module2).map((binding14) => Chunk.__from_binding(binding14));
1114
+ return this.#inner.getModuleChunks(module2).map((binding15) => Chunk.__from_binding(binding15));
1112
1115
  }
1113
1116
  getModuleId(module2) {
1114
1117
  return this.#inner.getModuleId(module2);
@@ -1117,8 +1120,8 @@ var ChunkGraph = class _ChunkGraph {
1117
1120
  return this.#inner.getModuleHash(module2, toJsRuntimeSpec(runtime));
1118
1121
  }
1119
1122
  getBlockChunkGroup(depBlock) {
1120
- const binding14 = this.#inner.getBlockChunkGroup(depBlock);
1121
- return binding14 ? ChunkGroup.__from_binding(binding14) : null;
1123
+ const binding15 = this.#inner.getBlockChunkGroup(depBlock);
1124
+ return binding15 ? ChunkGroup.__from_binding(binding15) : null;
1122
1125
  }
1123
1126
  };
1124
1127
 
@@ -1126,18 +1129,18 @@ var ChunkGraph = class _ChunkGraph {
1126
1129
  var ENTRYPOINT_MAPPINGS = /* @__PURE__ */ new WeakMap();
1127
1130
  var Entrypoint = class _Entrypoint extends ChunkGroup {
1128
1131
  #inner;
1129
- static __from_binding(binding14) {
1130
- let entrypoint = ENTRYPOINT_MAPPINGS.get(binding14);
1132
+ static __from_binding(binding15) {
1133
+ let entrypoint = ENTRYPOINT_MAPPINGS.get(binding15);
1131
1134
  if (entrypoint) {
1132
1135
  return entrypoint;
1133
1136
  }
1134
- entrypoint = new _Entrypoint(binding14);
1135
- ENTRYPOINT_MAPPINGS.set(binding14, entrypoint);
1137
+ entrypoint = new _Entrypoint(binding15);
1138
+ ENTRYPOINT_MAPPINGS.set(binding15, entrypoint);
1136
1139
  return entrypoint;
1137
1140
  }
1138
- constructor(binding14) {
1139
- super(binding14);
1140
- this.#inner = binding14;
1141
+ constructor(binding15) {
1142
+ super(binding15);
1143
+ this.#inner = binding15;
1141
1144
  }
1142
1145
  getRuntimeChunk() {
1143
1146
  const chunkBinding = this.#inner.getRuntimeChunk();
@@ -1165,11 +1168,11 @@ var cutOffLoaderExecution = (stack) => cutOffByFlag(stack, loaderFlag);
1165
1168
  // src/ExportsInfo.ts
1166
1169
  var ExportsInfo = class _ExportsInfo {
1167
1170
  #inner;
1168
- static __from_binding(binding14) {
1169
- return new _ExportsInfo(binding14);
1171
+ static __from_binding(binding15) {
1172
+ return new _ExportsInfo(binding15);
1170
1173
  }
1171
- constructor(binding14) {
1172
- this.#inner = binding14;
1174
+ constructor(binding15) {
1175
+ this.#inner = binding15;
1173
1176
  }
1174
1177
  isUsed(runtime) {
1175
1178
  return this.#inner.isUsed(toJsRuntimeSpec(runtime));
@@ -1185,61 +1188,14 @@ var ExportsInfo = class _ExportsInfo {
1185
1188
  }
1186
1189
  };
1187
1190
 
1188
- // src/ModuleGraphConnection.ts
1189
- var MODULE_GRAPH_CONNECTION_MAPPINGS = /* @__PURE__ */ new WeakMap();
1190
- var ModuleGraphConnection = class _ModuleGraphConnection {
1191
- #inner;
1192
- static __from_binding(binding14) {
1193
- let connection = MODULE_GRAPH_CONNECTION_MAPPINGS.get(binding14);
1194
- if (connection) {
1195
- return connection;
1196
- }
1197
- connection = new _ModuleGraphConnection(binding14);
1198
- MODULE_GRAPH_CONNECTION_MAPPINGS.set(binding14, connection);
1199
- return connection;
1200
- }
1201
- static __to_binding(data) {
1202
- return data.#inner;
1203
- }
1204
- constructor(binding14) {
1205
- this.#inner = binding14;
1206
- Object.defineProperties(this, {
1207
- module: {
1208
- enumerable: true,
1209
- get() {
1210
- return binding14.module;
1211
- }
1212
- },
1213
- dependency: {
1214
- enumerable: true,
1215
- get() {
1216
- return binding14.dependency;
1217
- }
1218
- },
1219
- resolvedModule: {
1220
- enumerable: true,
1221
- get() {
1222
- return binding14.resolvedModule;
1223
- }
1224
- },
1225
- originModule: {
1226
- enumerable: true,
1227
- get() {
1228
- return binding14.originModule;
1229
- }
1230
- }
1231
- });
1232
- }
1233
- };
1234
-
1235
1191
  // src/ModuleGraph.ts
1236
1192
  var ModuleGraph = class _ModuleGraph {
1237
- static __from_binding(binding14) {
1238
- return new _ModuleGraph(binding14);
1193
+ static __from_binding(binding15) {
1194
+ return new _ModuleGraph(binding15);
1239
1195
  }
1240
1196
  #inner;
1241
- constructor(binding14) {
1242
- this.#inner = binding14;
1197
+ constructor(binding15) {
1198
+ this.#inner = binding15;
1243
1199
  }
1244
1200
  getModule(dependency) {
1245
1201
  return this.#inner.getModule(dependency);
@@ -1257,14 +1213,13 @@ var ModuleGraph = class _ModuleGraph {
1257
1213
  return ExportsInfo.__from_binding(this.#inner.getExportsInfo(module2));
1258
1214
  }
1259
1215
  getConnection(dependency) {
1260
- const binding14 = this.#inner.getConnection(dependency);
1261
- return binding14 ? ModuleGraphConnection.__from_binding(binding14) : null;
1216
+ return this.#inner.getConnection(dependency);
1262
1217
  }
1263
1218
  getOutgoingConnections(module2) {
1264
- return this.#inner.getOutgoingConnections(module2).map((binding14) => ModuleGraphConnection.__from_binding(binding14));
1219
+ return this.#inner.getOutgoingConnections(module2);
1265
1220
  }
1266
1221
  getIncomingConnections(module2) {
1267
- return this.#inner.getIncomingConnections(module2).map((binding14) => ModuleGraphConnection.__from_binding(binding14));
1222
+ return this.#inner.getIncomingConnections(module2);
1268
1223
  }
1269
1224
  getParentBlockIndex(dependency) {
1270
1225
  return this.#inner.getParentBlockIndex(dependency);
@@ -1273,7 +1228,7 @@ var ModuleGraph = class _ModuleGraph {
1273
1228
  return this.#inner.isAsync(module2);
1274
1229
  }
1275
1230
  getOutgoingConnectionsInOrder(module2) {
1276
- return this.#inner.getOutgoingConnectionsInOrder(module2).map((binding14) => ModuleGraphConnection.__from_binding(binding14));
1231
+ return this.#inner.getOutgoingConnectionsInOrder(module2);
1277
1232
  }
1278
1233
  };
1279
1234
 
@@ -2561,6 +2516,7 @@ var checkCompilation = (compilation) => {
2561
2516
  }
2562
2517
  };
2563
2518
  var _inner, _shutdown, _addIncludeDispatcher, _Compilation_instances, createCachedAssets_fn, _rebuildModuleTask;
2519
+ binding.COMPILATION_HOOKS_MAP_SYMBOL;
2564
2520
  var _Compilation = class _Compilation {
2565
2521
  constructor(compiler, inner) {
2566
2522
  __privateAdd(this, _Compilation_instances);
@@ -2611,12 +2567,12 @@ var _Compilation = class _Compilation {
2611
2567
  const errorMessage = (reason) => `Can't automatically convert plugin using Compilation.hooks.${name2} to Compilation.hooks.processAssets because ${reason}.
2612
2568
  BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a single Compilation.hooks.processAssets hook.`;
2613
2569
  const getOptions = (options) => {
2614
- const isString2 = typeof options === "string";
2615
- if (!isString2 && options.stage) {
2570
+ const isString = typeof options === "string";
2571
+ if (!isString && options.stage) {
2616
2572
  throw new Error(errorMessage("it's using the 'stage' option"));
2617
2573
  }
2618
2574
  return {
2619
- ...isString2 ? { name: options } : options,
2575
+ ...isString ? { name: options } : options,
2620
2576
  stage
2621
2577
  };
2622
2578
  };
@@ -2705,6 +2661,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2705
2661
  __privateSet(this, _addIncludeDispatcher, new AddIncludeDispatcher(
2706
2662
  inner.addInclude.bind(inner)
2707
2663
  ));
2664
+ this[binding.COMPILATION_HOOKS_MAP_SYMBOL] = /* @__PURE__ */ new WeakMap();
2708
2665
  }
2709
2666
  get hash() {
2710
2667
  return __privateGet(this, _inner).hash;
@@ -2723,15 +2680,15 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2723
2680
  */
2724
2681
  get entrypoints() {
2725
2682
  return new Map(
2726
- __privateGet(this, _inner).entrypoints.map((binding14) => {
2727
- const entrypoint = Entrypoint.__from_binding(binding14);
2683
+ __privateGet(this, _inner).entrypoints.map((binding15) => {
2684
+ const entrypoint = Entrypoint.__from_binding(binding15);
2728
2685
  return [entrypoint.name, entrypoint];
2729
2686
  })
2730
2687
  );
2731
2688
  }
2732
2689
  get chunkGroups() {
2733
2690
  return __privateGet(this, _inner).chunkGroups.map(
2734
- (binding14) => ChunkGroup.__from_binding(binding14)
2691
+ (binding15) => ChunkGroup.__from_binding(binding15)
2735
2692
  );
2736
2693
  }
2737
2694
  /**
@@ -2747,8 +2704,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2747
2704
  },
2748
2705
  get: (property) => {
2749
2706
  if (typeof property === "string") {
2750
- const binding14 = __privateGet(this, _inner).getNamedChunkGroup(property);
2751
- return ChunkGroup.__from_binding(binding14);
2707
+ const binding15 = __privateGet(this, _inner).getNamedChunkGroup(property);
2708
+ return ChunkGroup.__from_binding(binding15);
2752
2709
  }
2753
2710
  }
2754
2711
  });
@@ -2775,8 +2732,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2775
2732
  },
2776
2733
  get: (property) => {
2777
2734
  if (typeof property === "string") {
2778
- const binding14 = __privateGet(this, _inner).getNamedChunk(property);
2779
- return binding14 ? Chunk.__from_binding(binding14) : void 0;
2735
+ const binding15 = __privateGet(this, _inner).getNamedChunk(property);
2736
+ return binding15 ? Chunk.__from_binding(binding15) : void 0;
2780
2737
  }
2781
2738
  }
2782
2739
  });
@@ -3296,7 +3253,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
3296
3253
  * @internal
3297
3254
  */
3298
3255
  __internal__getChunks() {
3299
- return __privateGet(this, _inner).getChunks().map((binding14) => Chunk.__from_binding(binding14));
3256
+ return __privateGet(this, _inner).getChunks().map((binding15) => Chunk.__from_binding(binding15));
3300
3257
  }
3301
3258
  /**
3302
3259
  * Note: This is not a webpack public API, maybe removed in future.
@@ -3411,8 +3368,8 @@ var AddIncludeDispatcher = class {
3411
3368
  }
3412
3369
  });
3413
3370
  };
3414
- constructor(binding14) {
3415
- this.#inner = binding14;
3371
+ constructor(binding15) {
3372
+ this.#inner = binding15;
3416
3373
  this.#running = false;
3417
3374
  }
3418
3375
  call(context2, dependency, options, callback) {
@@ -3424,13 +3381,13 @@ var AddIncludeDispatcher = class {
3424
3381
  }
3425
3382
  };
3426
3383
  var EntryData = class _EntryData {
3427
- static __from_binding(binding14) {
3428
- return new _EntryData(binding14);
3384
+ static __from_binding(binding15) {
3385
+ return new _EntryData(binding15);
3429
3386
  }
3430
- constructor(binding14) {
3431
- this.dependencies = binding14.dependencies;
3432
- this.includeDependencies = binding14.includeDependencies;
3433
- this.options = binding14.options;
3387
+ constructor(binding15) {
3388
+ this.dependencies = binding15.dependencies;
3389
+ this.includeDependencies = binding15.includeDependencies;
3390
+ this.options = binding15.options;
3434
3391
  }
3435
3392
  };
3436
3393
  var Entries = class {
@@ -3442,8 +3399,8 @@ var Entries = class {
3442
3399
  this.#data.clear();
3443
3400
  }
3444
3401
  forEach(callback, thisArg) {
3445
- for (const [key, binding14] of this) {
3446
- const value = EntryData.__from_binding(binding14);
3402
+ for (const [key, binding15] of this) {
3403
+ const value = EntryData.__from_binding(binding15);
3447
3404
  callback.call(thisArg, value, key, this);
3448
3405
  }
3449
3406
  }
@@ -3475,8 +3432,8 @@ var Entries = class {
3475
3432
  return this.#data.delete(key);
3476
3433
  }
3477
3434
  get(key) {
3478
- const binding14 = this.#data.get(key);
3479
- return binding14 ? EntryData.__from_binding(binding14) : void 0;
3435
+ const binding15 = this.#data.get(key);
3436
+ return binding15 ? EntryData.__from_binding(binding15) : void 0;
3480
3437
  }
3481
3438
  keys() {
3482
3439
  return this.#data.keys()[Symbol.iterator]();
@@ -3807,9 +3764,8 @@ var Hash = class {
3807
3764
  /* istanbul ignore next */
3808
3765
  /**
3809
3766
  * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
3810
- * @abstract
3811
- * @param encoding encoding of the return value
3812
- * @returns digest
3767
+ * @param {string=} encoding encoding of the return value
3768
+ * @returns {string|Buffer} digest
3813
3769
  */
3814
3770
  digest(encoding) {
3815
3771
  throw new AbstractMethodError_default();
@@ -3963,55 +3919,6 @@ var create = (wasmModule, instancesPool, chunkSize, digestSize) => {
3963
3919
  };
3964
3920
  var wasm_hash_default = create;
3965
3921
 
3966
- // src/util/hash/BatchedHash.ts
3967
- var BatchedHash = class extends Hash {
3968
- constructor(hash) {
3969
- super();
3970
- this.string = void 0;
3971
- this.encoding = void 0;
3972
- this.hash = hash;
3973
- }
3974
- /**
3975
- * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
3976
- * @param data data
3977
- * @param inputEncoding data encoding
3978
- * @returns updated hash
3979
- */
3980
- update(data, inputEncoding) {
3981
- if (this.string !== void 0) {
3982
- if (typeof data === "string" && inputEncoding === this.encoding && this.string.length + data.length < MAX_SHORT_STRING) {
3983
- this.string += data;
3984
- return this;
3985
- }
3986
- this.hash.update(this.string, this.encoding);
3987
- this.string = void 0;
3988
- }
3989
- if (typeof data === "string") {
3990
- if (data.length < MAX_SHORT_STRING && // base64 encoding is not valid since it may contain padding chars
3991
- (!inputEncoding || !inputEncoding.startsWith("ba"))) {
3992
- this.string = data;
3993
- this.encoding = inputEncoding;
3994
- } else {
3995
- this.hash.update(data, inputEncoding);
3996
- }
3997
- } else {
3998
- this.hash.update(data);
3999
- }
4000
- return this;
4001
- }
4002
- /**
4003
- * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
4004
- * @param encoding encoding of the return value
4005
- * @returns digest
4006
- */
4007
- digest(encoding) {
4008
- if (this.string !== void 0) {
4009
- this.hash.update(this.string, this.encoding);
4010
- }
4011
- return this.hash.digest(encoding);
4012
- }
4013
- };
4014
-
4015
3922
  // src/util/hash/md4.ts
4016
3923
  var createMd4;
4017
3924
  var md4_default = () => {
@@ -4064,25 +3971,23 @@ var BulkUpdateDecorator = class extends Hash {
4064
3971
  }
4065
3972
  this.buffer = "";
4066
3973
  }
4067
- /**
4068
- * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
4069
- * @param data data
4070
- * @param inputEncoding data encoding
4071
- * @returns updated hash
4072
- */
4073
3974
  update(data, inputEncoding) {
4074
3975
  if (inputEncoding !== void 0 || typeof data !== "string" || data.length > BULK_SIZE) {
4075
3976
  if (this.hash === void 0) this.hash = this.hashFactory();
4076
3977
  if (this.buffer.length > 0) {
4077
- this.hash.update(this.buffer);
3978
+ this.hash.update(Buffer.from(this.buffer));
4078
3979
  this.buffer = "";
4079
3980
  }
4080
- this.hash.update(data, inputEncoding);
3981
+ if (Buffer.isBuffer(data)) {
3982
+ this.hash.update(data);
3983
+ } else {
3984
+ this.hash.update(data, inputEncoding);
3985
+ }
4081
3986
  } else {
4082
3987
  this.buffer += data;
4083
3988
  if (this.buffer.length > BULK_SIZE) {
4084
3989
  if (this.hash === void 0) this.hash = this.hashFactory();
4085
- this.hash.update(this.buffer);
3990
+ this.hash.update(Buffer.from(this.buffer));
4086
3991
  this.buffer = "";
4087
3992
  }
4088
3993
  }
@@ -4090,8 +3995,8 @@ var BulkUpdateDecorator = class extends Hash {
4090
3995
  }
4091
3996
  /**
4092
3997
  * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
4093
- * @param encoding encoding of the return value
4094
- * @returns digest
3998
+ * @param {string=} encoding encoding of the return value
3999
+ * @returns {string|Buffer} digest
4095
4000
  */
4096
4001
  digest(encoding) {
4097
4002
  let digestCache;
@@ -4103,15 +4008,15 @@ var BulkUpdateDecorator = class extends Hash {
4103
4008
  digestCache = digestCaches[cacheKey] = /* @__PURE__ */ new Map();
4104
4009
  }
4105
4010
  const cacheEntry = digestCache.get(buffer);
4106
- if (cacheEntry !== void 0) return cacheEntry;
4011
+ if (cacheEntry !== void 0)
4012
+ return encoding ? cacheEntry : Buffer.from(cacheEntry, "hex");
4107
4013
  this.hash = this.hashFactory();
4108
4014
  }
4109
4015
  if (buffer.length > 0) {
4110
- this.hash.update(buffer);
4016
+ this.hash.update(Buffer.from(buffer));
4111
4017
  }
4112
- const digestResult = this.hash.digest(encoding);
4113
- const result2 = typeof digestResult === "string" ? digestResult : digestResult.toString();
4114
- if (digestCache !== void 0) {
4018
+ const result2 = encoding ? this.hash.digest(encoding) : this.hash.digest();
4019
+ if (digestCache !== void 0 && typeof result2 === "string") {
4115
4020
  digestCache.set(buffer, result2);
4116
4021
  }
4117
4022
  return result2;
@@ -4122,16 +4027,10 @@ var DebugHash = class extends Hash {
4122
4027
  super();
4123
4028
  this.string = "";
4124
4029
  }
4125
- /**
4126
- * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
4127
- * @param data data
4128
- * @param _inputEncoding data encoding
4129
- * @returns updated hash
4130
- */
4131
- update(data, _inputEncoding) {
4030
+ update(data, inputEncoding) {
4132
4031
  var _a;
4133
4032
  let normalizedData;
4134
- if (typeof data !== "string") {
4033
+ if (Buffer.isBuffer(data)) {
4135
4034
  normalizedData = data.toString("utf-8");
4136
4035
  } else {
4137
4036
  normalizedData = data;
@@ -4148,11 +4047,34 @@ var DebugHash = class extends Hash {
4148
4047
  }
4149
4048
  /**
4150
4049
  * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
4151
- * @param encoding encoding of the return value
4152
- * @returns digest
4050
+ * @param {string=} encoding encoding of the return value
4051
+ * @returns {string|Buffer} digest
4052
+ */
4053
+ digest(encoding) {
4054
+ const result2 = `debug-digest-${Buffer.from(this.string).toString("hex")}`;
4055
+ return encoding ? result2 : Buffer.from(result2);
4056
+ }
4057
+ };
4058
+ var WasmHashAdapter = class extends Hash {
4059
+ constructor(wasmHash) {
4060
+ super();
4061
+ this.wasmHash = wasmHash;
4062
+ }
4063
+ update(data, inputEncoding) {
4064
+ if (Buffer.isBuffer(data)) {
4065
+ this.wasmHash.update(data);
4066
+ } else {
4067
+ this.wasmHash.update(data, inputEncoding);
4068
+ }
4069
+ return this;
4070
+ }
4071
+ /**
4072
+ * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
4073
+ * @param {string=} encoding encoding of the return value
4074
+ * @returns {string|Buffer} digest
4153
4075
  */
4154
4076
  digest(encoding) {
4155
- return `debug-digest-${Buffer.from(this.string).toString(encoding || "hex")}`;
4077
+ return encoding ? this.wasmHash.digest(encoding) : this.wasmHash.digest();
4156
4078
  }
4157
4079
  };
4158
4080
  var createHash = (algorithm) => {
@@ -4163,10 +4085,14 @@ var createHash = (algorithm) => {
4163
4085
  // TODO add non-cryptographic algorithm here
4164
4086
  case "debug":
4165
4087
  return new DebugHash();
4166
- case "xxhash64":
4167
- return new BatchedHash(xxhash64_default());
4168
- case "md4":
4169
- return new BatchedHash(md4_default());
4088
+ case "xxhash64": {
4089
+ const hash = xxhash64_default();
4090
+ return new WasmHashAdapter(hash);
4091
+ }
4092
+ case "md4": {
4093
+ const hash = md4_default();
4094
+ return new WasmHashAdapter(hash);
4095
+ }
4170
4096
  case "native-md4":
4171
4097
  return new BulkUpdateDecorator(() => import_node_crypto.default.createHash("md4"), "md4");
4172
4098
  default:
@@ -4837,7 +4763,7 @@ var NormalModuleFactory = class {
4837
4763
  };
4838
4764
 
4839
4765
  // src/ResolverFactory.ts
4840
- var binding3 = __toESM(require("@rspack/binding"));
4766
+ var binding4 = __toESM(require("@rspack/binding"));
4841
4767
 
4842
4768
  // src/config/adapter.ts
4843
4769
  var import_node_assert3 = __toESM(require("assert"));
@@ -5153,10 +5079,17 @@ var import_webpack_sources2 = require("../compiled/webpack-sources/index.js");
5153
5079
 
5154
5080
  // src/NormalModule.ts
5155
5081
  var import_node_util3 = __toESM(require("util"));
5156
- var binding = __toESM(require("@rspack/binding"));
5082
+ var binding2 = __toESM(require("@rspack/binding"));
5157
5083
  var liteTapable4 = __toESM(require("@rspack/lite-tapable"));
5158
5084
  var import_binding2 = require("@rspack/binding");
5159
- Object.defineProperty(binding.NormalModule.prototype, "originalSource", {
5085
+ Object.defineProperty(binding2.NormalModule.prototype, "identifier", {
5086
+ enumerable: true,
5087
+ configurable: true,
5088
+ value() {
5089
+ return this[binding2.MODULE_IDENTIFIER_SYMBOL];
5090
+ }
5091
+ });
5092
+ Object.defineProperty(binding2.NormalModule.prototype, "originalSource", {
5160
5093
  enumerable: true,
5161
5094
  configurable: true,
5162
5095
  value() {
@@ -5167,14 +5100,13 @@ Object.defineProperty(binding.NormalModule.prototype, "originalSource", {
5167
5100
  return null;
5168
5101
  }
5169
5102
  });
5170
- Object.defineProperty(binding.NormalModule.prototype, "emitFile", {
5103
+ Object.defineProperty(binding2.NormalModule.prototype, "emitFile", {
5171
5104
  enumerable: true,
5172
5105
  configurable: true,
5173
5106
  value(filename2, source, assetInfo) {
5174
5107
  return this._emitFile(filename2, JsSource.__to_binding(source), assetInfo);
5175
5108
  }
5176
5109
  });
5177
- var compilationHooksMap = /* @__PURE__ */ new WeakMap();
5178
5110
  var createFakeHook = (fakeHook, message, code) => {
5179
5111
  return Object.freeze(
5180
5112
  Object.assign(
@@ -5211,12 +5143,17 @@ var deprecateAllProperties = (obj, message, code) => {
5211
5143
  }
5212
5144
  return newObj;
5213
5145
  };
5214
- Object.defineProperty(binding.NormalModule, "getCompilationHooks", {
5146
+ Object.defineProperty(binding2.NormalModule, "getCompilationHooks", {
5215
5147
  enumerable: true,
5216
5148
  configurable: true,
5217
5149
  value(compilation) {
5218
- checkCompilation(compilation);
5219
- let hooks = compilationHooksMap.get(compilation);
5150
+ if (!(binding2.COMPILATION_HOOKS_MAP_SYMBOL in compilation)) {
5151
+ throw new TypeError(
5152
+ "The 'compilation' argument must be an instance of Compilation"
5153
+ );
5154
+ }
5155
+ const compilationHooksMap5 = compilation[binding2.COMPILATION_HOOKS_MAP_SYMBOL];
5156
+ let hooks = compilationHooksMap5.get(compilation);
5220
5157
  if (hooks === void 0) {
5221
5158
  hooks = {
5222
5159
  loader: new liteTapable4.SyncHook(["loaderContext", "module"]),
@@ -5242,7 +5179,7 @@ Object.defineProperty(binding.NormalModule, "getCompilationHooks", {
5242
5179
  () => new liteTapable4.AsyncSeriesBailHook(["loaderContext"])
5243
5180
  )
5244
5181
  };
5245
- compilationHooksMap.set(compilation, hooks);
5182
+ compilationHooksMap5.set(compilation, hooks);
5246
5183
  }
5247
5184
  return hooks;
5248
5185
  }
@@ -6973,7 +6910,7 @@ function getRawGeneratorOptions(generator, type) {
6973
6910
  ].includes(type)) {
6974
6911
  return void 0;
6975
6912
  }
6976
- throw new Error(`unreachable: unknow module type: ${type}`);
6913
+ throw new Error(`unreachable: unknown module type: ${type}`);
6977
6914
  }
6978
6915
  function getRawAssetGeneratorOptions(options) {
6979
6916
  return {
@@ -8074,10 +8011,10 @@ var import_binding35 = require("@rspack/binding");
8074
8011
 
8075
8012
  // src/builtin-plugin/html-plugin/hooks.ts
8076
8013
  var liteTapable5 = __toESM(require("@rspack/lite-tapable"));
8077
- var compilationHooksMap2 = /* @__PURE__ */ new WeakMap();
8014
+ var compilationHooksMap = /* @__PURE__ */ new WeakMap();
8078
8015
  var getPluginHooks = (compilation) => {
8079
8016
  checkCompilation(compilation);
8080
- let hooks = compilationHooksMap2.get(compilation);
8017
+ let hooks = compilationHooksMap.get(compilation);
8081
8018
  if (hooks === void 0) {
8082
8019
  hooks = {
8083
8020
  beforeAssetTagGeneration: new liteTapable5.AsyncSeriesWaterfallHook([
@@ -8091,12 +8028,12 @@ var getPluginHooks = (compilation) => {
8091
8028
  beforeEmit: new liteTapable5.AsyncSeriesWaterfallHook(["data"]),
8092
8029
  afterEmit: new liteTapable5.AsyncSeriesWaterfallHook(["data"])
8093
8030
  };
8094
- compilationHooksMap2.set(compilation, hooks);
8031
+ compilationHooksMap.set(compilation, hooks);
8095
8032
  }
8096
8033
  return hooks;
8097
8034
  };
8098
8035
  var cleanPluginHooks = (compilation) => {
8099
- compilationHooksMap2.delete(compilation);
8036
+ compilationHooksMap.delete(compilation);
8100
8037
  };
8101
8038
 
8102
8039
  // src/builtin-plugin/html-plugin/options.ts
@@ -8703,7 +8640,7 @@ var InferAsyncModulesPlugin = create2(
8703
8640
  // src/builtin-plugin/JavascriptModulesPlugin.ts
8704
8641
  var import_binding40 = require("@rspack/binding");
8705
8642
  var liteTapable6 = __toESM(require("@rspack/lite-tapable"));
8706
- var compilationHooksMap3 = /* @__PURE__ */ new WeakMap();
8643
+ var compilationHooksMap2 = /* @__PURE__ */ new WeakMap();
8707
8644
  var JavascriptModulesPlugin = class extends RspackBuiltinPlugin {
8708
8645
  constructor() {
8709
8646
  super(...arguments);
@@ -8715,12 +8652,12 @@ var JavascriptModulesPlugin = class extends RspackBuiltinPlugin {
8715
8652
  }
8716
8653
  static getCompilationHooks(compilation) {
8717
8654
  checkCompilation(compilation);
8718
- let hooks = compilationHooksMap3.get(compilation);
8655
+ let hooks = compilationHooksMap2.get(compilation);
8719
8656
  if (hooks === void 0) {
8720
8657
  hooks = {
8721
8658
  chunkHash: new liteTapable6.SyncHook(["chunk", "hash"])
8722
8659
  };
8723
- compilationHooksMap3.set(compilation, hooks);
8660
+ compilationHooksMap2.set(compilation, hooks);
8724
8661
  }
8725
8662
  return hooks;
8726
8663
  }
@@ -9089,33 +9026,33 @@ var RuntimeChunkPlugin = create2(
9089
9026
  );
9090
9027
 
9091
9028
  // src/builtin-plugin/RuntimePlugin.ts
9092
- var binding2 = __toESM(require("@rspack/binding"));
9029
+ var binding3 = __toESM(require("@rspack/binding"));
9093
9030
  var liteTapable7 = __toESM(require("@rspack/lite-tapable"));
9094
9031
  var RuntimePluginImpl = create2(
9095
- binding2.BuiltinPluginName.RuntimePlugin,
9032
+ binding3.BuiltinPluginName.RuntimePlugin,
9096
9033
  () => {
9097
9034
  },
9098
9035
  "compilation"
9099
9036
  );
9100
9037
  var RuntimePlugin = RuntimePluginImpl;
9101
- var compilationHooksMap4 = /* @__PURE__ */ new WeakMap();
9038
+ var compilationHooksMap3 = /* @__PURE__ */ new WeakMap();
9102
9039
  RuntimePlugin.getHooks = RuntimePlugin.getCompilationHooks = (compilation) => {
9103
9040
  checkCompilation(compilation);
9104
- let hooks = compilationHooksMap4.get(compilation);
9041
+ let hooks = compilationHooksMap3.get(compilation);
9105
9042
  if (hooks === void 0) {
9106
9043
  hooks = {
9107
9044
  createScript: new liteTapable7.SyncWaterfallHook(["code", "chunk"]),
9108
9045
  linkPreload: new liteTapable7.SyncWaterfallHook(["code", "chunk"]),
9109
9046
  linkPrefetch: new liteTapable7.SyncWaterfallHook(["code", "chunk"])
9110
9047
  };
9111
- compilationHooksMap4.set(compilation, hooks);
9048
+ compilationHooksMap3.set(compilation, hooks);
9112
9049
  }
9113
9050
  return hooks;
9114
9051
  };
9115
9052
  var createRuntimePluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
9116
9053
  return {
9117
9054
  registerRuntimePluginCreateScriptTaps: createTap(
9118
- binding2.RegisterJsTapKind.RuntimePluginCreateScript,
9055
+ binding3.RegisterJsTapKind.RuntimePluginCreateScript,
9119
9056
  function() {
9120
9057
  return RuntimePlugin.getCompilationHooks(
9121
9058
  getCompiler().__internal__get_compilation()
@@ -9128,7 +9065,7 @@ var createRuntimePluginHooksRegisters = (getCompiler, createTap, createMapTap) =
9128
9065
  }
9129
9066
  ),
9130
9067
  registerRuntimePluginLinkPreloadTaps: createTap(
9131
- binding2.RegisterJsTapKind.RuntimePluginLinkPreload,
9068
+ binding3.RegisterJsTapKind.RuntimePluginLinkPreload,
9132
9069
  function() {
9133
9070
  return RuntimePlugin.getCompilationHooks(
9134
9071
  getCompiler().__internal__get_compilation()
@@ -9141,7 +9078,7 @@ var createRuntimePluginHooksRegisters = (getCompiler, createTap, createMapTap) =
9141
9078
  }
9142
9079
  ),
9143
9080
  registerRuntimePluginLinkPrefetchTaps: createTap(
9144
- binding2.RegisterJsTapKind.RuntimePluginLinkPrefetch,
9081
+ binding3.RegisterJsTapKind.RuntimePluginLinkPrefetch,
9145
9082
  function() {
9146
9083
  return RuntimePlugin.getCompilationHooks(
9147
9084
  getCompiler().__internal__get_compilation()
@@ -9577,11 +9514,11 @@ var RsdoctorPluginImpl = create2(
9577
9514
  };
9578
9515
  }
9579
9516
  );
9580
- var compilationHooksMap5 = /* @__PURE__ */ new WeakMap();
9517
+ var compilationHooksMap4 = /* @__PURE__ */ new WeakMap();
9581
9518
  var RsdoctorPlugin = RsdoctorPluginImpl;
9582
9519
  RsdoctorPlugin.getHooks = RsdoctorPlugin.getCompilationHooks = (compilation) => {
9583
9520
  checkCompilation(compilation);
9584
- let hooks = compilationHooksMap5.get(compilation);
9521
+ let hooks = compilationHooksMap4.get(compilation);
9585
9522
  if (hooks === void 0) {
9586
9523
  hooks = {
9587
9524
  moduleGraph: new liteTapable8.AsyncSeriesBailHook(["moduleGraph"]),
@@ -9590,7 +9527,7 @@ RsdoctorPlugin.getHooks = RsdoctorPlugin.getCompilationHooks = (compilation) =>
9590
9527
  moduleSources: new liteTapable8.AsyncSeriesBailHook(["moduleSourcesPatch"]),
9591
9528
  assets: new liteTapable8.AsyncSeriesBailHook(["assetPatch"])
9592
9529
  };
9593
- compilationHooksMap5.set(compilation, hooks);
9530
+ compilationHooksMap4.set(compilation, hooks);
9594
9531
  }
9595
9532
  return hooks;
9596
9533
  };
@@ -12047,12 +11984,9 @@ var keyedNestedConfig = (value, fn2, customKeys) => {
12047
11984
  };
12048
11985
 
12049
11986
  // src/Resolver.ts
12050
- function isString(value) {
12051
- return typeof value === "string";
12052
- }
12053
11987
  var Resolver = class _Resolver {
12054
- constructor(binding14) {
12055
- this.binding = binding14;
11988
+ constructor(binding15) {
11989
+ this.binding = binding15;
12056
11990
  }
12057
11991
  resolveSync(context2, path13, request) {
12058
11992
  const data = this.binding.resolveSync(path13, request);
@@ -12077,15 +12011,12 @@ var Resolver = class _Resolver {
12077
12011
  ...resolve2
12078
12012
  }) {
12079
12013
  const rawResolve = getRawResolve(resolve2);
12080
- if (Array.isArray(rawResolve.restrictions)) {
12081
- rawResolve.restrictions = rawResolve.restrictions.filter(isString);
12082
- }
12083
- const binding14 = this.binding.withOptions({
12014
+ const binding15 = this.binding.withOptions({
12084
12015
  dependencyCategory,
12085
12016
  resolveToContext,
12086
12017
  ...rawResolve
12087
12018
  });
12088
- return new _Resolver(binding14);
12019
+ return new _Resolver(binding15);
12089
12020
  }
12090
12021
  };
12091
12022
 
@@ -12096,16 +12027,16 @@ var ResolverFactory = class {
12096
12027
  return resolver_factory.#binding;
12097
12028
  }
12098
12029
  constructor(pnp) {
12099
- this.#binding = new binding3.JsResolverFactory(pnp);
12030
+ this.#binding = new binding4.JsResolverFactory(pnp);
12100
12031
  }
12101
12032
  get(type, resolveOptions2) {
12102
12033
  const { dependencyCategory, resolveToContext, ...resolve2 } = resolveOptions2 || {};
12103
- const binding14 = this.#binding.get(type, {
12034
+ const binding15 = this.#binding.get(type, {
12104
12035
  ...getRawResolve(resolve2),
12105
12036
  dependencyCategory,
12106
12037
  resolveToContext
12107
12038
  });
12108
- return new Resolver(binding14);
12039
+ return new Resolver(binding15);
12109
12040
  }
12110
12041
  };
12111
12042
 
@@ -12454,19 +12385,19 @@ var BINDING_VERSION = require("@rspack/binding/package.json").version;
12454
12385
  var CORE_VERSION = require("../package.json").version;
12455
12386
  var getAddonPlatformArchAbi = () => {
12456
12387
  const { platform, arch } = process;
12457
- let binding14 = "";
12458
- binding14 += platform;
12388
+ let binding15 = "";
12389
+ binding15 += platform;
12459
12390
  const abi = NodePlatformArchToAbi[platform][arch];
12460
12391
  if (abi === void 0) return new Error(`unsupported cpu arch: ${arch}`);
12461
- binding14 += `-${arch}`;
12392
+ binding15 += `-${arch}`;
12462
12393
  if (typeof abi === "string") {
12463
- binding14 += abi.length ? `-${abi}` : "";
12394
+ binding15 += abi.length ? `-${abi}` : "";
12464
12395
  } else if (typeof abi === "object") {
12465
- binding14 += `-${abi[isMusl() ? "musl" : "gnu"]}`;
12396
+ binding15 += `-${abi[isMusl() ? "musl" : "gnu"]}`;
12466
12397
  } else {
12467
12398
  return new Error(`unsupported abi: ${abi}`);
12468
12399
  }
12469
- return binding14;
12400
+ return binding15;
12470
12401
  };
12471
12402
  var result;
12472
12403
  var checkVersion = () => {
@@ -12513,11 +12444,11 @@ Rspack requires these versions to be the same or you may have installed the wron
12513
12444
  };
12514
12445
 
12515
12446
  // src/builtin-plugin/html-plugin/taps.ts
12516
- var binding4 = __toESM(require("@rspack/binding"));
12447
+ var binding5 = __toESM(require("@rspack/binding"));
12517
12448
  var createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
12518
12449
  return {
12519
12450
  registerHtmlPluginBeforeAssetTagGenerationTaps: createTap(
12520
- binding4.RegisterJsTapKind.HtmlPluginBeforeAssetTagGeneration,
12451
+ binding5.RegisterJsTapKind.HtmlPluginBeforeAssetTagGeneration,
12521
12452
  function() {
12522
12453
  return HtmlRspackPlugin.getCompilationHooks(
12523
12454
  getCompiler().__internal__get_compilation()
@@ -12540,7 +12471,7 @@ var createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
12540
12471
  }
12541
12472
  ),
12542
12473
  registerHtmlPluginAlterAssetTagsTaps: createTap(
12543
- binding4.RegisterJsTapKind.HtmlPluginAlterAssetTags,
12474
+ binding5.RegisterJsTapKind.HtmlPluginAlterAssetTags,
12544
12475
  function() {
12545
12476
  return HtmlRspackPlugin.getCompilationHooks(
12546
12477
  getCompiler().__internal__get_compilation()
@@ -12556,7 +12487,7 @@ var createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
12556
12487
  }
12557
12488
  ),
12558
12489
  registerHtmlPluginAlterAssetTagGroupsTaps: createTap(
12559
- binding4.RegisterJsTapKind.HtmlPluginAlterAssetTagGroups,
12490
+ binding5.RegisterJsTapKind.HtmlPluginAlterAssetTagGroups,
12560
12491
  function() {
12561
12492
  return HtmlRspackPlugin.getCompilationHooks(
12562
12493
  getCompiler().__internal__get_compilation()
@@ -12579,7 +12510,7 @@ var createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
12579
12510
  }
12580
12511
  ),
12581
12512
  registerHtmlPluginAfterTemplateExecutionTaps: createTap(
12582
- binding4.RegisterJsTapKind.HtmlPluginAfterTemplateExecution,
12513
+ binding5.RegisterJsTapKind.HtmlPluginAfterTemplateExecution,
12583
12514
  function() {
12584
12515
  return HtmlRspackPlugin.getCompilationHooks(
12585
12516
  getCompiler().__internal__get_compilation()
@@ -12602,7 +12533,7 @@ var createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
12602
12533
  }
12603
12534
  ),
12604
12535
  registerHtmlPluginBeforeEmitTaps: createTap(
12605
- binding4.RegisterJsTapKind.HtmlPluginBeforeEmit,
12536
+ binding5.RegisterJsTapKind.HtmlPluginBeforeEmit,
12606
12537
  function() {
12607
12538
  return HtmlRspackPlugin.getCompilationHooks(
12608
12539
  getCompiler().__internal__get_compilation()
@@ -12625,7 +12556,7 @@ var createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
12625
12556
  }
12626
12557
  ),
12627
12558
  registerHtmlPluginAfterEmitTaps: createTap(
12628
- binding4.RegisterJsTapKind.HtmlPluginAfterEmit,
12559
+ binding5.RegisterJsTapKind.HtmlPluginAfterEmit,
12629
12560
  function() {
12630
12561
  return HtmlRspackPlugin.getCompilationHooks(
12631
12562
  getCompiler().__internal__get_compilation()
@@ -12651,56 +12582,56 @@ var createHtmlPluginHooksRegisters = (getCompiler, createTap, createMapTap) => {
12651
12582
  };
12652
12583
 
12653
12584
  // src/taps/compilation.ts
12654
- var binding6 = __toESM(require("@rspack/binding"));
12585
+ var binding7 = __toESM(require("@rspack/binding"));
12655
12586
 
12656
12587
  // src/Module.ts
12657
- var binding5 = __toESM(require("@rspack/binding"));
12588
+ var binding6 = __toESM(require("@rspack/binding"));
12658
12589
  var import_binding79 = require("@rspack/binding");
12659
12590
  var ContextModuleFactoryBeforeResolveData = class _ContextModuleFactoryBeforeResolveData {
12660
12591
  #inner;
12661
- static __from_binding(binding14) {
12662
- return new _ContextModuleFactoryBeforeResolveData(binding14);
12592
+ static __from_binding(binding15) {
12593
+ return new _ContextModuleFactoryBeforeResolveData(binding15);
12663
12594
  }
12664
12595
  static __to_binding(data) {
12665
12596
  return data.#inner;
12666
12597
  }
12667
- constructor(binding14) {
12668
- this.#inner = binding14;
12598
+ constructor(binding15) {
12599
+ this.#inner = binding15;
12669
12600
  Object.defineProperties(this, {
12670
12601
  context: {
12671
12602
  enumerable: true,
12672
12603
  get() {
12673
- return binding14.context;
12604
+ return binding15.context;
12674
12605
  },
12675
12606
  set(val) {
12676
- binding14.context = val;
12607
+ binding15.context = val;
12677
12608
  }
12678
12609
  },
12679
12610
  request: {
12680
12611
  enumerable: true,
12681
12612
  get() {
12682
- return binding14.request;
12613
+ return binding15.request;
12683
12614
  },
12684
12615
  set(val) {
12685
- binding14.request = val;
12616
+ binding15.request = val;
12686
12617
  }
12687
12618
  },
12688
12619
  regExp: {
12689
12620
  enumerable: true,
12690
12621
  get() {
12691
- return binding14.regExp;
12622
+ return binding15.regExp;
12692
12623
  },
12693
12624
  set(val) {
12694
- binding14.regExp = val;
12625
+ binding15.regExp = val;
12695
12626
  }
12696
12627
  },
12697
12628
  recursive: {
12698
12629
  enumerable: true,
12699
12630
  get() {
12700
- return binding14.recursive;
12631
+ return binding15.recursive;
12701
12632
  },
12702
12633
  set(val) {
12703
- binding14.recursive = val;
12634
+ binding15.recursive = val;
12704
12635
  }
12705
12636
  }
12706
12637
  });
@@ -12708,70 +12639,77 @@ var ContextModuleFactoryBeforeResolveData = class _ContextModuleFactoryBeforeRes
12708
12639
  };
12709
12640
  var ContextModuleFactoryAfterResolveData = class _ContextModuleFactoryAfterResolveData {
12710
12641
  #inner;
12711
- static __from_binding(binding14) {
12712
- return new _ContextModuleFactoryAfterResolveData(binding14);
12642
+ static __from_binding(binding15) {
12643
+ return new _ContextModuleFactoryAfterResolveData(binding15);
12713
12644
  }
12714
12645
  static __to_binding(data) {
12715
12646
  return data.#inner;
12716
12647
  }
12717
- constructor(binding14) {
12718
- this.#inner = binding14;
12648
+ constructor(binding15) {
12649
+ this.#inner = binding15;
12719
12650
  Object.defineProperties(this, {
12720
12651
  resource: {
12721
12652
  enumerable: true,
12722
12653
  get() {
12723
- return binding14.resource;
12654
+ return binding15.resource;
12724
12655
  },
12725
12656
  set(val) {
12726
- binding14.resource = val;
12657
+ binding15.resource = val;
12727
12658
  }
12728
12659
  },
12729
12660
  context: {
12730
12661
  enumerable: true,
12731
12662
  get() {
12732
- return binding14.context;
12663
+ return binding15.context;
12733
12664
  },
12734
12665
  set(val) {
12735
- binding14.context = val;
12666
+ binding15.context = val;
12736
12667
  }
12737
12668
  },
12738
12669
  request: {
12739
12670
  enumerable: true,
12740
12671
  get() {
12741
- return binding14.request;
12672
+ return binding15.request;
12742
12673
  },
12743
12674
  set(val) {
12744
- binding14.request = val;
12675
+ binding15.request = val;
12745
12676
  }
12746
12677
  },
12747
12678
  regExp: {
12748
12679
  enumerable: true,
12749
12680
  get() {
12750
- return binding14.regExp;
12681
+ return binding15.regExp;
12751
12682
  },
12752
12683
  set(val) {
12753
- binding14.regExp = val;
12684
+ binding15.regExp = val;
12754
12685
  }
12755
12686
  },
12756
12687
  recursive: {
12757
12688
  enumerable: true,
12758
12689
  get() {
12759
- return binding14.recursive;
12690
+ return binding15.recursive;
12760
12691
  },
12761
12692
  set(val) {
12762
- binding14.recursive = val;
12693
+ binding15.recursive = val;
12763
12694
  }
12764
12695
  },
12765
12696
  dependencies: {
12766
12697
  enumerable: true,
12767
12698
  get() {
12768
- return binding14.dependencies;
12699
+ return binding15.dependencies;
12769
12700
  }
12770
12701
  }
12771
12702
  });
12772
12703
  }
12773
12704
  };
12774
- Object.defineProperty(binding5.Module.prototype, "originalSource", {
12705
+ Object.defineProperty(binding6.Module.prototype, "identifier", {
12706
+ enumerable: true,
12707
+ configurable: true,
12708
+ value() {
12709
+ return this[binding6.MODULE_IDENTIFIER_SYMBOL];
12710
+ }
12711
+ });
12712
+ Object.defineProperty(binding6.Module.prototype, "originalSource", {
12775
12713
  enumerable: true,
12776
12714
  configurable: true,
12777
12715
  value() {
@@ -12782,7 +12720,7 @@ Object.defineProperty(binding5.Module.prototype, "originalSource", {
12782
12720
  return null;
12783
12721
  }
12784
12722
  });
12785
- Object.defineProperty(binding5.Module.prototype, "emitFile", {
12723
+ Object.defineProperty(binding6.Module.prototype, "emitFile", {
12786
12724
  enumerable: true,
12787
12725
  configurable: true,
12788
12726
  value(filename2, source, assetInfo) {
@@ -13147,7 +13085,7 @@ var isReservedRuntimeGlobal = (r) => RESERVED_RUNTIME_GLOBALS.has(r);
13147
13085
  var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) => {
13148
13086
  return {
13149
13087
  registerCompilationAdditionalTreeRuntimeRequirementsTaps: createTap(
13150
- binding6.RegisterJsTapKind.CompilationAdditionalTreeRuntimeRequirements,
13088
+ binding7.RegisterJsTapKind.CompilationAdditionalTreeRuntimeRequirements,
13151
13089
  function() {
13152
13090
  return getCompiler().__internal__get_compilation().hooks.additionalTreeRuntimeRequirements;
13153
13091
  },
@@ -13165,7 +13103,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13165
13103
  }
13166
13104
  ),
13167
13105
  registerCompilationRuntimeRequirementInTreeTaps: createMapTap(
13168
- binding6.RegisterJsTapKind.CompilationRuntimeRequirementInTree,
13106
+ binding7.RegisterJsTapKind.CompilationRuntimeRequirementInTree,
13169
13107
  function() {
13170
13108
  return getCompiler().__internal__get_compilation().hooks.runtimeRequirementInTree;
13171
13109
  },
@@ -13200,7 +13138,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13200
13138
  }
13201
13139
  ),
13202
13140
  registerCompilationRuntimeModuleTaps: createTap(
13203
- binding6.RegisterJsTapKind.CompilationRuntimeModule,
13141
+ binding7.RegisterJsTapKind.CompilationRuntimeModule,
13204
13142
  function() {
13205
13143
  return getCompiler().__internal__get_compilation().hooks.runtimeModule;
13206
13144
  },
@@ -13218,7 +13156,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13218
13156
  }
13219
13157
  ),
13220
13158
  registerCompilationBuildModuleTaps: createTap(
13221
- binding6.RegisterJsTapKind.CompilationBuildModule,
13159
+ binding7.RegisterJsTapKind.CompilationBuildModule,
13222
13160
  function() {
13223
13161
  return getCompiler().__internal__get_compilation().hooks.buildModule;
13224
13162
  },
@@ -13229,7 +13167,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13229
13167
  }
13230
13168
  ),
13231
13169
  registerCompilationStillValidModuleTaps: createTap(
13232
- binding6.RegisterJsTapKind.CompilationStillValidModule,
13170
+ binding7.RegisterJsTapKind.CompilationStillValidModule,
13233
13171
  function() {
13234
13172
  return getCompiler().__internal__get_compilation().hooks.stillValidModule;
13235
13173
  },
@@ -13240,7 +13178,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13240
13178
  }
13241
13179
  ),
13242
13180
  registerCompilationSucceedModuleTaps: createTap(
13243
- binding6.RegisterJsTapKind.CompilationSucceedModule,
13181
+ binding7.RegisterJsTapKind.CompilationSucceedModule,
13244
13182
  function() {
13245
13183
  return getCompiler().__internal__get_compilation().hooks.succeedModule;
13246
13184
  },
@@ -13251,7 +13189,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13251
13189
  }
13252
13190
  ),
13253
13191
  registerCompilationExecuteModuleTaps: createTap(
13254
- binding6.RegisterJsTapKind.CompilationExecuteModule,
13192
+ binding7.RegisterJsTapKind.CompilationExecuteModule,
13255
13193
  function() {
13256
13194
  return getCompiler().__internal__get_compilation().hooks.executeModule;
13257
13195
  },
@@ -13319,7 +13257,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13319
13257
  }
13320
13258
  ),
13321
13259
  registerCompilationFinishModulesTaps: createTap(
13322
- binding6.RegisterJsTapKind.CompilationFinishModules,
13260
+ binding7.RegisterJsTapKind.CompilationFinishModules,
13323
13261
  function() {
13324
13262
  return getCompiler().__internal__get_compilation().hooks.finishModules;
13325
13263
  },
@@ -13332,7 +13270,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13332
13270
  }
13333
13271
  ),
13334
13272
  registerCompilationOptimizeModulesTaps: createTap(
13335
- binding6.RegisterJsTapKind.CompilationOptimizeModules,
13273
+ binding7.RegisterJsTapKind.CompilationOptimizeModules,
13336
13274
  function() {
13337
13275
  return getCompiler().__internal__get_compilation().hooks.optimizeModules;
13338
13276
  },
@@ -13345,7 +13283,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13345
13283
  }
13346
13284
  ),
13347
13285
  registerCompilationAfterOptimizeModulesTaps: createTap(
13348
- binding6.RegisterJsTapKind.CompilationAfterOptimizeModules,
13286
+ binding7.RegisterJsTapKind.CompilationAfterOptimizeModules,
13349
13287
  function() {
13350
13288
  return getCompiler().__internal__get_compilation().hooks.afterOptimizeModules;
13351
13289
  },
@@ -13358,7 +13296,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13358
13296
  }
13359
13297
  ),
13360
13298
  registerCompilationOptimizeTreeTaps: createTap(
13361
- binding6.RegisterJsTapKind.CompilationOptimizeTree,
13299
+ binding7.RegisterJsTapKind.CompilationOptimizeTree,
13362
13300
  function() {
13363
13301
  return getCompiler().__internal__get_compilation().hooks.optimizeTree;
13364
13302
  },
@@ -13372,7 +13310,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13372
13310
  }
13373
13311
  ),
13374
13312
  registerCompilationOptimizeChunkModulesTaps: createTap(
13375
- binding6.RegisterJsTapKind.CompilationOptimizeChunkModules,
13313
+ binding7.RegisterJsTapKind.CompilationOptimizeChunkModules,
13376
13314
  function() {
13377
13315
  return getCompiler().__internal__get_compilation().hooks.optimizeChunkModules;
13378
13316
  },
@@ -13386,7 +13324,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13386
13324
  }
13387
13325
  ),
13388
13326
  registerCompilationChunkHashTaps: createTap(
13389
- binding6.RegisterJsTapKind.CompilationChunkHash,
13327
+ binding7.RegisterJsTapKind.CompilationChunkHash,
13390
13328
  function() {
13391
13329
  return getCompiler().__internal__get_compilation().hooks.chunkHash;
13392
13330
  },
@@ -13397,15 +13335,20 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13397
13335
  }
13398
13336
  const hash = createHash(getCompiler().options.output.hashFunction);
13399
13337
  queried.call(Chunk.__from_binding(chunk), hash);
13400
- const digestResult = hash.digest(
13401
- getCompiler().options.output.hashDigest
13402
- );
13403
- return toBuffer(digestResult);
13338
+ let digestResult;
13339
+ if (getCompiler().options.output.hashDigest) {
13340
+ digestResult = hash.digest(
13341
+ getCompiler().options.output.hashDigest
13342
+ );
13343
+ } else {
13344
+ digestResult = hash.digest();
13345
+ }
13346
+ return typeof digestResult === "string" ? Buffer.from(digestResult) : digestResult;
13404
13347
  };
13405
13348
  }
13406
13349
  ),
13407
13350
  registerCompilationChunkAssetTaps: createTap(
13408
- binding6.RegisterJsTapKind.CompilationChunkAsset,
13351
+ binding7.RegisterJsTapKind.CompilationChunkAsset,
13409
13352
  function() {
13410
13353
  return getCompiler().__internal__get_compilation().hooks.chunkAsset;
13411
13354
  },
@@ -13416,7 +13359,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13416
13359
  }
13417
13360
  ),
13418
13361
  registerCompilationProcessAssetsTaps: createTap(
13419
- binding6.RegisterJsTapKind.CompilationProcessAssets,
13362
+ binding7.RegisterJsTapKind.CompilationProcessAssets,
13420
13363
  function() {
13421
13364
  return getCompiler().__internal__get_compilation().hooks.processAssets;
13422
13365
  },
@@ -13429,7 +13372,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13429
13372
  }
13430
13373
  ),
13431
13374
  registerCompilationAfterProcessAssetsTaps: createTap(
13432
- binding6.RegisterJsTapKind.CompilationAfterProcessAssets,
13375
+ binding7.RegisterJsTapKind.CompilationAfterProcessAssets,
13433
13376
  function() {
13434
13377
  return getCompiler().__internal__get_compilation().hooks.afterProcessAssets;
13435
13378
  },
@@ -13442,7 +13385,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13442
13385
  }
13443
13386
  ),
13444
13387
  registerCompilationSealTaps: createTap(
13445
- binding6.RegisterJsTapKind.CompilationSeal,
13388
+ binding7.RegisterJsTapKind.CompilationSeal,
13446
13389
  function() {
13447
13390
  return getCompiler().__internal__get_compilation().hooks.seal;
13448
13391
  },
@@ -13453,7 +13396,7 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13453
13396
  }
13454
13397
  ),
13455
13398
  registerCompilationAfterSealTaps: createTap(
13456
- binding6.RegisterJsTapKind.CompilationAfterSeal,
13399
+ binding7.RegisterJsTapKind.CompilationAfterSeal,
13457
13400
  function() {
13458
13401
  return getCompiler().__internal__get_compilation().hooks.afterSeal;
13459
13402
  },
@@ -13467,11 +13410,11 @@ var createCompilationHooksRegisters = (getCompiler, createTap, createMapTap) =>
13467
13410
  };
13468
13411
 
13469
13412
  // src/taps/compiler.ts
13470
- var binding7 = __toESM(require("@rspack/binding"));
13413
+ var binding8 = __toESM(require("@rspack/binding"));
13471
13414
  var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
13472
13415
  return {
13473
13416
  registerCompilerThisCompilationTaps: createTap(
13474
- binding7.RegisterJsTapKind.CompilerThisCompilation,
13417
+ binding8.RegisterJsTapKind.CompilerThisCompilation,
13475
13418
  function() {
13476
13419
  return getCompiler().hooks.thisCompilation;
13477
13420
  },
@@ -13486,7 +13429,7 @@ var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
13486
13429
  }
13487
13430
  ),
13488
13431
  registerCompilerCompilationTaps: createTap(
13489
- binding7.RegisterJsTapKind.CompilerCompilation,
13432
+ binding8.RegisterJsTapKind.CompilerCompilation,
13490
13433
  function() {
13491
13434
  return getCompiler().hooks.compilation;
13492
13435
  },
@@ -13500,7 +13443,7 @@ var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
13500
13443
  }
13501
13444
  ),
13502
13445
  registerCompilerMakeTaps: createTap(
13503
- binding7.RegisterJsTapKind.CompilerMake,
13446
+ binding8.RegisterJsTapKind.CompilerMake,
13504
13447
  function() {
13505
13448
  return getCompiler().hooks.make;
13506
13449
  },
@@ -13513,7 +13456,7 @@ var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
13513
13456
  }
13514
13457
  ),
13515
13458
  registerCompilerFinishMakeTaps: createTap(
13516
- binding7.RegisterJsTapKind.CompilerFinishMake,
13459
+ binding8.RegisterJsTapKind.CompilerFinishMake,
13517
13460
  function() {
13518
13461
  return getCompiler().hooks.finishMake;
13519
13462
  },
@@ -13526,7 +13469,7 @@ var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
13526
13469
  }
13527
13470
  ),
13528
13471
  registerCompilerShouldEmitTaps: createTap(
13529
- binding7.RegisterJsTapKind.CompilerShouldEmit,
13472
+ binding8.RegisterJsTapKind.CompilerShouldEmit,
13530
13473
  function() {
13531
13474
  return getCompiler().hooks.shouldEmit;
13532
13475
  },
@@ -13537,7 +13480,7 @@ var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
13537
13480
  }
13538
13481
  ),
13539
13482
  registerCompilerEmitTaps: createTap(
13540
- binding7.RegisterJsTapKind.CompilerEmit,
13483
+ binding8.RegisterJsTapKind.CompilerEmit,
13541
13484
  function() {
13542
13485
  return getCompiler().hooks.emit;
13543
13486
  },
@@ -13550,7 +13493,7 @@ var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
13550
13493
  }
13551
13494
  ),
13552
13495
  registerCompilerAfterEmitTaps: createTap(
13553
- binding7.RegisterJsTapKind.CompilerAfterEmit,
13496
+ binding8.RegisterJsTapKind.CompilerAfterEmit,
13554
13497
  function() {
13555
13498
  return getCompiler().hooks.afterEmit;
13556
13499
  },
@@ -13563,7 +13506,7 @@ var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
13563
13506
  }
13564
13507
  ),
13565
13508
  registerCompilerAssetEmittedTaps: createTap(
13566
- binding7.RegisterJsTapKind.CompilerAssetEmitted,
13509
+ binding8.RegisterJsTapKind.CompilerAssetEmitted,
13567
13510
  function() {
13568
13511
  return getCompiler().hooks.assetEmitted;
13569
13512
  },
@@ -13593,11 +13536,11 @@ var createCompilerHooksRegisters = (getCompiler, createTap, createMapTap) => {
13593
13536
  };
13594
13537
 
13595
13538
  // src/taps/contextModuleFactory.ts
13596
- var binding8 = __toESM(require("@rspack/binding"));
13539
+ var binding9 = __toESM(require("@rspack/binding"));
13597
13540
  var createContextModuleFactoryHooksRegisters = (getCompiler, createTap, createMapTap) => {
13598
13541
  return {
13599
13542
  registerContextModuleFactoryBeforeResolveTaps: createTap(
13600
- binding8.RegisterJsTapKind.ContextModuleFactoryBeforeResolve,
13543
+ binding9.RegisterJsTapKind.ContextModuleFactoryBeforeResolve,
13601
13544
  function() {
13602
13545
  return getCompiler().__internal__get_compilation_params().contextModuleFactory.hooks.beforeResolve;
13603
13546
  },
@@ -13610,7 +13553,7 @@ var createContextModuleFactoryHooksRegisters = (getCompiler, createTap, createMa
13610
13553
  }
13611
13554
  ),
13612
13555
  registerContextModuleFactoryAfterResolveTaps: createTap(
13613
- binding8.RegisterJsTapKind.ContextModuleFactoryAfterResolve,
13556
+ binding9.RegisterJsTapKind.ContextModuleFactoryAfterResolve,
13614
13557
  function() {
13615
13558
  return getCompiler().__internal__get_compilation_params().contextModuleFactory.hooks.afterResolve;
13616
13559
  },
@@ -13626,11 +13569,11 @@ var createContextModuleFactoryHooksRegisters = (getCompiler, createTap, createMa
13626
13569
  };
13627
13570
 
13628
13571
  // src/taps/javascriptModules.ts
13629
- var binding9 = __toESM(require("@rspack/binding"));
13572
+ var binding10 = __toESM(require("@rspack/binding"));
13630
13573
  var createJavaScriptModulesHooksRegisters = (getCompiler, createTap, createMapTap) => {
13631
13574
  return {
13632
13575
  registerJavascriptModulesChunkHashTaps: createTap(
13633
- binding9.RegisterJsTapKind.JavascriptModulesChunkHash,
13576
+ binding10.RegisterJsTapKind.JavascriptModulesChunkHash,
13634
13577
  function() {
13635
13578
  return JavascriptModulesPlugin.getCompilationHooks(
13636
13579
  getCompiler().__internal__get_compilation()
@@ -13643,10 +13586,15 @@ var createJavaScriptModulesHooksRegisters = (getCompiler, createTap, createMapTa
13643
13586
  }
13644
13587
  const hash = createHash(getCompiler().options.output.hashFunction);
13645
13588
  queried.call(Chunk.__from_binding(chunk), hash);
13646
- const digestResult = hash.digest(
13647
- getCompiler().options.output.hashDigest
13648
- );
13649
- return toBuffer(digestResult);
13589
+ let digestResult;
13590
+ if (getCompiler().options.output.hashDigest) {
13591
+ digestResult = hash.digest(
13592
+ getCompiler().options.output.hashDigest
13593
+ );
13594
+ } else {
13595
+ digestResult = hash.digest();
13596
+ }
13597
+ return typeof digestResult === "string" ? Buffer.from(digestResult) : digestResult;
13650
13598
  };
13651
13599
  }
13652
13600
  )
@@ -13654,11 +13602,11 @@ var createJavaScriptModulesHooksRegisters = (getCompiler, createTap, createMapTa
13654
13602
  };
13655
13603
 
13656
13604
  // src/taps/normalModuleFactory.ts
13657
- var binding10 = __toESM(require("@rspack/binding"));
13605
+ var binding11 = __toESM(require("@rspack/binding"));
13658
13606
  var createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createMapTap) => {
13659
13607
  return {
13660
13608
  registerNormalModuleFactoryBeforeResolveTaps: createTap(
13661
- binding10.RegisterJsTapKind.NormalModuleFactoryBeforeResolve,
13609
+ binding11.RegisterJsTapKind.NormalModuleFactoryBeforeResolve,
13662
13610
  function() {
13663
13611
  return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.beforeResolve;
13664
13612
  },
@@ -13683,7 +13631,7 @@ var createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createMap
13683
13631
  }
13684
13632
  ),
13685
13633
  registerNormalModuleFactoryFactorizeTaps: createTap(
13686
- binding10.RegisterJsTapKind.NormalModuleFactoryFactorize,
13634
+ binding11.RegisterJsTapKind.NormalModuleFactoryFactorize,
13687
13635
  function() {
13688
13636
  return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.factorize;
13689
13637
  },
@@ -13708,7 +13656,7 @@ var createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createMap
13708
13656
  }
13709
13657
  ),
13710
13658
  registerNormalModuleFactoryResolveTaps: createTap(
13711
- binding10.RegisterJsTapKind.NormalModuleFactoryResolve,
13659
+ binding11.RegisterJsTapKind.NormalModuleFactoryResolve,
13712
13660
  function() {
13713
13661
  return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.resolve;
13714
13662
  },
@@ -13733,7 +13681,7 @@ var createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createMap
13733
13681
  }
13734
13682
  ),
13735
13683
  registerNormalModuleFactoryResolveForSchemeTaps: createMapTap(
13736
- binding10.RegisterJsTapKind.NormalModuleFactoryResolveForScheme,
13684
+ binding11.RegisterJsTapKind.NormalModuleFactoryResolveForScheme,
13737
13685
  function() {
13738
13686
  return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.resolveForScheme;
13739
13687
  },
@@ -13745,7 +13693,7 @@ var createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createMap
13745
13693
  }
13746
13694
  ),
13747
13695
  registerNormalModuleFactoryAfterResolveTaps: createTap(
13748
- binding10.RegisterJsTapKind.NormalModuleFactoryAfterResolve,
13696
+ binding11.RegisterJsTapKind.NormalModuleFactoryAfterResolve,
13749
13697
  function() {
13750
13698
  return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.afterResolve;
13751
13699
  },
@@ -13769,7 +13717,7 @@ var createNormalModuleFactoryHooksRegisters = (getCompiler, createTap, createMap
13769
13717
  }
13770
13718
  ),
13771
13719
  registerNormalModuleFactoryCreateModuleTaps: createTap(
13772
- binding10.RegisterJsTapKind.NormalModuleFactoryCreateModule,
13720
+ binding11.RegisterJsTapKind.NormalModuleFactoryCreateModule,
13773
13721
  function() {
13774
13722
  return getCompiler().__internal__get_compilation_params().normalModuleFactory.hooks.createModule;
13775
13723
  },
@@ -18349,9 +18297,16 @@ var RspackOptionsApply = class {
18349
18297
  };
18350
18298
 
18351
18299
  // src/ContextModule.ts
18352
- var binding11 = __toESM(require("@rspack/binding"));
18300
+ var binding12 = __toESM(require("@rspack/binding"));
18353
18301
  var import_binding80 = require("@rspack/binding");
18354
- Object.defineProperty(binding11.ContextModule.prototype, "originalSource", {
18302
+ Object.defineProperty(binding12.ContextModule.prototype, "identifier", {
18303
+ enumerable: true,
18304
+ configurable: true,
18305
+ value() {
18306
+ return this[binding12.MODULE_IDENTIFIER_SYMBOL];
18307
+ }
18308
+ });
18309
+ Object.defineProperty(binding12.ContextModule.prototype, "originalSource", {
18355
18310
  enumerable: true,
18356
18311
  configurable: true,
18357
18312
  value() {
@@ -18362,7 +18317,7 @@ Object.defineProperty(binding11.ContextModule.prototype, "originalSource", {
18362
18317
  return null;
18363
18318
  }
18364
18319
  });
18365
- Object.defineProperty(binding11.ContextModule.prototype, "emitFile", {
18320
+ Object.defineProperty(binding12.ContextModule.prototype, "emitFile", {
18366
18321
  enumerable: true,
18367
18322
  configurable: true,
18368
18323
  value(filename2, source, assetInfo) {
@@ -18371,9 +18326,16 @@ Object.defineProperty(binding11.ContextModule.prototype, "emitFile", {
18371
18326
  });
18372
18327
 
18373
18328
  // src/ConcatenatedModule.ts
18374
- var binding12 = __toESM(require("@rspack/binding"));
18329
+ var binding13 = __toESM(require("@rspack/binding"));
18375
18330
  var import_binding81 = require("@rspack/binding");
18376
- Object.defineProperty(binding12.ConcatenatedModule.prototype, "originalSource", {
18331
+ Object.defineProperty(binding13.ConcatenatedModule.prototype, "identifier", {
18332
+ enumerable: true,
18333
+ configurable: true,
18334
+ value() {
18335
+ return this[binding13.MODULE_IDENTIFIER_SYMBOL];
18336
+ }
18337
+ });
18338
+ Object.defineProperty(binding13.ConcatenatedModule.prototype, "originalSource", {
18377
18339
  enumerable: true,
18378
18340
  configurable: true,
18379
18341
  value() {
@@ -18384,7 +18346,7 @@ Object.defineProperty(binding12.ConcatenatedModule.prototype, "originalSource",
18384
18346
  return null;
18385
18347
  }
18386
18348
  });
18387
- Object.defineProperty(binding12.ConcatenatedModule.prototype, "emitFile", {
18349
+ Object.defineProperty(binding13.ConcatenatedModule.prototype, "emitFile", {
18388
18350
  enumerable: true,
18389
18351
  configurable: true,
18390
18352
  value(filename2, source, assetInfo) {
@@ -18393,9 +18355,16 @@ Object.defineProperty(binding12.ConcatenatedModule.prototype, "emitFile", {
18393
18355
  });
18394
18356
 
18395
18357
  // src/ExternalModule.ts
18396
- var binding13 = __toESM(require("@rspack/binding"));
18358
+ var binding14 = __toESM(require("@rspack/binding"));
18397
18359
  var import_binding82 = require("@rspack/binding");
18398
- Object.defineProperty(binding13.ExternalModule.prototype, "originalSource", {
18360
+ Object.defineProperty(binding14.ExternalModule.prototype, "identifier", {
18361
+ enumerable: true,
18362
+ configurable: true,
18363
+ value() {
18364
+ return this[binding14.MODULE_IDENTIFIER_SYMBOL];
18365
+ }
18366
+ });
18367
+ Object.defineProperty(binding14.ExternalModule.prototype, "originalSource", {
18399
18368
  enumerable: true,
18400
18369
  configurable: true,
18401
18370
  value() {
@@ -18406,7 +18375,7 @@ Object.defineProperty(binding13.ExternalModule.prototype, "originalSource", {
18406
18375
  return null;
18407
18376
  }
18408
18377
  });
18409
- Object.defineProperty(binding13.ExternalModule.prototype, "emitFile", {
18378
+ Object.defineProperty(binding14.ExternalModule.prototype, "emitFile", {
18410
18379
  enumerable: true,
18411
18380
  configurable: true,
18412
18381
  value(filename2, source, assetInfo) {
@@ -21293,6 +21262,7 @@ module.exports = rspack;
21293
21262
  LightningCssMinimizerRspackPlugin,
21294
21263
  LoaderOptionsPlugin,
21295
21264
  LoaderTargetPlugin,
21265
+ Module,
21296
21266
  ModuleFilenameHelpers,
21297
21267
  MultiCompiler,
21298
21268
  MultiStats,