@rspack/core 1.5.8 → 1.6.0-beta.0

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
@@ -28,12 +28,11 @@ var __webpack_modules__ = {
28
28
  if ("function" == typeof options && (callback = options, options = void 0), "string" != typeof path && !Buffer.isBuffer(path) && !(path instanceof URL) && "number" != typeof path) return void callback(TypeError("path must be a string, Buffer, URL or number"));
29
29
  if (options) return this._provider.call(this._providerContext, path, options, callback);
30
30
  let callbacks = this._activeAsyncOperations.get(path);
31
- if (callbacks) return void callbacks.push(callback);
32
- this._activeAsyncOperations.set(path, callbacks = [
31
+ callbacks ? callbacks.push(callback) : (this._activeAsyncOperations.set(path, callbacks = [
33
32
  callback
34
33
  ]), provider(path, (err, result)=>{
35
34
  this._activeAsyncOperations.delete(path), runCallbacks(callbacks, err, result);
36
- });
35
+ }));
37
36
  } : null, this.provideSync = this._syncProvider ? (path, options)=>this._syncProvider.call(this._providerContext, path, options) : null;
38
37
  }
39
38
  purge() {}
@@ -54,12 +53,11 @@ var __webpack_modules__ = {
54
53
  let cacheEntry = this._data.get(strPath);
55
54
  if (void 0 !== cacheEntry) return cacheEntry.err ? nextTick(callback, cacheEntry.err) : nextTick(callback, null, cacheEntry.result);
56
55
  let callbacks = this._activeAsyncOperations.get(strPath);
57
- if (void 0 !== callbacks) return void callbacks.push(callback);
58
- this._activeAsyncOperations.set(strPath, callbacks = [
56
+ void 0 !== callbacks ? callbacks.push(callback) : (this._activeAsyncOperations.set(strPath, callbacks = [
59
57
  callback
60
58
  ]), this._provider.call(this._providerContext, path, (err, result)=>{
61
59
  this._activeAsyncOperations.delete(strPath), this._storeResult(strPath, err, result), this._enterAsyncMode(), runCallbacks(callbacks, err, result);
62
- });
60
+ }));
63
61
  }
64
62
  provideSync(path, options) {
65
63
  let result;
@@ -161,21 +159,21 @@ var __webpack_modules__ = {
161
159
  module.exports = class {
162
160
  constructor(fileSystem, duration){
163
161
  this.fileSystem = fileSystem, this._lstatBackend = createBackend(duration, this.fileSystem.lstat, this.fileSystem.lstatSync, this.fileSystem);
164
- let lstat = this._lstatBackend.provide;
162
+ const lstat = this._lstatBackend.provide;
165
163
  this.lstat = lstat;
166
- let lstatSync = this._lstatBackend.provideSync;
164
+ const lstatSync = this._lstatBackend.provideSync;
167
165
  this.lstatSync = lstatSync, this._statBackend = createBackend(duration, this.fileSystem.stat, this.fileSystem.statSync, this.fileSystem);
168
- let stat = this._statBackend.provide;
166
+ const stat = this._statBackend.provide;
169
167
  this.stat = stat;
170
- let statSync = this._statBackend.provideSync;
168
+ const statSync = this._statBackend.provideSync;
171
169
  this.statSync = statSync, this._readdirBackend = createBackend(duration, this.fileSystem.readdir, this.fileSystem.readdirSync, this.fileSystem);
172
- let readdir = this._readdirBackend.provide;
170
+ const readdir = this._readdirBackend.provide;
173
171
  this.readdir = readdir;
174
- let readdirSync = this._readdirBackend.provideSync;
172
+ const readdirSync = this._readdirBackend.provideSync;
175
173
  this.readdirSync = readdirSync, this._readFileBackend = createBackend(duration, this.fileSystem.readFile, this.fileSystem.readFileSync, this.fileSystem);
176
- let readFile = this._readFileBackend.provide;
174
+ const readFile = this._readFileBackend.provide;
177
175
  this.readFile = readFile;
178
- let readFileSync = this._readFileBackend.provideSync;
176
+ const readFileSync = this._readFileBackend.provideSync;
179
177
  this.readFileSync = readFileSync, this._readJsonBackend = createBackend(duration, this.fileSystem.readJson || this.readFile && ((path, callback)=>{
180
178
  this.readFile(path, (err, buffer)=>{
181
179
  let data;
@@ -189,17 +187,17 @@ var __webpack_modules__ = {
189
187
  callback(null, data);
190
188
  });
191
189
  }), this.fileSystem.readJsonSync || this.readFileSync && ((path)=>JSON.parse(this.readFileSync(path).toString("utf8"))), this.fileSystem);
192
- let readJson = this._readJsonBackend.provide;
190
+ const readJson = this._readJsonBackend.provide;
193
191
  this.readJson = readJson;
194
- let readJsonSync = this._readJsonBackend.provideSync;
192
+ const readJsonSync = this._readJsonBackend.provideSync;
195
193
  this.readJsonSync = readJsonSync, this._readlinkBackend = createBackend(duration, this.fileSystem.readlink, this.fileSystem.readlinkSync, this.fileSystem);
196
- let readlink = this._readlinkBackend.provide;
194
+ const readlink = this._readlinkBackend.provide;
197
195
  this.readlink = readlink;
198
- let readlinkSync = this._readlinkBackend.provideSync;
196
+ const readlinkSync = this._readlinkBackend.provideSync;
199
197
  this.readlinkSync = readlinkSync, this._realpathBackend = createBackend(duration, this.fileSystem.realpath, this.fileSystem.realpathSync, this.fileSystem);
200
- let realpath = this._realpathBackend.provide;
198
+ const realpath = this._realpathBackend.provide;
201
199
  this.realpath = realpath;
202
- let realpathSync = this._realpathBackend.provideSync;
200
+ const realpathSync = this._realpathBackend.provideSync;
203
201
  this.realpathSync = realpathSync;
204
202
  }
205
203
  purge(what) {
@@ -964,8 +962,8 @@ for(var __webpack_i__ in (()=>{
964
962
  "context"
965
963
  ]))
966
964
  });
967
- let hooks = this.hooks, caches = {};
968
- for (let key of Object.keys(hooks))caches[key] = new Map();
965
+ const hooks = this.hooks, caches = {};
966
+ for (const key of Object.keys(hooks))caches[key] = new Map();
969
967
  this._caches = caches, this._inCreate = !1;
970
968
  }
971
969
  _getAllLevelHooks(hookMap, cache, type) {
@@ -1509,8 +1507,10 @@ for(var __webpack_i__ in (()=>{
1509
1507
  #addEntryDispatcher;
1510
1508
  [_computedKey];
1511
1509
  constructor(compiler, inner){
1510
+ var name, stage, getArgs;
1511
+ let errorMessage, getOptions;
1512
1512
  this.#inner = inner, this.#shutdown = !1;
1513
- let processAssetsHook = new lite_tapable_namespaceObject.AsyncSeriesHook([
1513
+ const processAssetsHook = new lite_tapable_namespaceObject.AsyncSeriesHook([
1514
1514
  "assets"
1515
1515
  ]);
1516
1516
  this.hooks = {
@@ -1518,35 +1518,32 @@ for(var __webpack_i__ in (()=>{
1518
1518
  afterProcessAssets: new lite_tapable_namespaceObject.SyncHook([
1519
1519
  "assets"
1520
1520
  ]),
1521
- additionalAssets: ((name, stage, getArgs)=>{
1522
- let errorMessage = (reason)=>`Can't automatically convert plugin using Compilation.hooks.${name} to Compilation.hooks.processAssets because ${reason}.
1521
+ additionalAssets: (name = "additionalAssets", stage = Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL, getArgs = ()=>[], errorMessage = (reason)=>`Can't automatically convert plugin using Compilation.hooks.${name} to Compilation.hooks.processAssets because ${reason}.
1523
1522
  BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a single Compilation.hooks.processAssets hook.`, getOptions = (options)=>{
1524
- let isString = "string" == typeof options;
1525
- if (!isString && options.stage) throw Error(errorMessage("it's using the 'stage' option"));
1526
- return {
1527
- ...isString ? {
1528
- name: options
1529
- } : options,
1530
- stage: stage
1531
- };
1523
+ let isString = "string" == typeof options;
1524
+ if (!isString && options.stage) throw Error(errorMessage("it's using the 'stage' option"));
1525
+ return {
1526
+ ...isString ? {
1527
+ name: options
1528
+ } : options,
1529
+ stage: stage
1532
1530
  };
1533
- return Object.freeze({
1534
- name,
1535
- intercept () {
1536
- throw Error(errorMessage("it's using 'intercept'"));
1537
- },
1538
- tap: (options, fn)=>{
1539
- processAssetsHook.tap(getOptions(options), ()=>fn(...getArgs()));
1540
- },
1541
- tapAsync: (options, fn)=>{
1542
- processAssetsHook.tapAsync(getOptions(options), (assets, callback)=>fn(...getArgs(), callback));
1543
- },
1544
- tapPromise: (options, fn)=>{
1545
- processAssetsHook.tapPromise(getOptions(options), ()=>fn(...getArgs()));
1546
- },
1547
- _fakeHook: !0
1548
- });
1549
- })("additionalAssets", Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL, ()=>[]),
1531
+ }, Object.freeze({
1532
+ name,
1533
+ intercept () {
1534
+ throw Error(errorMessage("it's using 'intercept'"));
1535
+ },
1536
+ tap: (options, fn)=>{
1537
+ processAssetsHook.tap(getOptions(options), ()=>fn(...getArgs()));
1538
+ },
1539
+ tapAsync: (options, fn)=>{
1540
+ processAssetsHook.tapAsync(getOptions(options), (assets, callback)=>fn(...getArgs(), callback));
1541
+ },
1542
+ tapPromise: (options, fn)=>{
1543
+ processAssetsHook.tapPromise(getOptions(options), ()=>fn(...getArgs()));
1544
+ },
1545
+ _fakeHook: !0
1546
+ })),
1550
1547
  childCompiler: new lite_tapable_namespaceObject.SyncHook([
1551
1548
  "childCompiler",
1552
1549
  "compilerName",
@@ -2196,7 +2193,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2196
2193
  }
2197
2194
  }
2198
2195
  static entryDescriptionToOptions(compiler, name, desc) {
2199
- let options = {
2196
+ return {
2200
2197
  name,
2201
2198
  filename: desc.filename,
2202
2199
  runtime: desc.runtime,
@@ -2208,8 +2205,6 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2208
2205
  asyncChunks: desc.asyncChunks,
2209
2206
  library: desc.library
2210
2207
  };
2211
- if (void 0 !== desc.layer && !compiler.options.experiments.layers) throw Error("'entryOptions.layer' is only allowed when 'experiments.layers' is enabled");
2212
- return options;
2213
2208
  }
2214
2209
  }
2215
2210
  let lib_EntryOptionPlugin = EntryOptionPlugin, EntryPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EntryPlugin, (context, entry, options = "")=>({
@@ -2754,7 +2749,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
2754
2749
  class Message extends Error {
2755
2750
  constructor(){
2756
2751
  super(), this.stack = void 0, Error.captureStackTrace(this);
2757
- let match = this.stack.split("\n")[3].match(CURRENT_METHOD_REGEXP);
2752
+ const match = this.stack.split("\n")[3].match(CURRENT_METHOD_REGEXP);
2758
2753
  this.message = match?.[1] ? createMessage(match[1]) : createMessage();
2759
2754
  }
2760
2755
  }
@@ -2780,7 +2775,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
2780
2775
  chunkSize;
2781
2776
  digestSize;
2782
2777
  constructor(instance, instancesPool, chunkSize, digestSize){
2783
- let exports1 = instance.exports;
2778
+ const exports1 = instance.exports;
2784
2779
  exports1.init(), this.exports = exports1, this.mem = Buffer.from(exports1.memory.buffer, 0, 65536), this.buffered = 0, this.instancesPool = instancesPool, this.chunkSize = chunkSize, this.digestSize = digestSize;
2785
2780
  }
2786
2781
  reset() {
@@ -3134,35 +3129,34 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
3134
3129
  parallel;
3135
3130
  loaderItem;
3136
3131
  constructor(loaderItem, compiler){
3137
- let { request, path, query, fragment, options, ident, normal, pitch, raw, type } = function(loader, compiler) {
3138
- let obj = {
3139
- path: null,
3140
- query: null,
3141
- fragment: null,
3142
- options: null,
3143
- ident: null,
3144
- normal: null,
3145
- pitch: null,
3146
- raw: null,
3147
- data: null,
3148
- pitchExecuted: !1,
3149
- normalExecuted: !1
3150
- };
3151
- return Object.defineProperty(obj, "request", {
3152
- enumerable: !0,
3153
- get: ()=>obj.path.replace(/#/g, "\u200b#") + obj.query.replace(/#/g, "\u200b#") + obj.fragment,
3154
- set: (value)=>{
3155
- let splittedRequest = parseResourceWithoutFragment(value.loader);
3156
- if (obj.path = splittedRequest.path, obj.query = splittedRequest.query, obj.fragment = "", obj.options = null === obj.options ? splittedRequest.query ? splittedRequest.query.slice(1) : void 0 : obj.options, "string" == typeof obj.options && "?" === obj.options[0]) {
3157
- let ident = obj.options.slice(1);
3158
- if ("[[missing ident]]" === ident) throw Error("No ident is provided by referenced loader. When using a function for Rule.use in config you need to provide an 'ident' property for referenced loader options.");
3159
- if (obj.options = compiler.__internal__ruleSet.references.get(ident), void 0 === obj.options) throw Error("Invalid ident is provided by referenced loader");
3160
- obj.ident = ident;
3161
- }
3162
- obj.type = "" === value.type ? void 0 : value.type, null === obj.options || void 0 === obj.options ? obj.query = "" : "string" == typeof obj.options ? obj.query = `?${obj.options}` : obj.ident ? obj.query = `??${obj.ident}` : "object" == typeof obj.options && obj.options.ident ? obj.query = `??${obj.options.ident}` : obj.query = `?${JSON.stringify(obj.options)}`;
3132
+ var loader, compiler1;
3133
+ let obj;
3134
+ const { request, path, query, fragment, options, ident, normal, pitch, raw, type } = (loader = loaderItem, compiler1 = compiler, Object.defineProperty(obj = {
3135
+ path: null,
3136
+ query: null,
3137
+ fragment: null,
3138
+ options: null,
3139
+ ident: null,
3140
+ normal: null,
3141
+ pitch: null,
3142
+ raw: null,
3143
+ data: null,
3144
+ pitchExecuted: !1,
3145
+ normalExecuted: !1
3146
+ }, "request", {
3147
+ enumerable: !0,
3148
+ get: ()=>obj.path.replace(/#/g, "\u200b#") + obj.query.replace(/#/g, "\u200b#") + obj.fragment,
3149
+ set: (value)=>{
3150
+ let splittedRequest = parseResourceWithoutFragment(value.loader);
3151
+ if (obj.path = splittedRequest.path, obj.query = splittedRequest.query, obj.fragment = "", obj.options = null === obj.options ? splittedRequest.query ? splittedRequest.query.slice(1) : void 0 : obj.options, "string" == typeof obj.options && "?" === obj.options[0]) {
3152
+ let ident = obj.options.slice(1);
3153
+ if ("[[missing ident]]" === ident) throw Error("No ident is provided by referenced loader. When using a function for Rule.use in config you need to provide an 'ident' property for referenced loader options.");
3154
+ if (obj.options = compiler1.__internal__ruleSet.references.get(ident), void 0 === obj.options) throw Error("Invalid ident is provided by referenced loader");
3155
+ obj.ident = ident;
3163
3156
  }
3164
- }), obj.request = loader, Object.preventExtensions && Object.preventExtensions(obj), obj;
3165
- }(loaderItem, compiler);
3157
+ obj.type = "" === value.type ? void 0 : value.type, null === obj.options || void 0 === obj.options ? obj.query = "" : "string" == typeof obj.options ? obj.query = `?${obj.options}` : obj.ident ? obj.query = `??${obj.ident}` : "object" == typeof obj.options && obj.options.ident ? obj.query = `??${obj.options.ident}` : obj.query = `?${JSON.stringify(obj.options)}`;
3158
+ }
3159
+ }), obj.request = loader, Object.preventExtensions && Object.preventExtensions(obj), obj);
3166
3160
  this.request = request, this.path = path, this.query = query, this.fragment = fragment, this.options = options, this.ident = ident, this.normal = normal, this.pitch = pitch, this.raw = raw, this.type = type, this.parallel = !!ident && compiler.__internal__ruleSet.references.get(`${ident}$$parallelism`), this.loaderItem = loaderItem, this.loaderItem.data = this.loaderItem.data ?? {};
3167
3161
  }
3168
3162
  get pitchExecuted() {
@@ -3428,9 +3422,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
3428
3422
  is_pitch: pitch,
3429
3423
  resource: resource
3430
3424
  }
3431
- }), parallelism) result = await service_run(loaderName, {
3432
- loaderContext: (()=>{
3433
- let normalModule = loaderContext._module instanceof binding_.NormalModule ? loaderContext._module : void 0, workerLoaderContext = {
3425
+ }), parallelism) {
3426
+ let normalModule, workerLoaderContext;
3427
+ result = await service_run(loaderName, {
3428
+ loaderContext: (normalModule = loaderContext._module instanceof binding_.NormalModule ? loaderContext._module : void 0, Object.assign(workerLoaderContext = {
3434
3429
  hot: loaderContext.hot,
3435
3430
  context: loaderContext.context,
3436
3431
  resourcePath: loaderContext.resourcePath,
@@ -3483,125 +3478,125 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
3483
3478
  userRequest: normalModule?.userRequest,
3484
3479
  rawRequest: normalModule?.rawRequest
3485
3480
  }
3486
- };
3487
- return Object.assign(workerLoaderContext, compiler.options.loader), workerLoaderContext;
3488
- })(),
3489
- loaderState,
3490
- args
3491
- }, {
3492
- handleIncomingRequest (requestType, ...args) {
3493
- switch(requestType){
3494
- case "AddDependency":
3495
- loaderContext.addDependency(args[0]);
3496
- break;
3497
- case "AddContextDependency":
3498
- loaderContext.addContextDependency(args[0]);
3499
- break;
3500
- case "AddMissingDependency":
3501
- loaderContext.addMissingDependency(args[0]);
3502
- break;
3503
- case "AddBuildDependency":
3504
- loaderContext.addBuildDependency(args[0]);
3505
- break;
3506
- case "GetDependencies":
3507
- return loaderContext.getDependencies();
3508
- case "GetContextDependencies":
3509
- return loaderContext.getContextDependencies();
3510
- case "GetMissingDependencies":
3511
- return loaderContext.getMissingDependencies();
3512
- case "ClearDependencies":
3513
- loaderContext.clearDependencies();
3514
- break;
3515
- case "Resolve":
3516
- return new Promise((resolve, reject)=>{
3517
- loaderContext.resolve(args[0], args[1], (err, result)=>{
3518
- err ? reject(err) : resolve(result);
3519
- });
3520
- });
3521
- case "GetResolve":
3522
- return new Promise((resolve, reject)=>{
3523
- loaderContext.getResolve(args[0])(args[1], args[2], (err, result)=>{
3524
- err ? reject(err) : resolve(result);
3525
- });
3526
- });
3527
- case "GetLogger":
3528
- {
3529
- let [type, name, arg] = args;
3530
- loaderContext.getLogger(name)[type](...arg);
3531
- }
3532
- case "EmitError":
3533
- {
3534
- let workerError = args[0], error = Error(workerError.message);
3535
- error.stack = workerError.stack, error.name = workerError.name, loaderContext.emitError(error);
3481
+ }, compiler.options.loader), workerLoaderContext),
3482
+ loaderState,
3483
+ args
3484
+ }, {
3485
+ handleIncomingRequest (requestType, ...args) {
3486
+ switch(requestType){
3487
+ case "AddDependency":
3488
+ loaderContext.addDependency(args[0]);
3536
3489
  break;
3537
- }
3538
- case "EmitWarning":
3539
- {
3540
- let workerError = args[0], error = Error(workerError.message);
3541
- error.stack = workerError.stack, error.name = workerError.name, loaderContext.emitWarning(error);
3490
+ case "AddContextDependency":
3491
+ loaderContext.addContextDependency(args[0]);
3542
3492
  break;
3543
- }
3544
- case "EmitFile":
3545
- {
3546
- let [name, content, sourceMap, assetInfo] = args;
3547
- loaderContext.emitFile(name, content, sourceMap, assetInfo);
3493
+ case "AddMissingDependency":
3494
+ loaderContext.addMissingDependency(args[0]);
3548
3495
  break;
3549
- }
3550
- case "EmitDiagnostic":
3551
- {
3552
- let diagnostic = args[0];
3553
- loaderContext.experiments.emitDiagnostic(diagnostic);
3496
+ case "AddBuildDependency":
3497
+ loaderContext.addBuildDependency(args[0]);
3554
3498
  break;
3555
- }
3556
- case "SetCacheable":
3557
- {
3558
- let cacheable = args[0];
3559
- loaderContext.cacheable(cacheable);
3499
+ case "GetDependencies":
3500
+ return loaderContext.getDependencies();
3501
+ case "GetContextDependencies":
3502
+ return loaderContext.getContextDependencies();
3503
+ case "GetMissingDependencies":
3504
+ return loaderContext.getMissingDependencies();
3505
+ case "ClearDependencies":
3506
+ loaderContext.clearDependencies();
3560
3507
  break;
3561
- }
3562
- case "ImportModule":
3563
- return loaderContext.importModule(args[0], args[1]);
3564
- case "UpdateLoaderObjects":
3565
- {
3566
- let updates = args[0];
3567
- loaderContext.loaders = loaderContext.loaders.map((item, index)=>{
3568
- let update = updates[index];
3569
- return item.loaderItem.data = update.data, update.pitchExecuted && (item.pitchExecuted = !0), update.normalExecuted && (item.normalExecuted = !0), item;
3508
+ case "Resolve":
3509
+ return new Promise((resolve, reject)=>{
3510
+ loaderContext.resolve(args[0], args[1], (err, result)=>{
3511
+ err ? reject(err) : resolve(result);
3512
+ });
3570
3513
  });
3571
- break;
3572
- }
3573
- case "CompilationGetPath":
3574
- {
3575
- let filename = args[0], data = args[1];
3576
- return compiler._lastCompilation.getPath(filename, data);
3577
- }
3578
- case "CompilationGetPathWithInfo":
3579
- {
3580
- let filename = args[0], data = args[1];
3581
- return compiler._lastCompilation.getPathWithInfo(filename, data);
3582
- }
3583
- case "CompilationGetAssetPath":
3584
- {
3585
- let filename = args[0], data = args[1];
3586
- return compiler._lastCompilation.getAssetPath(filename, data);
3587
- }
3588
- case "CompilationGetAssetPathWithInfo":
3589
- {
3590
- let filename = args[0], data = args[1];
3591
- return compiler._lastCompilation.getAssetPathWithInfo(filename, data);
3592
- }
3593
- default:
3594
- throw Error(`Unknown request type: ${requestType}`);
3514
+ case "GetResolve":
3515
+ return new Promise((resolve, reject)=>{
3516
+ loaderContext.getResolve(args[0])(args[1], args[2], (err, result)=>{
3517
+ err ? reject(err) : resolve(result);
3518
+ });
3519
+ });
3520
+ case "GetLogger":
3521
+ {
3522
+ let [type, name, arg] = args;
3523
+ loaderContext.getLogger(name)[type](...arg);
3524
+ break;
3525
+ }
3526
+ case "EmitError":
3527
+ {
3528
+ let workerError = args[0], error = Error(workerError.message);
3529
+ error.stack = workerError.stack, error.name = workerError.name, loaderContext.emitError(error);
3530
+ break;
3531
+ }
3532
+ case "EmitWarning":
3533
+ {
3534
+ let workerError = args[0], error = Error(workerError.message);
3535
+ error.stack = workerError.stack, error.name = workerError.name, loaderContext.emitWarning(error);
3536
+ break;
3537
+ }
3538
+ case "EmitFile":
3539
+ {
3540
+ let [name, content, sourceMap, assetInfo] = args;
3541
+ loaderContext.emitFile(name, content, sourceMap, assetInfo);
3542
+ break;
3543
+ }
3544
+ case "EmitDiagnostic":
3545
+ {
3546
+ let diagnostic = args[0];
3547
+ loaderContext.experiments.emitDiagnostic(diagnostic);
3548
+ break;
3549
+ }
3550
+ case "SetCacheable":
3551
+ {
3552
+ let cacheable = args[0];
3553
+ loaderContext.cacheable(cacheable);
3554
+ break;
3555
+ }
3556
+ case "ImportModule":
3557
+ return loaderContext.importModule(args[0], args[1]);
3558
+ case "UpdateLoaderObjects":
3559
+ {
3560
+ let updates = args[0];
3561
+ loaderContext.loaders = loaderContext.loaders.map((item, index)=>{
3562
+ let update = updates[index];
3563
+ return item.loaderItem.data = update.data, update.pitchExecuted && (item.pitchExecuted = !0), update.normalExecuted && (item.normalExecuted = !0), item;
3564
+ });
3565
+ break;
3566
+ }
3567
+ case "CompilationGetPath":
3568
+ {
3569
+ let filename = args[0], data = args[1];
3570
+ return compiler._lastCompilation.getPath(filename, data);
3571
+ }
3572
+ case "CompilationGetPathWithInfo":
3573
+ {
3574
+ let filename = args[0], data = args[1];
3575
+ return compiler._lastCompilation.getPathWithInfo(filename, data);
3576
+ }
3577
+ case "CompilationGetAssetPath":
3578
+ {
3579
+ let filename = args[0], data = args[1];
3580
+ return compiler._lastCompilation.getAssetPath(filename, data);
3581
+ }
3582
+ case "CompilationGetAssetPathWithInfo":
3583
+ {
3584
+ let filename = args[0], data = args[1];
3585
+ return compiler._lastCompilation.getAssetPathWithInfo(filename, data);
3586
+ }
3587
+ default:
3588
+ throw Error(`Unknown request type: ${requestType}`);
3589
+ }
3595
3590
  }
3596
- }
3597
- }) || [];
3598
- else {
3599
- var args1, raw;
3600
- loaderState === binding_.JsLoaderState.Normal && (args1 = args, !(raw = !!currentLoaderObject?.raw) && args1[0] instanceof Uint8Array ? args1[0] = function(buf) {
3601
- let str = decoder.decode(buf.buffer instanceof SharedArrayBuffer ? Buffer.from(buf) : buf);
3602
- return 0xfeff === str.charCodeAt(0) ? str.slice(1) : str;
3603
- }(args1[0]) : raw && "string" == typeof args1[0] && (args1[0] = Buffer.from(args1[0], "utf-8")), raw && args1[0] instanceof Uint8Array && !Buffer.isBuffer(args1[0]) && (args1[0] = Buffer.from(args1[0].buffer))), result = await utils_runSyncOrAsync(fn, loaderContext, args) || [];
3604
- }
3591
+ }) || [];
3592
+ } else loaderState === binding_.JsLoaderState.Normal && function(args, raw) {
3593
+ if (!raw && args[0] instanceof Uint8Array) {
3594
+ var buf;
3595
+ let str;
3596
+ args[0] = (buf = args[0], 0xfeff === (str = decoder.decode(buf.buffer instanceof SharedArrayBuffer ? Buffer.from(buf) : buf)).charCodeAt(0) ? str.slice(1) : str);
3597
+ } else raw && "string" == typeof args[0] && (args[0] = Buffer.from(args[0], "utf-8"));
3598
+ raw && args[0] instanceof Uint8Array && !Buffer.isBuffer(args[0]) && (args[0] = Buffer.from(args[0].buffer));
3599
+ }(args, !!currentLoaderObject?.raw), result = await utils_runSyncOrAsync(fn, loaderContext, args) || [];
3605
3600
  return JavaScriptTracer.endAsync({
3606
3601
  name: loaderName,
3607
3602
  trackName: loaderName,
@@ -3701,39 +3696,45 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
3701
3696
  let o, isBuiltin = !1;
3702
3697
  if (use.loader.startsWith(BUILTIN_LOADER_PREFIX)) {
3703
3698
  let temp = function(identifier, o, options) {
3704
- if (identifier.startsWith(`${BUILTIN_LOADER_PREFIX}swc-loader`)) {
3705
- var o1, options1, options2 = o;
3706
- if (options2 && "object" == typeof options2) {
3707
- options2.jsc ??= {}, options2.jsc.experimental ??= {}, options2.jsc.experimental.disableAllLints ??= !0;
3708
- let { rspackExperiments } = options2;
3709
- rspackExperiments && ((rspackExperiments.import || rspackExperiments.pluginImport) && (rspackExperiments.import = function(pluginImport) {
3710
- if (pluginImport) return pluginImport.map((config)=>{
3711
- let rawConfig = {
3712
- ...config,
3713
- style: {}
3714
- };
3715
- if ("boolean" == typeof config.style) rawConfig.style.bool = config.style;
3716
- else if ("string" == typeof config.style) {
3717
- let isTpl = config.style.includes("{{");
3718
- rawConfig.style[isTpl ? "custom" : "css"] = config.style;
3719
- } else {
3720
- var val;
3721
- val = config.style, "[object Object]" === Object.prototype.toString.call(val) && (rawConfig.style = config.style);
3722
- }
3723
- return config.styleLibraryDirectory && (rawConfig.style = {
3724
- styleLibraryDirectory: config.styleLibraryDirectory
3725
- }), rawConfig;
3699
+ if (identifier.startsWith(`${BUILTIN_LOADER_PREFIX}swc-loader`)) return ((options, _)=>{
3700
+ if (options && "object" == typeof options) {
3701
+ options.jsc ??= {}, options.jsc.experimental ??= {}, options.jsc.experimental.disableAllLints ??= !0;
3702
+ let { rspackExperiments } = options;
3703
+ if (rspackExperiments) {
3704
+ var options1;
3705
+ (rspackExperiments.import || rspackExperiments.pluginImport) && (rspackExperiments.import = function(pluginImport) {
3706
+ if (pluginImport) return pluginImport.map((config)=>{
3707
+ let rawConfig = {
3708
+ ...config,
3709
+ style: {}
3710
+ };
3711
+ if ("boolean" == typeof config.style) rawConfig.style.bool = config.style;
3712
+ else if ("string" == typeof config.style) {
3713
+ let isTpl = config.style.includes("{{");
3714
+ rawConfig.style[isTpl ? "custom" : "css"] = config.style;
3715
+ } else {
3716
+ var val;
3717
+ val = config.style, "[object Object]" === Object.prototype.toString.call(val) && (rawConfig.style = config.style);
3718
+ }
3719
+ return config.styleLibraryDirectory && (rawConfig.style = {
3720
+ styleLibraryDirectory: config.styleLibraryDirectory
3721
+ }), rawConfig;
3722
+ });
3723
+ }(rspackExperiments.import || rspackExperiments.pluginImport)), rspackExperiments.collectTypeScriptInfo && (rspackExperiments.collectTypeScriptInfo = {
3724
+ typeExports: (options1 = rspackExperiments.collectTypeScriptInfo).typeExports,
3725
+ exportedEnum: !0 === options1.exportedEnum ? "all" : !1 === options1.exportedEnum || void 0 === options1.exportedEnum ? "none" : "const-only"
3726
3726
  });
3727
- }(rspackExperiments.import || rspackExperiments.pluginImport)), rspackExperiments.collectTypeScriptInfo && (rspackExperiments.collectTypeScriptInfo = {
3728
- typeExports: (options1 = rspackExperiments.collectTypeScriptInfo).typeExports,
3729
- exportedEnum: !0 === options1.exportedEnum ? "all" : !1 === options1.exportedEnum || void 0 === options1.exportedEnum ? "none" : "const-only"
3730
- }));
3727
+ }
3731
3728
  }
3732
- return options2;
3729
+ return options;
3730
+ })(o, 0);
3731
+ if (identifier.startsWith(`${BUILTIN_LOADER_PREFIX}lightningcss-loader`)) {
3732
+ var o1;
3733
+ return (o1 = o) && "object" == typeof o1 && ("string" == typeof o1.targets && (o1.targets = [
3734
+ o1.targets
3735
+ ]), o1.include && "object" == typeof o1.include && (o1.include = toFeatures(o1.include)), o1.exclude && "object" == typeof o1.exclude && (o1.exclude = toFeatures(o1.exclude))), o1;
3733
3736
  }
3734
- return identifier.startsWith(`${BUILTIN_LOADER_PREFIX}lightningcss-loader`) ? ((o1 = o) && "object" == typeof o1 && ("string" == typeof o1.targets && (o1.targets = [
3735
- o1.targets
3736
- ]), o1.include && "object" == typeof o1.include && (o1.include = toFeatures(o1.include)), o1.exclude && "object" == typeof o1.exclude && (o1.exclude = toFeatures(o1.exclude))), o1) : o;
3737
+ return o;
3737
3738
  }(use.loader, use.options, 0);
3738
3739
  o = isNil(temp) ? void 0 : "string" == typeof temp ? temp : JSON.stringify(temp, null, 2), isBuiltin = !0;
3739
3740
  }
@@ -3847,7 +3848,8 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
3847
3848
  resolve: rule.resolve ? getRawResolve(rule.resolve) : void 0,
3848
3849
  oneOf: rule.oneOf ? rule.oneOf.filter(Boolean).map((rule, index)=>getRawModuleRule(rule, `${path}.oneOf[${index}]`, options, rule.type ?? upperType)) : void 0,
3849
3850
  rules: rule.rules ? rule.rules.filter(Boolean).map((rule, index)=>getRawModuleRule(rule, `${path}.rules[${index}]`, options, rule.type ?? upperType)) : void 0,
3850
- enforce: rule.enforce
3851
+ enforce: rule.enforce,
3852
+ extractSourceMap: rule.extractSourceMap
3851
3853
  };
3852
3854
  return ("function" == typeof rule.test || "function" == typeof rule.resource || "function" == typeof rule.resourceQuery || "function" == typeof rule.resourceFragment) && (delete rawModuleRule.test, delete rawModuleRule.resource, delete rawModuleRule.resourceQuery, delete rawModuleRule.resourceFragment, rawModuleRule.rspackResource = getRawRuleSetCondition((resourceQueryFragment)=>{
3853
3855
  let { path, query, fragment } = parseResource(resourceQueryFragment);
@@ -4188,11 +4190,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
4188
4190
  chunks.push(chunk);
4189
4191
  }), stream.on("end", ()=>{
4190
4192
  let bodyBuffer = Buffer.concat(chunks);
4191
- if (!res.complete) return void reject(Error(`${url} request was terminated early`));
4192
- resolve({
4193
+ res.complete ? resolve({
4193
4194
  res,
4194
4195
  body: bodyBuffer
4195
- });
4196
+ }) : reject(Error(`${url} request was terminated early`));
4196
4197
  });
4197
4198
  }).on("error", reject);
4198
4199
  });
@@ -4462,11 +4463,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
4462
4463
  var _a;
4463
4464
  (_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);
4464
4465
  }), inst._zod.check = (payload)=>{
4466
+ var val, step;
4467
+ let valDecCount, stepDecCount, decCount, valInt;
4465
4468
  if (typeof payload.value != typeof def.value) throw Error("Cannot mix number and bigint in multiple_of check.");
4466
- ("bigint" == typeof payload.value ? payload.value % def.value === BigInt(0) : 0 === function(val, step) {
4467
- let valDecCount = (val.toString().split(".")[1] || "").length, stepDecCount = (step.toString().split(".")[1] || "").length, decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount, valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
4468
- return valInt % Number.parseInt(step.toFixed(decCount).replace(".", "")) / 10 ** decCount;
4469
- }(payload.value, def.value)) || payload.issues.push({
4469
+ ("bigint" == typeof payload.value ? payload.value % def.value === BigInt(0) : 0 == (val = payload.value, step = def.value, valDecCount = (val.toString().split(".")[1] || "").length, stepDecCount = (step.toString().split(".")[1] || "").length, decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount, (valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""))) % Number.parseInt(step.toFixed(decCount).replace(".", "")) / 10 ** decCount)) || payload.issues.push({
4470
4470
  origin: typeof payload.value,
4471
4471
  code: "not_multiple_of",
4472
4472
  divisor: def.value,
@@ -4828,12 +4828,11 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
4828
4828
  version: 1
4829
4829
  };
4830
4830
  }), $ZodString = $constructor("$ZodString", (inst, def)=>{
4831
+ var params;
4832
+ let regex;
4831
4833
  $ZodType.init(inst, def), inst._zod.pattern = [
4832
4834
  ...inst?._zod.bag?.patterns ?? []
4833
- ].pop() ?? ((params)=>{
4834
- let regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : "[\\s\\S]*";
4835
- return RegExp(`^${regex}$`);
4836
- })(inst._zod.bag), inst._zod.parse = (payload, _)=>{
4835
+ ].pop() ?? (regex = (params = inst._zod.bag) ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : "[\\s\\S]*", RegExp(`^${regex}$`)), inst._zod.parse = (payload, _)=>{
4837
4836
  if (def.coerce) try {
4838
4837
  payload.value = String(payload.value);
4839
4838
  } catch (_) {}
@@ -4913,16 +4912,13 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
4913
4912
  }), $ZodKSUID = $constructor("$ZodKSUID", (inst, def)=>{
4914
4913
  def.pattern ?? (def.pattern = ksuid), $ZodStringFormat.init(inst, def);
4915
4914
  }), $ZodISODateTime = $constructor("$ZodISODateTime", (inst, def)=>{
4916
- def.pattern ?? (def.pattern = function(args) {
4917
- let time = timeSource({
4918
- precision: args.precision
4919
- }), opts = [
4920
- "Z"
4921
- ];
4922
- args.local && opts.push(""), args.offset && opts.push("([+-]\\d{2}:\\d{2})");
4923
- let timeRegex = `${time}(?:${opts.join("|")})`;
4924
- return RegExp(`^${dateSource}T(?:${timeRegex})$`);
4925
- }(def)), $ZodStringFormat.init(inst, def);
4915
+ var args;
4916
+ let time, opts, timeRegex;
4917
+ def.pattern ?? (time = timeSource({
4918
+ precision: (args = def).precision
4919
+ }), opts = [
4920
+ "Z"
4921
+ ], args.local && opts.push(""), args.offset && opts.push("([+-]\\d{2}:\\d{2})"), timeRegex = `${time}(?:${opts.join("|")})`, def.pattern = RegExp(`^${dateSource}T(?:${timeRegex})$`)), $ZodStringFormat.init(inst, def);
4926
4922
  }), $ZodISODate = $constructor("$ZodISODate", (inst, def)=>{
4927
4923
  def.pattern ?? (def.pattern = regexes_date), $ZodStringFormat.init(inst, def);
4928
4924
  }), $ZodISOTime = $constructor("$ZodISOTime", (inst, def)=>{
@@ -5464,11 +5460,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
5464
5460
  return proms.length ? Promise.all(proms).then(()=>payload) : payload;
5465
5461
  };
5466
5462
  }), $ZodEnum = $constructor("$ZodEnum", (inst, def)=>{
5463
+ var entries;
5464
+ let numericValues;
5467
5465
  $ZodType.init(inst, def);
5468
- let values = function(entries) {
5469
- let numericValues = Object.values(entries).filter((v)=>"number" == typeof v);
5470
- return Object.entries(entries).filter(([k, _])=>-1 === numericValues.indexOf(+k)).map(([_, v])=>v);
5471
- }(def.entries);
5466
+ let values = (numericValues = Object.values(entries = def.entries).filter((v)=>"number" == typeof v), Object.entries(entries).filter(([k, _])=>-1 === numericValues.indexOf(+k)).map(([_, v])=>v));
5472
5467
  inst._zod.values = new Set(values), inst._zod.pattern = RegExp(`^(${values.filter((k)=>propertyKeyTypes.has(typeof k)).map((o)=>"string" == typeof o ? escapeRegex(o) : o.toString()).join("|")})$`), inst._zod.parse = (payload, _ctx)=>{
5473
5468
  let input = payload.value;
5474
5469
  return inst._zod.values.has(input) || payload.issues.push({
@@ -5727,36 +5722,37 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
5727
5722
  }), classic_errors_initializer = (inst, issues)=>{
5728
5723
  $ZodError.init(inst, issues), inst.name = "ZodError", Object.defineProperties(inst, {
5729
5724
  format: {
5730
- value: (mapper)=>(function(error, _mapper) {
5731
- let mapper = _mapper || function(issue) {
5732
- return issue.message;
5733
- }, fieldErrors = {
5734
- _errors: []
5735
- }, processError = (error)=>{
5736
- for (let issue of error.issues)if ("invalid_union" === issue.code && issue.errors.length) issue.errors.map((issues)=>processError({
5737
- issues
5738
- }));
5739
- else if ("invalid_key" === issue.code) processError({
5740
- issues: issue.issues
5741
- });
5742
- else if ("invalid_element" === issue.code) processError({
5743
- issues: issue.issues
5744
- });
5745
- else if (0 === issue.path.length) fieldErrors._errors.push(mapper(issue));
5746
- else {
5747
- let curr = fieldErrors, i = 0;
5748
- for(; i < issue.path.length;){
5749
- let el = issue.path[i];
5750
- i === issue.path.length - 1 ? (curr[el] = curr[el] || {
5751
- _errors: []
5752
- }, curr[el]._errors.push(mapper(issue))) : curr[el] = curr[el] || {
5753
- _errors: []
5754
- }, curr = curr[el], i++;
5755
- }
5725
+ value: (mapper)=>{
5726
+ var error;
5727
+ let mapper1, fieldErrors, processError;
5728
+ return error = inst, mapper1 = mapper || function(issue) {
5729
+ return issue.message;
5730
+ }, fieldErrors = {
5731
+ _errors: []
5732
+ }, (processError = (error)=>{
5733
+ for (let issue of error.issues)if ("invalid_union" === issue.code && issue.errors.length) issue.errors.map((issues)=>processError({
5734
+ issues
5735
+ }));
5736
+ else if ("invalid_key" === issue.code) processError({
5737
+ issues: issue.issues
5738
+ });
5739
+ else if ("invalid_element" === issue.code) processError({
5740
+ issues: issue.issues
5741
+ });
5742
+ else if (0 === issue.path.length) fieldErrors._errors.push(mapper1(issue));
5743
+ else {
5744
+ let curr = fieldErrors, i = 0;
5745
+ for(; i < issue.path.length;){
5746
+ let el = issue.path[i];
5747
+ i === issue.path.length - 1 ? (curr[el] = curr[el] || {
5748
+ _errors: []
5749
+ }, curr[el]._errors.push(mapper1(issue))) : curr[el] = curr[el] || {
5750
+ _errors: []
5751
+ }, curr = curr[el], i++;
5756
5752
  }
5757
- };
5758
- return processError(error), fieldErrors;
5759
- })(inst, mapper)
5753
+ }
5754
+ })(error), fieldErrors;
5755
+ }
5760
5756
  },
5761
5757
  flatten: {
5762
5758
  value: (mapper)=>(function(error, mapper = (issue)=>issue.message) {
@@ -5838,17 +5834,15 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
5838
5834
  fn: fn,
5839
5835
  ...normalizeParams(_params)
5840
5836
  });
5841
- }(check, params)), inst.superRefine = (refinement)=>inst.check(function(fn) {
5842
- let ch = function(fn) {
5843
- let ch = new $ZodCheck({
5844
- check: "custom"
5845
- });
5846
- return ch._zod.check = fn, ch;
5847
- }((payload)=>(payload.addIssue = (issue)=>{
5848
- "string" == typeof issue ? payload.issues.push(util_issue(issue, payload.value, ch._zod.def)) : (issue.fatal && (issue.continue = !1), issue.code ?? (issue.code = "custom"), issue.input ?? (issue.input = payload.value), issue.inst ?? (issue.inst = ch), issue.continue ?? (issue.continue = !ch._zod.def.abort), payload.issues.push(util_issue(issue)));
5849
- }, fn(payload.value, payload)));
5850
- return ch;
5851
- }(refinement)), inst.overwrite = (fn)=>inst.check(_overwrite(fn)), inst.optional = ()=>schemas_optional(inst), inst.nullable = ()=>nullable(inst), inst.nullish = ()=>schemas_optional(nullable(inst)), inst.nonoptional = (params)=>new ZodNonOptional({
5837
+ }(check, params)), inst.superRefine = (refinement)=>{
5838
+ var fn, fn1;
5839
+ let ch, ch1;
5840
+ return inst.check((fn = refinement, ch1 = (fn1 = (payload)=>(payload.addIssue = (issue)=>{
5841
+ "string" == typeof issue ? payload.issues.push(util_issue(issue, payload.value, ch1._zod.def)) : (issue.fatal && (issue.continue = !1), issue.code ?? (issue.code = "custom"), issue.input ?? (issue.input = payload.value), issue.inst ?? (issue.inst = ch1), issue.continue ?? (issue.continue = !ch1._zod.def.abort), payload.issues.push(util_issue(issue)));
5842
+ }, fn(payload.value, payload)), (ch = new $ZodCheck({
5843
+ check: "custom"
5844
+ }))._zod.check = fn1, ch)));
5845
+ }, inst.overwrite = (fn)=>inst.check(_overwrite(fn)), inst.optional = ()=>schemas_optional(inst), inst.nullable = ()=>nullable(inst), inst.nullish = ()=>schemas_optional(nullable(inst)), inst.nonoptional = (params)=>new ZodNonOptional({
5852
5846
  type: "nonoptional",
5853
5847
  innerType: inst,
5854
5848
  ...normalizeParams(params)
@@ -6509,9 +6503,9 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
6509
6503
  $ZodCustom.init(inst, def), ZodType.init(inst, def);
6510
6504
  });
6511
6505
  function custom(fn, _params) {
6512
- var Class = ZodCustom, fn1 = fn ?? (()=>!0), _params1 = _params;
6513
- let norm = normalizeParams(_params1);
6514
- return norm.abort ?? (norm.abort = !0), new Class({
6506
+ var Class, fn1;
6507
+ let norm;
6508
+ return Class = ZodCustom, fn1 = fn ?? (()=>!0), (norm = normalizeParams(_params)).abort ?? (norm.abort = !0), new Class({
6515
6509
  type: "custom",
6516
6510
  check: "custom",
6517
6511
  fn: fn1,
@@ -7174,9 +7168,9 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
7174
7168
  let json = JSON.parse(data);
7175
7169
  "function" != typeof c.templateParameters && (json.compilation = compilation);
7176
7170
  let renderTag = function() {
7177
- var tag = this;
7178
- let attributes = Object.keys(tag.attributes || {}).filter((attributeName)=>"" === tag.attributes[attributeName] || tag.attributes[attributeName]).map((attributeName)=>"true" === tag.attributes[attributeName] ? attributeName : `${attributeName}="${tag.attributes[attributeName]}"`);
7179
- return `<${[
7171
+ var tag;
7172
+ let attributes;
7173
+ return tag = this, attributes = Object.keys(tag.attributes || {}).filter((attributeName)=>"" === tag.attributes[attributeName] || tag.attributes[attributeName]).map((attributeName)=>"true" === tag.attributes[attributeName] ? attributeName : `${attributeName}="${tag.attributes[attributeName]}"`), `<${[
7180
7174
  tag.tagName
7181
7175
  ].concat(attributes).join(" ")}${tag.voidTag && !tag.innerHTML ? "/" : ""}>${tag.innerHTML || ""}${tag.voidTag && !tag.innerHTML ? "" : `</${tag.tagName}>`}`;
7182
7176
  }, renderTagList = function() {
@@ -7193,14 +7187,13 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
7193
7187
  return json;
7194
7188
  }
7195
7189
  this.hooks.compilation.tap("HtmlRspackPlugin", (compilationInstance)=>{
7196
- var compilation1 = compilation = compilationInstance, uid1 = uid, options = c;
7197
- let optionsMap = compilationOptionsMap.get(compilation1) || {};
7198
- optionsMap[uid1] = options, compilationOptionsMap.set(compilation1, optionsMap);
7190
+ var compilation1, uid1, options;
7191
+ let optionsMap;
7192
+ compilation1 = compilation = compilationInstance, uid1 = uid, options = c, (optionsMap = compilationOptionsMap.get(compilation1) || {})[uid1] = options, compilationOptionsMap.set(compilation1, optionsMap);
7199
7193
  }), this.hooks.done.tap("HtmlRspackPlugin", (stats)=>{
7200
- compilation = stats.compilation, hooks_compilationHooksMap.delete(compilation);
7201
- var compilation, compilation1 = stats.compilation, uid1 = uid;
7202
- let optionsMap = compilationOptionsMap.get(compilation1) || {};
7203
- delete optionsMap[uid1], 0 === Object.keys(optionsMap).length ? compilationOptionsMap.delete(compilation1) : compilationOptionsMap.set(compilation1, optionsMap);
7194
+ var compilation, compilation1, uid1;
7195
+ let optionsMap;
7196
+ compilation = stats.compilation, hooks_compilationHooksMap.delete(compilation), compilation1 = stats.compilation, uid1 = uid, optionsMap = compilationOptionsMap.get(compilation1) || {}, delete optionsMap[uid1], 0 === Object.keys(optionsMap).length ? compilationOptionsMap.delete(compilation1) : compilationOptionsMap.set(compilation1, optionsMap);
7204
7197
  });
7205
7198
  let templateContent = c.templateContent;
7206
7199
  if ("function" == typeof templateContent) templateFn = async (data)=>{
@@ -7582,7 +7575,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
7582
7575
  } catch (e) {
7583
7576
  validateError = e;
7584
7577
  }
7585
- let finalOptions = validateError ? {
7578
+ const finalOptions = validateError ? {
7586
7579
  hashFuncNames: [
7587
7580
  "sha384"
7588
7581
  ],
@@ -7660,11 +7653,11 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
7660
7653
  });
7661
7654
  });
7662
7655
  }), "string" == typeof this.options.htmlPlugin && this.options.htmlPlugin !== NATIVE_HTML_PLUGIN) {
7656
+ var htmlPlugin, obj;
7663
7657
  let self = this;
7664
7658
  try {
7665
- var obj, htmlPlugin = require(this.options.htmlPlugin);
7666
- let getHooks = htmlPlugin.getCompilationHooks || htmlPlugin.getHooks;
7667
- "function" == typeof getHooks && compiler.hooks.thisCompilation.tap(SubresourceIntegrityPlugin_PLUGIN_NAME, (compilation)=>{
7659
+ let getHooks;
7660
+ getHooks = (htmlPlugin = require(this.options.htmlPlugin)).getCompilationHooks || htmlPlugin.getHooks, "function" == typeof getHooks && compiler.hooks.thisCompilation.tap(SubresourceIntegrityPlugin_PLUGIN_NAME, (compilation)=>{
7668
7661
  if ("string" == typeof compiler.options.output.chunkLoading && [
7669
7662
  "require",
7670
7663
  "async-node"
@@ -7702,7 +7695,8 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
7702
7695
  include: options?.include,
7703
7696
  exclude: options?.exclude,
7704
7697
  extractComments: function(extractComments) {
7705
- let conditionStr = (condition)=>{
7698
+ var value;
7699
+ let type, conditionStr = (condition)=>{
7706
7700
  if (void 0 === condition || !0 === condition) return "@preserve|@lic|@cc_on|^\\**!";
7707
7701
  if (!1 === condition) throw Error("unreachable");
7708
7702
  return condition.source;
@@ -7716,10 +7710,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
7716
7710
  if (extractComments instanceof RegExp) return {
7717
7711
  condition: extractComments.source
7718
7712
  };
7719
- if (function(value) {
7720
- let type = typeof value;
7721
- return null != value && ("object" === type || "function" === type);
7722
- }(extractComments)) {
7713
+ if (type = typeof (value = extractComments), null != value && ("object" === type || "function" === type)) {
7723
7714
  if (!1 === extractComments.condition) return;
7724
7715
  return {
7725
7716
  condition: conditionStr(extractComments.condition),
@@ -7769,7 +7760,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
7769
7760
  };
7770
7761
  }
7771
7762
  }
7772
- let DELTA_A_TO_Z = 26, NUMBER_OF_IDENTIFIER_START_CHARS = 54, NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS = 64, FUNCTION_CONTENT_REGEX = /^function\s?\(\)\s?\{\r?\n?|\r?\n?\}$/g, INDENT_MULTILINE_REGEX = /^\t/gm, LINE_SEPARATOR_REGEX = /\r?\n/g, IDENTIFIER_NAME_REPLACE_REGEX = /^([^a-zA-Z$_])/, IDENTIFIER_ALPHA_NUMERIC_NAME_REPLACE_REGEX = /[^a-zA-Z0-9$]+/g, COMMENT_END_REGEX = /\*\//g, PATH_NAME_NORMALIZE_REPLACE_REGEX = /[^a-zA-Z0-9_!§$()=\-^°]+/g, MATCH_PADDED_HYPHENS_REPLACE_REGEX = /^-|-$/g;
7763
+ let JSON_MODULE_TYPE = "json", DELTA_A_TO_Z = 26, NUMBER_OF_IDENTIFIER_START_CHARS = 54, NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS = 64, FUNCTION_CONTENT_REGEX = /^function\s?\(\)\s?\{\r?\n?|\r?\n?\}$/g, INDENT_MULTILINE_REGEX = /^\t/gm, LINE_SEPARATOR_REGEX = /\r?\n/g, IDENTIFIER_NAME_REPLACE_REGEX = /^([^a-zA-Z$_])/, IDENTIFIER_ALPHA_NUMERIC_NAME_REPLACE_REGEX = /[^a-zA-Z0-9$]+/g, COMMENT_END_REGEX = /\*\//g, PATH_NAME_NORMALIZE_REPLACE_REGEX = /[^a-zA-Z0-9_!§$()=\-^°]+/g, MATCH_PADDED_HYPHENS_REPLACE_REGEX = /^-|-$/g;
7773
7764
  class Template {
7774
7765
  static getFunctionContent(fn) {
7775
7766
  return fn.toString().replace(FUNCTION_CONTENT_REGEX, "").replace(INDENT_MULTILINE_REGEX, "").replace(LINE_SEPARATOR_REGEX, "\n");
@@ -8668,9 +8659,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8668
8659
  let tty = infrastructureLogging.stream?.isTTY && "dumb" !== process.env.TERM;
8669
8660
  D(infrastructureLogging, "level", "info"), D(infrastructureLogging, "debug", !1), D(infrastructureLogging, "colors", tty), D(infrastructureLogging, "appendOnly", !tty);
8670
8661
  }, applyExperimentsDefaults = (experiments, { development })=>{
8671
- defaults_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), !1 === experiments.topLevelAwait && console.warn("`experiments.topLevelAwait` config has been deprecated and will be removed in Rspack v2.0. Top-level await will be always enabled. Please remove this option from your Rspack configuration."), 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", !0), D(experiments.incremental, "providedExports", !0), D(experiments.incremental, "dependenciesDiagnostics", !0), D(experiments.incremental, "sideEffects", !0), D(experiments.incremental, "buildChunkGraph", !1), D(experiments.incremental, "moduleIds", !0), D(experiments.incremental, "chunkIds", !0), D(experiments.incremental, "modulesHashes", !0), D(experiments.incremental, "modulesCodegen", !0), D(experiments.incremental, "modulesRuntimeRequirements", !0), D(experiments.incremental, "chunksRuntimeRequirements", !0), D(experiments.incremental, "chunksHashes", !0), D(experiments.incremental, "chunksRender", !0), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !1), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !1), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1), D(experiments, "lazyBarrel", !1);
8662
+ defaults_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, "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", !0), D(experiments.incremental, "providedExports", !0), D(experiments.incremental, "dependenciesDiagnostics", !0), D(experiments.incremental, "sideEffects", !0), D(experiments.incremental, "buildChunkGraph", !1), D(experiments.incremental, "moduleIds", !0), D(experiments.incremental, "chunkIds", !0), D(experiments.incremental, "modulesHashes", !0), D(experiments.incremental, "modulesCodegen", !0), D(experiments.incremental, "modulesRuntimeRequirements", !0), D(experiments.incremental, "chunksRuntimeRequirements", !0), D(experiments.incremental, "chunksHashes", !0), D(experiments.incremental, "chunksRender", !0), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !1), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !1), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1), D(experiments, "lazyBarrel", !0);
8672
8663
  }, applybundlerInfoDefaults = (rspackFuture, library)=>{
8673
- "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.5.8"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
8664
+ "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.6.0-beta.0"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
8674
8665
  }, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName, usedExports, inlineConst })=>{
8675
8666
  if (assertNotNill(module.parser), assertNotNill(module.generator), defaults_F(module.parser, "asset", ()=>({})), assertNotNill(module.parser.asset), defaults_F(module.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module.parser.asset.dataUrlCondition && D(module.parser.asset.dataUrlCondition, "maxSize", 8096), defaults_F(module.parser, "javascript", ()=>({})), assertNotNill(module.parser.javascript), ((parserOptions, { usedExports, inlineConst })=>{
8676
8667
  D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "unknownContextCritical", !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, "commonjs", !0), D(parserOptions, "importDynamic", !0), D(parserOptions, "worker", [
@@ -8679,7 +8670,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8679
8670
  })(module.parser.javascript, {
8680
8671
  usedExports,
8681
8672
  inlineConst
8682
- }), defaults_F(module.parser, "json", ()=>({})), assertNotNill(module.parser.json), D(module.parser.json, "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER), defaults_F(module.generator, "json", ()=>({})), assertNotNill(module.generator.json), D(module.generator.json, "JSONParse", !0), css) {
8673
+ }), defaults_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), defaults_F(module.generator, "json", ()=>({})), assertNotNill(module.generator.json), D(module.generator.json, "JSONParse", !0), css) {
8683
8674
  defaults_F(module.parser, "css", ()=>({})), assertNotNill(module.parser.css), D(module.parser.css, "namedExports", !0), D(module.parser.css, "url", !0), defaults_F(module.parser, "css/auto", ()=>({})), assertNotNill(module.parser["css/auto"]), D(module.parser["css/auto"], "namedExports", !0), D(module.parser["css/auto"], "url", !0), defaults_F(module.parser, "css/module", ()=>({})), assertNotNill(module.parser["css/module"]), D(module.parser["css/module"], "namedExports", !0), D(module.parser["css/module"], "url", !0), defaults_F(module.generator, "css", ()=>({})), assertNotNill(module.generator.css), D(module.generator.css, "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator.css, "esModule", !0), defaults_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");
8684
8675
  let localIdentName = uniqueName && uniqueName.length > 0 ? "[uniqueName]-[id]-[local]" : "[id]-[local]";
8685
8676
  D(module.generator["css/auto"], "localIdentName", localIdentName), D(module.generator["css/auto"], "esModule", !0), defaults_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", localIdentName), D(module.generator["css/module"], "esModule", !0);
@@ -8925,7 +8916,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8925
8916
  if (tp.globalThis) return "globalThis";
8926
8917
  }
8927
8918
  return "self";
8928
- }), D(output, "importFunctionName", "import"), D(output, "importMetaName", "import.meta"), defaults_F(output, "clean", ()=>!!output.clean), D(output, "crossOriginLoading", !1), D(output, "workerPublicPath", ""), D(output, "sourceMapFilename", "[file].map[query]"), defaults_F(output, "scriptType", ()=>!!output.module && "module"), D(output, "charset", !futureDefaults), D(output, "chunkLoadTimeout", 120000);
8919
+ }), D(output, "importFunctionName", "import"), D(output, "importMetaName", "import.meta"), defaults_F(output, "clean", ()=>!!output.clean), D(output, "crossOriginLoading", !1), D(output, "workerPublicPath", ""), D(output, "sourceMapFilename", "[file].map[query]"), defaults_F(output, "scriptType", ()=>!!output.module && "module"), D(output, "charset", !1), D(output, "chunkLoadTimeout", 120000);
8929
8920
  let { trustedTypes } = output;
8930
8921
  trustedTypes && (defaults_F(trustedTypes, "policyName", ()=>output.uniqueName.replace(/[^a-zA-Z0-9\-#=_/@.%]+/g, "_") || "webpack"), D(trustedTypes, "onPolicyCreationFailure", "stop"));
8931
8922
  let forEachEntry = (fn)=>{
@@ -9277,7 +9268,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9277
9268
  plugins: nestedArray(config.plugins, (p)=>[
9278
9269
  ...p
9279
9270
  ]),
9280
- experiments: nestedConfig(config.experiments, (experiments)=>({
9271
+ experiments: nestedConfig(config.experiments, (experiments)=>(experiments.layers && external_node_util_default().deprecate(()=>{}, "`experiments.layers` config has been deprecated and will be removed in Rspack v2.0. Feature layers will be always enabled. Please remove this option from your Rspack configuration.")(), !1 === experiments.topLevelAwait && external_node_util_default().deprecate(()=>{}, "`experiments.topLevelAwait` config has been deprecated and will be removed in Rspack v2.0. Top-level await will be always enabled. Please remove this option from your Rspack configuration.")(), {
9281
9272
  ...experiments,
9282
9273
  cache: optionalNestedConfig(experiments.cache, (cache)=>{
9283
9274
  if ("boolean" == typeof cache || "memory" === cache.type) return cache;
@@ -9446,10 +9437,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9446
9437
  throw Error(`${absPath} is neither a posix nor a windows path, and there is no 'dirname' method defined in the file system`);
9447
9438
  })(fs, p);
9448
9439
  return dir === p ? void callback(err) : void mkdirp(fs, dir, (err)=>{
9449
- if (err) return void callback(err);
9450
- fs.mkdir(p, (err)=>{
9451
- if (err) return "EEXIST" === err.code ? void callback() : void callback(err);
9452
- callback();
9440
+ err ? callback(err) : fs.mkdir(p, (err)=>{
9441
+ err ? "EEXIST" === err.code ? callback() : callback(err) : callback();
9453
9442
  });
9454
9443
  });
9455
9444
  }
@@ -9661,8 +9650,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9661
9650
  }
9662
9651
  }
9663
9652
  let makeWebpackErrorCallback = (callback, hook)=>(err, result)=>{
9664
- if (err) return err instanceof WebpackError ? void callback(err) : void callback(new HookWebpackError(err, hook));
9665
- callback(null, result);
9653
+ err ? err instanceof WebpackError ? callback(err) : callback(new HookWebpackError(err, hook)) : callback(null, result);
9666
9654
  };
9667
9655
  class Cache {
9668
9656
  static STAGE_DISK = 10;
@@ -10314,7 +10302,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
10314
10302
  });
10315
10303
  }
10316
10304
  }
10317
- let CORE_VERSION = "1.5.8", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
10305
+ let CORE_VERSION = "1.6.0-beta.0", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
10318
10306
 
10319
10307
  Help:
10320
10308
  Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
@@ -10799,7 +10787,7 @@ Help:
10799
10787
  callback(err, entries, compilation);
10800
10788
  } catch (e) {
10801
10789
  let err = Error(`compiler.runAsChild callback error: ${e}`);
10802
- this.parentCompilation.errors.push(err), console.log(e);
10790
+ this.parentCompilation.errors.push(err);
10803
10791
  }
10804
10792
  };
10805
10793
  this.compile((err, compilation)=>{
@@ -10846,10 +10834,9 @@ Help:
10846
10834
  });
10847
10835
  }
10848
10836
  close(callback) {
10849
- if (this.watching) return void this.watching.close(()=>{
10837
+ this.watching ? this.watching.close(()=>{
10850
10838
  this.close(callback);
10851
- });
10852
- this.hooks.shutdown.callAsync((err)=>{
10839
+ }) : this.hooks.shutdown.callAsync((err)=>{
10853
10840
  if (err) return callback(err);
10854
10841
  this.cache.shutdown(()=>{
10855
10842
  this.#getInstance((error, instance)=>{
@@ -10895,160 +10882,158 @@ Help:
10895
10882
  return this.#compilationParams = params, params;
10896
10883
  }
10897
10884
  #getInstance(callback) {
10898
- let error = CORE_VERSION === binding_default().EXPECTED_RSPACK_CORE_VERSION || CORE_VERSION.includes("canary") ? null : Error(bindingVersionCheck_errorMessage(CORE_VERSION, binding_default().EXPECTED_RSPACK_CORE_VERSION));
10885
+ var options, compiler, output, module, options1, parser, generator, stats;
10886
+ let mode, experiments, error = CORE_VERSION === binding_default().EXPECTED_RSPACK_CORE_VERSION || CORE_VERSION.includes("canary") ? null : Error(bindingVersionCheck_errorMessage(CORE_VERSION, binding_default().EXPECTED_RSPACK_CORE_VERSION));
10899
10887
  if (error) return callback(error);
10900
10888
  if (this.#instance) return callback(null, this.#instance);
10901
- let options = this.options, rawOptions = ((options, compiler)=>{
10902
- var output, module, options1, parser, generator, stats;
10903
- let mode = options.mode, experiments = options.experiments;
10904
- return {
10905
- name: options.name,
10889
+ let options2 = this.options, rawOptions = (options = options2, compiler = this, mode = options.mode, experiments = options.experiments, {
10890
+ name: options.name,
10891
+ mode,
10892
+ context: options.context,
10893
+ output: {
10894
+ ...output = options.output,
10895
+ environment: function(environment = {}) {
10896
+ return {
10897
+ const: !!environment.const,
10898
+ arrowFunction: !!environment.arrowFunction,
10899
+ nodePrefixForCoreModules: !!environment.nodePrefixForCoreModules,
10900
+ asyncFunction: !!environment.asyncFunction,
10901
+ bigIntLiteral: !!environment.bigIntLiteral,
10902
+ destructuring: !!environment.destructuring,
10903
+ document: !!environment.document,
10904
+ dynamicImport: !!environment.dynamicImport,
10905
+ forOf: !!environment.forOf,
10906
+ globalThis: !!environment.globalThis,
10907
+ module: !!environment.module,
10908
+ optionalChaining: !!environment.optionalChaining,
10909
+ templateLiteral: !!environment.templateLiteral
10910
+ };
10911
+ }(output.environment)
10912
+ },
10913
+ resolve: getRawResolve(options.resolve),
10914
+ resolveLoader: getRawResolve(options.resolveLoader),
10915
+ module: (module = options.module, options1 = {
10916
+ compiler,
10906
10917
  mode,
10907
10918
  context: options.context,
10908
- output: {
10909
- ...output = options.output,
10910
- environment: function(environment = {}) {
10911
- return {
10912
- const: !!environment.const,
10913
- arrowFunction: !!environment.arrowFunction,
10914
- nodePrefixForCoreModules: !!environment.nodePrefixForCoreModules,
10915
- asyncFunction: !!environment.asyncFunction,
10916
- bigIntLiteral: !!environment.bigIntLiteral,
10917
- destructuring: !!environment.destructuring,
10918
- document: !!environment.document,
10919
- dynamicImport: !!environment.dynamicImport,
10920
- forOf: !!environment.forOf,
10921
- globalThis: !!environment.globalThis,
10922
- module: !!environment.module,
10923
- optionalChaining: !!environment.optionalChaining,
10924
- templateLiteral: !!environment.templateLiteral
10925
- };
10926
- }(output.environment)
10927
- },
10928
- resolve: getRawResolve(options.resolve),
10929
- resolveLoader: getRawResolve(options.resolveLoader),
10930
- module: (module = options.module, options1 = {
10931
- compiler,
10932
- mode,
10933
- context: options.context,
10934
- experiments
10935
- }, external_node_assert_default()(!isNil(module.defaultRules), "module.defaultRules should not be nil after defaults"), {
10936
- rules: [
10937
- {
10938
- rules: module.defaultRules
10939
- },
10940
- {
10941
- rules: module.rules
10942
- }
10943
- ].map((rule, index)=>getRawModuleRule(rule, `ruleSet[${index}]`, options1, "javascript/auto")),
10944
- parser: Object.fromEntries(Object.entries(parser = module.parser).map(([k, v])=>[
10945
- k,
10946
- getRawParserOptions(v, k)
10947
- ]).filter(([k, v])=>void 0 !== v)),
10948
- generator: Object.fromEntries(Object.entries(generator = module.generator).map(([k, v])=>[
10949
- k,
10950
- getRawGeneratorOptions(v, k)
10951
- ]).filter(([k, v])=>void 0 !== v)),
10952
- noParse: module.noParse
10953
- }),
10954
- optimization: options.optimization,
10955
- stats: {
10956
- colors: function(options) {
10957
- if ("boolean" == typeof options || "string" == typeof options) return presetToOptions(options);
10958
- if (!options) return {};
10959
- let obj = {
10960
- ...presetToOptions(options.preset),
10961
- ...options
10962
- };
10963
- return delete obj.preset, obj;
10964
- }(stats = options.stats).colors ?? !1
10965
- },
10966
- cache: {
10967
- type: options.cache ? "memory" : "disable"
10968
- },
10969
- experiments,
10970
- node: function(node) {
10971
- if (!1 !== node) return external_node_assert_default()(!isNil(node.__dirname) && !isNil(node.global) && !isNil(node.__filename)), {
10972
- dirname: String(node.__dirname),
10973
- filename: String(node.__filename),
10974
- global: String(node.global)
10919
+ experiments
10920
+ }, external_node_assert_default()(!isNil(module.defaultRules), "module.defaultRules should not be nil after defaults"), {
10921
+ rules: [
10922
+ {
10923
+ rules: module.defaultRules
10924
+ },
10925
+ {
10926
+ rules: module.rules
10927
+ }
10928
+ ].map((rule, index)=>getRawModuleRule(rule, `ruleSet[${index}]`, options1, "javascript/auto")),
10929
+ parser: Object.fromEntries(Object.entries(parser = module.parser).map(([k, v])=>[
10930
+ k,
10931
+ getRawParserOptions(v, k)
10932
+ ]).filter(([k, v])=>void 0 !== v)),
10933
+ generator: Object.fromEntries(Object.entries(generator = module.generator).map(([k, v])=>[
10934
+ k,
10935
+ getRawGeneratorOptions(v, k)
10936
+ ]).filter(([k, v])=>void 0 !== v)),
10937
+ noParse: module.noParse
10938
+ }),
10939
+ optimization: options.optimization,
10940
+ stats: {
10941
+ colors: !!function(options) {
10942
+ if ("boolean" == typeof options || "string" == typeof options) return presetToOptions(options);
10943
+ if (!options) return {};
10944
+ let obj = {
10945
+ ...presetToOptions(options.preset),
10946
+ ...options
10975
10947
  };
10976
- }(options.node),
10977
- profile: options.profile,
10978
- amd: options.amd ? JSON.stringify(options.amd || {}) : void 0,
10979
- bail: options.bail,
10980
- __references: {}
10981
- };
10982
- })(options, this);
10948
+ return delete obj.preset, obj;
10949
+ }(stats = options.stats).colors
10950
+ },
10951
+ cache: {
10952
+ type: options.cache ? "memory" : "disable"
10953
+ },
10954
+ experiments,
10955
+ node: function(node) {
10956
+ if (!1 !== node) return external_node_assert_default()(!isNil(node.__dirname) && !isNil(node.global) && !isNil(node.__filename)), {
10957
+ dirname: String(node.__dirname),
10958
+ filename: String(node.__filename),
10959
+ global: String(node.global)
10960
+ };
10961
+ }(options.node),
10962
+ profile: options.profile,
10963
+ amd: options.amd ? JSON.stringify(options.amd || {}) : void 0,
10964
+ bail: options.bail,
10965
+ __references: {}
10966
+ });
10983
10967
  rawOptions.__references = Object.fromEntries(this.#ruleSet.builtinReferences.entries()), rawOptions.__virtual_files = VirtualModulesPlugin.__internal__take_virtual_files(this);
10984
10968
  let instanceBinding = __webpack_require__("@rspack/binding");
10985
10969
  this.#registers = this.#createHooksRegisters();
10986
- let inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
10970
+ let inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options2.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
10987
10971
  this.#instance = new instanceBinding.JsCompiler(this.compilerPath, rawOptions, this.#builtinPlugins, this.#registers, ThreadsafeOutputNodeFS.__to_binding(this.outputFileSystem), this.intermediateFileSystem ? ThreadsafeIntermediateNodeFS.__to_binding(this.intermediateFileSystem) : void 0, inputFileSystem, ResolverFactory.__to_binding(this.resolverFactory)), callback(null, this.#instance);
10988
10972
  }
10989
10973
  #createHooksRegisters() {
10990
- let getCompiler, createTap, getCompiler1, createTap1, createMapTap, getCompiler2, createTap2, createMapTap1, getCompiler3, createTap3, getCompiler4, getCompiler5, createTap4, getCompiler6, createTap5, ref = new WeakRef(this), getCompiler7 = ()=>ref.deref(), createTap6 = this.#createHookRegisterTaps.bind(this), createMapTap2 = this.#createHookMapRegisterTaps.bind(this);
10974
+ var getCompiler, createTap;
10975
+ let getCompiler1, createTap1, getCompiler2, createTap2, createMapTap, getCompiler3, createTap3, createMapTap1, getCompiler4, createTap4, getCompiler5, getOptions, getCompiler6, createTap5, getCompiler7, createTap6, ref = new WeakRef(this), getCompiler8 = ()=>ref.deref(), createTap7 = this.#createHookRegisterTaps.bind(this), createMapTap2 = this.#createHookMapRegisterTaps.bind(this);
10991
10976
  return {
10992
- ...(getCompiler = getCompiler7, {
10993
- registerCompilerThisCompilationTaps: (createTap = createTap6)(binding_default().RegisterJsTapKind.CompilerThisCompilation, function() {
10994
- return getCompiler().hooks.thisCompilation;
10977
+ ...(getCompiler1 = getCompiler8, {
10978
+ registerCompilerThisCompilationTaps: (createTap1 = createTap7)(binding_default().RegisterJsTapKind.CompilerThisCompilation, function() {
10979
+ return getCompiler1().hooks.thisCompilation;
10995
10980
  }, function(queried) {
10996
10981
  return function(native) {
10997
- return getCompiler().__internal__create_compilation(native), queried.call(getCompiler().__internal__get_compilation(), getCompiler().__internal__get_compilation_params());
10982
+ return getCompiler1().__internal__create_compilation(native), queried.call(getCompiler1().__internal__get_compilation(), getCompiler1().__internal__get_compilation_params());
10998
10983
  };
10999
10984
  }),
11000
- registerCompilerCompilationTaps: createTap(binding_default().RegisterJsTapKind.CompilerCompilation, function() {
11001
- return getCompiler().hooks.compilation;
10985
+ registerCompilerCompilationTaps: createTap1(binding_default().RegisterJsTapKind.CompilerCompilation, function() {
10986
+ return getCompiler1().hooks.compilation;
11002
10987
  }, function(queried) {
11003
10988
  return function() {
11004
- return queried.call(getCompiler().__internal__get_compilation(), getCompiler().__internal__get_compilation_params());
10989
+ return queried.call(getCompiler1().__internal__get_compilation(), getCompiler1().__internal__get_compilation_params());
11005
10990
  };
11006
10991
  }),
11007
- registerCompilerMakeTaps: createTap(binding_default().RegisterJsTapKind.CompilerMake, function() {
11008
- return getCompiler().hooks.make;
10992
+ registerCompilerMakeTaps: createTap1(binding_default().RegisterJsTapKind.CompilerMake, function() {
10993
+ return getCompiler1().hooks.make;
11009
10994
  }, function(queried) {
11010
10995
  return async function() {
11011
- return await queried.promise(getCompiler().__internal__get_compilation());
10996
+ return await queried.promise(getCompiler1().__internal__get_compilation());
11012
10997
  };
11013
10998
  }),
11014
- registerCompilerFinishMakeTaps: createTap(binding_default().RegisterJsTapKind.CompilerFinishMake, function() {
11015
- return getCompiler().hooks.finishMake;
10999
+ registerCompilerFinishMakeTaps: createTap1(binding_default().RegisterJsTapKind.CompilerFinishMake, function() {
11000
+ return getCompiler1().hooks.finishMake;
11016
11001
  }, function(queried) {
11017
11002
  return async function() {
11018
- return await queried.promise(getCompiler().__internal__get_compilation());
11003
+ return await queried.promise(getCompiler1().__internal__get_compilation());
11019
11004
  };
11020
11005
  }),
11021
- registerCompilerShouldEmitTaps: createTap(binding_default().RegisterJsTapKind.CompilerShouldEmit, function() {
11022
- return getCompiler().hooks.shouldEmit;
11006
+ registerCompilerShouldEmitTaps: createTap1(binding_default().RegisterJsTapKind.CompilerShouldEmit, function() {
11007
+ return getCompiler1().hooks.shouldEmit;
11023
11008
  }, function(queried) {
11024
11009
  return function() {
11025
- return queried.call(getCompiler().__internal__get_compilation());
11010
+ return queried.call(getCompiler1().__internal__get_compilation());
11026
11011
  };
11027
11012
  }),
11028
- registerCompilerEmitTaps: createTap(binding_default().RegisterJsTapKind.CompilerEmit, function() {
11029
- return getCompiler().hooks.emit;
11013
+ registerCompilerEmitTaps: createTap1(binding_default().RegisterJsTapKind.CompilerEmit, function() {
11014
+ return getCompiler1().hooks.emit;
11030
11015
  }, function(queried) {
11031
11016
  return async function() {
11032
- return await queried.promise(getCompiler().__internal__get_compilation());
11017
+ return await queried.promise(getCompiler1().__internal__get_compilation());
11033
11018
  };
11034
11019
  }),
11035
- registerCompilerAfterEmitTaps: createTap(binding_default().RegisterJsTapKind.CompilerAfterEmit, function() {
11036
- return getCompiler().hooks.afterEmit;
11020
+ registerCompilerAfterEmitTaps: createTap1(binding_default().RegisterJsTapKind.CompilerAfterEmit, function() {
11021
+ return getCompiler1().hooks.afterEmit;
11037
11022
  }, function(queried) {
11038
11023
  return async function() {
11039
- return await queried.promise(getCompiler().__internal__get_compilation());
11024
+ return await queried.promise(getCompiler1().__internal__get_compilation());
11040
11025
  };
11041
11026
  }),
11042
- registerCompilerAssetEmittedTaps: createTap(binding_default().RegisterJsTapKind.CompilerAssetEmitted, function() {
11043
- return getCompiler().hooks.assetEmitted;
11027
+ registerCompilerAssetEmittedTaps: createTap1(binding_default().RegisterJsTapKind.CompilerAssetEmitted, function() {
11028
+ return getCompiler1().hooks.assetEmitted;
11044
11029
  }, function(queried) {
11045
11030
  return async function({ filename, targetPath, outputPath }) {
11046
11031
  return queried.promise(filename, {
11047
- compilation: getCompiler().__internal__get_compilation(),
11032
+ compilation: getCompiler1().__internal__get_compilation(),
11048
11033
  targetPath,
11049
11034
  outputPath,
11050
11035
  get source () {
11051
- return getCompiler().__internal__get_compilation().getAsset(filename)?.source;
11036
+ return getCompiler1().__internal__get_compilation().getAsset(filename)?.source;
11052
11037
  },
11053
11038
  get content () {
11054
11039
  return this.source?.buffer();
@@ -11057,9 +11042,9 @@ Help:
11057
11042
  };
11058
11043
  })
11059
11044
  }),
11060
- ...(getCompiler1 = getCompiler7, createTap1 = createTap6, createMapTap = createMapTap2, {
11061
- registerCompilationAdditionalTreeRuntimeRequirementsTaps: createTap1(binding_default().RegisterJsTapKind.CompilationAdditionalTreeRuntimeRequirements, function() {
11062
- return getCompiler1().__internal__get_compilation().hooks.additionalTreeRuntimeRequirements;
11045
+ ...(getCompiler2 = getCompiler8, createTap2 = createTap7, createMapTap = createMapTap2, {
11046
+ registerCompilationAdditionalTreeRuntimeRequirementsTaps: createTap2(binding_default().RegisterJsTapKind.CompilationAdditionalTreeRuntimeRequirements, function() {
11047
+ return getCompiler2().__internal__get_compilation().hooks.additionalTreeRuntimeRequirements;
11063
11048
  }, function(queried) {
11064
11049
  return function({ chunk, runtimeRequirements }) {
11065
11050
  let set = __from_binding_runtime_globals(runtimeRequirements);
@@ -11069,7 +11054,7 @@ Help:
11069
11054
  };
11070
11055
  }),
11071
11056
  registerCompilationRuntimeRequirementInTreeTaps: createMapTap(binding_default().RegisterJsTapKind.CompilationRuntimeRequirementInTree, function() {
11072
- return getCompiler1().__internal__get_compilation().hooks.runtimeRequirementInTree;
11057
+ return getCompiler2().__internal__get_compilation().hooks.runtimeRequirementInTree;
11073
11058
  }, function(queried) {
11074
11059
  return function({ chunk, allRuntimeRequirements, runtimeRequirements }) {
11075
11060
  let set = __from_binding_runtime_globals(runtimeRequirements), all = __from_binding_runtime_globals(allRuntimeRequirements), customRuntimeGlobals = new Set(), originalAdd = all.add.bind(all), add = function(r) {
@@ -11083,8 +11068,8 @@ Help:
11083
11068
  };
11084
11069
  };
11085
11070
  }),
11086
- registerCompilationRuntimeModuleTaps: createTap1(binding_default().RegisterJsTapKind.CompilationRuntimeModule, function() {
11087
- return getCompiler1().__internal__get_compilation().hooks.runtimeModule;
11071
+ registerCompilationRuntimeModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationRuntimeModule, function() {
11072
+ return getCompiler2().__internal__get_compilation().hooks.runtimeModule;
11088
11073
  }, function(queried) {
11089
11074
  return function({ module, chunk }) {
11090
11075
  let originSource = module.source?.source;
@@ -11093,29 +11078,29 @@ Help:
11093
11078
  if (newSource && newSource !== originSource) return module;
11094
11079
  };
11095
11080
  }),
11096
- registerCompilationBuildModuleTaps: createTap1(binding_default().RegisterJsTapKind.CompilationBuildModule, function() {
11097
- return getCompiler1().__internal__get_compilation().hooks.buildModule;
11081
+ registerCompilationBuildModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationBuildModule, function() {
11082
+ return getCompiler2().__internal__get_compilation().hooks.buildModule;
11098
11083
  }, function(queried) {
11099
11084
  return function(module) {
11100
11085
  return queried.call(module);
11101
11086
  };
11102
11087
  }),
11103
- registerCompilationStillValidModuleTaps: createTap1(binding_default().RegisterJsTapKind.CompilationStillValidModule, function() {
11104
- return getCompiler1().__internal__get_compilation().hooks.stillValidModule;
11088
+ registerCompilationStillValidModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationStillValidModule, function() {
11089
+ return getCompiler2().__internal__get_compilation().hooks.stillValidModule;
11105
11090
  }, function(queried) {
11106
11091
  return function(module) {
11107
11092
  return queried.call(module);
11108
11093
  };
11109
11094
  }),
11110
- registerCompilationSucceedModuleTaps: createTap1(binding_default().RegisterJsTapKind.CompilationSucceedModule, function() {
11111
- return getCompiler1().__internal__get_compilation().hooks.succeedModule;
11095
+ registerCompilationSucceedModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationSucceedModule, function() {
11096
+ return getCompiler2().__internal__get_compilation().hooks.succeedModule;
11112
11097
  }, function(queried) {
11113
11098
  return function(module) {
11114
11099
  return queried.call(module);
11115
11100
  };
11116
11101
  }),
11117
- registerCompilationExecuteModuleTaps: createTap1(binding_default().RegisterJsTapKind.CompilationExecuteModule, function() {
11118
- return getCompiler1().__internal__get_compilation().hooks.executeModule;
11102
+ registerCompilationExecuteModuleTaps: createTap2(binding_default().RegisterJsTapKind.CompilationExecuteModule, function() {
11103
+ return getCompiler2().__internal__get_compilation().hooks.executeModule;
11119
11104
  }, function(queried) {
11120
11105
  return function({ entry, id, codegenResults, runtimeModules }) {
11121
11106
  try {
@@ -11153,96 +11138,96 @@ Help:
11153
11138
  }, moduleCache = __nested_webpack_require_4781_4800__[RuntimeGlobals.moduleCache.replace(`${RuntimeGlobals.require}.`, "")] = {}, interceptModuleExecution = __nested_webpack_require_4781_4800__[RuntimeGlobals.interceptModuleExecution.replace(`${RuntimeGlobals.require}.`, "")] = [];
11154
11139
  for (let runtimeModule of runtimeModules)__nested_webpack_require_4781_4800__(runtimeModule);
11155
11140
  let executeResult = __nested_webpack_require_4781_4800__(entry);
11156
- getCompiler1().__internal__get_module_execution_results_map().set(id, executeResult);
11141
+ getCompiler2().__internal__get_module_execution_results_map().set(id, executeResult);
11157
11142
  } catch (e) {
11158
- throw getCompiler1().__internal__get_module_execution_results_map().set(id, e), e;
11143
+ throw getCompiler2().__internal__get_module_execution_results_map().set(id, e), e;
11159
11144
  }
11160
11145
  };
11161
11146
  }),
11162
- registerCompilationFinishModulesTaps: createTap1(binding_default().RegisterJsTapKind.CompilationFinishModules, function() {
11163
- return getCompiler1().__internal__get_compilation().hooks.finishModules;
11147
+ registerCompilationFinishModulesTaps: createTap2(binding_default().RegisterJsTapKind.CompilationFinishModules, function() {
11148
+ return getCompiler2().__internal__get_compilation().hooks.finishModules;
11164
11149
  }, function(queried) {
11165
11150
  return async function() {
11166
- return await queried.promise(getCompiler1().__internal__get_compilation().modules);
11151
+ return await queried.promise(getCompiler2().__internal__get_compilation().modules);
11167
11152
  };
11168
11153
  }),
11169
- registerCompilationOptimizeModulesTaps: createTap1(binding_default().RegisterJsTapKind.CompilationOptimizeModules, function() {
11170
- return getCompiler1().__internal__get_compilation().hooks.optimizeModules;
11154
+ registerCompilationOptimizeModulesTaps: createTap2(binding_default().RegisterJsTapKind.CompilationOptimizeModules, function() {
11155
+ return getCompiler2().__internal__get_compilation().hooks.optimizeModules;
11171
11156
  }, function(queried) {
11172
11157
  return function() {
11173
- return queried.call(getCompiler1().__internal__get_compilation().modules.values());
11158
+ return queried.call(getCompiler2().__internal__get_compilation().modules.values());
11174
11159
  };
11175
11160
  }),
11176
- registerCompilationAfterOptimizeModulesTaps: createTap1(binding_default().RegisterJsTapKind.CompilationAfterOptimizeModules, function() {
11177
- return getCompiler1().__internal__get_compilation().hooks.afterOptimizeModules;
11161
+ registerCompilationAfterOptimizeModulesTaps: createTap2(binding_default().RegisterJsTapKind.CompilationAfterOptimizeModules, function() {
11162
+ return getCompiler2().__internal__get_compilation().hooks.afterOptimizeModules;
11178
11163
  }, function(queried) {
11179
11164
  return function() {
11180
- queried.call(getCompiler1().__internal__get_compilation().modules.values());
11165
+ queried.call(getCompiler2().__internal__get_compilation().modules.values());
11181
11166
  };
11182
11167
  }),
11183
- registerCompilationOptimizeTreeTaps: createTap1(binding_default().RegisterJsTapKind.CompilationOptimizeTree, function() {
11184
- return getCompiler1().__internal__get_compilation().hooks.optimizeTree;
11168
+ registerCompilationOptimizeTreeTaps: createTap2(binding_default().RegisterJsTapKind.CompilationOptimizeTree, function() {
11169
+ return getCompiler2().__internal__get_compilation().hooks.optimizeTree;
11185
11170
  }, function(queried) {
11186
11171
  return async function() {
11187
- return await queried.promise(getCompiler1().__internal__get_compilation().chunks, getCompiler1().__internal__get_compilation().modules);
11172
+ return await queried.promise(getCompiler2().__internal__get_compilation().chunks, getCompiler2().__internal__get_compilation().modules);
11188
11173
  };
11189
11174
  }),
11190
- registerCompilationOptimizeChunkModulesTaps: createTap1(binding_default().RegisterJsTapKind.CompilationOptimizeChunkModules, function() {
11191
- return getCompiler1().__internal__get_compilation().hooks.optimizeChunkModules;
11175
+ registerCompilationOptimizeChunkModulesTaps: createTap2(binding_default().RegisterJsTapKind.CompilationOptimizeChunkModules, function() {
11176
+ return getCompiler2().__internal__get_compilation().hooks.optimizeChunkModules;
11192
11177
  }, function(queried) {
11193
11178
  return async function() {
11194
- return await queried.promise(getCompiler1().__internal__get_compilation().chunks, getCompiler1().__internal__get_compilation().modules);
11179
+ return await queried.promise(getCompiler2().__internal__get_compilation().chunks, getCompiler2().__internal__get_compilation().modules);
11195
11180
  };
11196
11181
  }),
11197
- registerCompilationChunkHashTaps: createTap1(binding_default().RegisterJsTapKind.CompilationChunkHash, function() {
11198
- return getCompiler1().__internal__get_compilation().hooks.chunkHash;
11182
+ registerCompilationChunkHashTaps: createTap2(binding_default().RegisterJsTapKind.CompilationChunkHash, function() {
11183
+ return getCompiler2().__internal__get_compilation().hooks.chunkHash;
11199
11184
  }, function(queried) {
11200
11185
  return function(chunk) {
11201
11186
  let digestResult;
11202
- if (!getCompiler1().options.output.hashFunction) throw Error("'output.hashFunction' cannot be undefined");
11203
- let hash = createHash(getCompiler1().options.output.hashFunction);
11204
- return queried.call(chunk, hash), "string" == typeof (digestResult = getCompiler1().options.output.hashDigest ? hash.digest(getCompiler1().options.output.hashDigest) : hash.digest()) ? Buffer.from(digestResult) : digestResult;
11187
+ if (!getCompiler2().options.output.hashFunction) throw Error("'output.hashFunction' cannot be undefined");
11188
+ let hash = createHash(getCompiler2().options.output.hashFunction);
11189
+ return queried.call(chunk, hash), "string" == typeof (digestResult = getCompiler2().options.output.hashDigest ? hash.digest(getCompiler2().options.output.hashDigest) : hash.digest()) ? Buffer.from(digestResult) : digestResult;
11205
11190
  };
11206
11191
  }),
11207
- registerCompilationChunkAssetTaps: createTap1(binding_default().RegisterJsTapKind.CompilationChunkAsset, function() {
11208
- return getCompiler1().__internal__get_compilation().hooks.chunkAsset;
11192
+ registerCompilationChunkAssetTaps: createTap2(binding_default().RegisterJsTapKind.CompilationChunkAsset, function() {
11193
+ return getCompiler2().__internal__get_compilation().hooks.chunkAsset;
11209
11194
  }, function(queried) {
11210
11195
  return function({ chunk, filename }) {
11211
11196
  return queried.call(chunk, filename);
11212
11197
  };
11213
11198
  }),
11214
- registerCompilationProcessAssetsTaps: createTap1(binding_default().RegisterJsTapKind.CompilationProcessAssets, function() {
11215
- return getCompiler1().__internal__get_compilation().hooks.processAssets;
11199
+ registerCompilationProcessAssetsTaps: createTap2(binding_default().RegisterJsTapKind.CompilationProcessAssets, function() {
11200
+ return getCompiler2().__internal__get_compilation().hooks.processAssets;
11216
11201
  }, function(queried) {
11217
11202
  return async function() {
11218
- return await queried.promise(getCompiler1().__internal__get_compilation().assets);
11203
+ return await queried.promise(getCompiler2().__internal__get_compilation().assets);
11219
11204
  };
11220
11205
  }),
11221
- registerCompilationAfterProcessAssetsTaps: createTap1(binding_default().RegisterJsTapKind.CompilationAfterProcessAssets, function() {
11222
- return getCompiler1().__internal__get_compilation().hooks.afterProcessAssets;
11206
+ registerCompilationAfterProcessAssetsTaps: createTap2(binding_default().RegisterJsTapKind.CompilationAfterProcessAssets, function() {
11207
+ return getCompiler2().__internal__get_compilation().hooks.afterProcessAssets;
11223
11208
  }, function(queried) {
11224
11209
  return function() {
11225
- return queried.call(getCompiler1().__internal__get_compilation().assets);
11210
+ return queried.call(getCompiler2().__internal__get_compilation().assets);
11226
11211
  };
11227
11212
  }),
11228
- registerCompilationSealTaps: createTap1(binding_default().RegisterJsTapKind.CompilationSeal, function() {
11229
- return getCompiler1().__internal__get_compilation().hooks.seal;
11213
+ registerCompilationSealTaps: createTap2(binding_default().RegisterJsTapKind.CompilationSeal, function() {
11214
+ return getCompiler2().__internal__get_compilation().hooks.seal;
11230
11215
  }, function(queried) {
11231
11216
  return function() {
11232
11217
  return queried.call();
11233
11218
  };
11234
11219
  }),
11235
- registerCompilationAfterSealTaps: createTap1(binding_default().RegisterJsTapKind.CompilationAfterSeal, function() {
11236
- return getCompiler1().__internal__get_compilation().hooks.afterSeal;
11220
+ registerCompilationAfterSealTaps: createTap2(binding_default().RegisterJsTapKind.CompilationAfterSeal, function() {
11221
+ return getCompiler2().__internal__get_compilation().hooks.afterSeal;
11237
11222
  }, function(queried) {
11238
11223
  return async function() {
11239
11224
  return await queried.promise();
11240
11225
  };
11241
11226
  })
11242
11227
  }),
11243
- ...(getCompiler2 = getCompiler7, createTap2 = createTap6, createMapTap1 = createMapTap2, {
11244
- registerNormalModuleFactoryBeforeResolveTaps: createTap2(binding_default().RegisterJsTapKind.NormalModuleFactoryBeforeResolve, function() {
11245
- return getCompiler2().__internal__get_compilation_params().normalModuleFactory.hooks.beforeResolve;
11228
+ ...(getCompiler3 = getCompiler8, createTap3 = createTap7, createMapTap1 = createMapTap2, {
11229
+ registerNormalModuleFactoryBeforeResolveTaps: createTap3(binding_default().RegisterJsTapKind.NormalModuleFactoryBeforeResolve, function() {
11230
+ return getCompiler3().__internal__get_compilation_params().normalModuleFactory.hooks.beforeResolve;
11246
11231
  }, function(queried) {
11247
11232
  return async function(resolveData) {
11248
11233
  return [
@@ -11251,22 +11236,22 @@ Help:
11251
11236
  ];
11252
11237
  };
11253
11238
  }),
11254
- registerNormalModuleFactoryFactorizeTaps: createTap2(binding_default().RegisterJsTapKind.NormalModuleFactoryFactorize, function() {
11255
- return getCompiler2().__internal__get_compilation_params().normalModuleFactory.hooks.factorize;
11239
+ registerNormalModuleFactoryFactorizeTaps: createTap3(binding_default().RegisterJsTapKind.NormalModuleFactoryFactorize, function() {
11240
+ return getCompiler3().__internal__get_compilation_params().normalModuleFactory.hooks.factorize;
11256
11241
  }, function(queried) {
11257
11242
  return async function(resolveData) {
11258
11243
  return await queried.promise(resolveData), resolveData;
11259
11244
  };
11260
11245
  }),
11261
- registerNormalModuleFactoryResolveTaps: createTap2(binding_default().RegisterJsTapKind.NormalModuleFactoryResolve, function() {
11262
- return getCompiler2().__internal__get_compilation_params().normalModuleFactory.hooks.resolve;
11246
+ registerNormalModuleFactoryResolveTaps: createTap3(binding_default().RegisterJsTapKind.NormalModuleFactoryResolve, function() {
11247
+ return getCompiler3().__internal__get_compilation_params().normalModuleFactory.hooks.resolve;
11263
11248
  }, function(queried) {
11264
11249
  return async function(resolveData) {
11265
11250
  return await queried.promise(resolveData), resolveData;
11266
11251
  };
11267
11252
  }),
11268
11253
  registerNormalModuleFactoryResolveForSchemeTaps: createMapTap1(binding_default().RegisterJsTapKind.NormalModuleFactoryResolveForScheme, function() {
11269
- return getCompiler2().__internal__get_compilation_params().normalModuleFactory.hooks.resolveForScheme;
11254
+ return getCompiler3().__internal__get_compilation_params().normalModuleFactory.hooks.resolveForScheme;
11270
11255
  }, function(queried) {
11271
11256
  return async function(args) {
11272
11257
  return [
@@ -11275,8 +11260,8 @@ Help:
11275
11260
  ];
11276
11261
  };
11277
11262
  }),
11278
- registerNormalModuleFactoryAfterResolveTaps: createTap2(binding_default().RegisterJsTapKind.NormalModuleFactoryAfterResolve, function() {
11279
- return getCompiler2().__internal__get_compilation_params().normalModuleFactory.hooks.afterResolve;
11263
+ registerNormalModuleFactoryAfterResolveTaps: createTap3(binding_default().RegisterJsTapKind.NormalModuleFactoryAfterResolve, function() {
11264
+ return getCompiler3().__internal__get_compilation_params().normalModuleFactory.hooks.afterResolve;
11280
11265
  }, function(queried) {
11281
11266
  return async function(resolveData) {
11282
11267
  return [
@@ -11285,8 +11270,8 @@ Help:
11285
11270
  ];
11286
11271
  };
11287
11272
  }),
11288
- registerNormalModuleFactoryCreateModuleTaps: createTap2(binding_default().RegisterJsTapKind.NormalModuleFactoryCreateModule, function() {
11289
- return getCompiler2().__internal__get_compilation_params().normalModuleFactory.hooks.createModule;
11273
+ registerNormalModuleFactoryCreateModuleTaps: createTap3(binding_default().RegisterJsTapKind.NormalModuleFactoryCreateModule, function() {
11274
+ return getCompiler3().__internal__get_compilation_params().normalModuleFactory.hooks.createModule;
11290
11275
  }, function(queried) {
11291
11276
  return async function(args) {
11292
11277
  let data = {
@@ -11297,17 +11282,17 @@ Help:
11297
11282
  };
11298
11283
  })
11299
11284
  }),
11300
- ...(getCompiler3 = getCompiler7, {
11301
- registerContextModuleFactoryBeforeResolveTaps: (createTap3 = createTap6)(binding_default().RegisterJsTapKind.ContextModuleFactoryBeforeResolve, function() {
11302
- return getCompiler3().__internal__get_compilation_params().contextModuleFactory.hooks.beforeResolve;
11285
+ ...(getCompiler4 = getCompiler8, {
11286
+ registerContextModuleFactoryBeforeResolveTaps: (createTap4 = createTap7)(binding_default().RegisterJsTapKind.ContextModuleFactoryBeforeResolve, function() {
11287
+ return getCompiler4().__internal__get_compilation_params().contextModuleFactory.hooks.beforeResolve;
11303
11288
  }, function(queried) {
11304
11289
  return async function(bindingData) {
11305
11290
  let data = !!bindingData && ContextModuleFactoryBeforeResolveData.__from_binding(bindingData), result = await queried.promise(data);
11306
11291
  return !!result && ContextModuleFactoryBeforeResolveData.__to_binding(result);
11307
11292
  };
11308
11293
  }),
11309
- registerContextModuleFactoryAfterResolveTaps: createTap3(binding_default().RegisterJsTapKind.ContextModuleFactoryAfterResolve, function() {
11310
- return getCompiler3().__internal__get_compilation_params().contextModuleFactory.hooks.afterResolve;
11294
+ registerContextModuleFactoryAfterResolveTaps: createTap4(binding_default().RegisterJsTapKind.ContextModuleFactoryAfterResolve, function() {
11295
+ return getCompiler4().__internal__get_compilation_params().contextModuleFactory.hooks.afterResolve;
11311
11296
  }, function(queried) {
11312
11297
  return async function(bindingData) {
11313
11298
  let data = !!bindingData && ContextModuleFactoryAfterResolveData.__from_binding(bindingData), result = await queried.promise(data);
@@ -11315,158 +11300,155 @@ Help:
11315
11300
  };
11316
11301
  })
11317
11302
  }),
11318
- ...(getCompiler4 = getCompiler7, {
11319
- registerJavascriptModulesChunkHashTaps: createTap6(binding_default().RegisterJsTapKind.JavascriptModulesChunkHash, function() {
11320
- return JavascriptModulesPlugin.getCompilationHooks(getCompiler4().__internal__get_compilation()).chunkHash;
11303
+ ...(getCompiler5 = getCompiler8, {
11304
+ registerJavascriptModulesChunkHashTaps: createTap7(binding_default().RegisterJsTapKind.JavascriptModulesChunkHash, function() {
11305
+ return JavascriptModulesPlugin.getCompilationHooks(getCompiler5().__internal__get_compilation()).chunkHash;
11321
11306
  }, function(queried) {
11322
11307
  return function(chunk) {
11323
11308
  let digestResult;
11324
- if (!getCompiler4().options.output.hashFunction) throw Error("'output.hashFunction' cannot be undefined");
11325
- let hash = createHash(getCompiler4().options.output.hashFunction);
11326
- return queried.call(chunk, hash), "string" == typeof (digestResult = getCompiler4().options.output.hashDigest ? hash.digest(getCompiler4().options.output.hashDigest) : hash.digest()) ? Buffer.from(digestResult) : digestResult;
11309
+ if (!getCompiler5().options.output.hashFunction) throw Error("'output.hashFunction' cannot be undefined");
11310
+ let hash = createHash(getCompiler5().options.output.hashFunction);
11311
+ return queried.call(chunk, hash), "string" == typeof (digestResult = getCompiler5().options.output.hashDigest ? hash.digest(getCompiler5().options.output.hashDigest) : hash.digest()) ? Buffer.from(digestResult) : digestResult;
11327
11312
  };
11328
11313
  })
11329
11314
  }),
11330
- ...((getCompiler, createTap)=>{
11331
- let getOptions = (uid)=>((compilation, uid)=>{
11332
- if (!(compilation instanceof Compilation)) throw TypeError("The 'compilation' argument must be an instance of Compilation");
11333
- return compilationOptionsMap.get(compilation)?.[uid];
11334
- })(getCompiler().__internal__get_compilation(), uid);
11335
- return {
11336
- registerHtmlPluginBeforeAssetTagGenerationTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginBeforeAssetTagGeneration, function() {
11337
- return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).beforeAssetTagGeneration;
11338
- }, function(queried) {
11339
- return async function(data) {
11340
- let { compilationId, uid } = data, res = await queried.promise({
11341
- ...data,
11342
- plugin: {
11343
- options: getOptions(uid)
11344
- }
11345
- });
11346
- return res.compilationId = compilationId, res.uid = uid, res;
11347
- };
11348
- }),
11349
- registerHtmlPluginAlterAssetTagsTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginAlterAssetTags, function() {
11350
- return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).alterAssetTags;
11351
- }, function(queried) {
11352
- return async function(data) {
11353
- let { compilationId, uid } = data, res = await queried.promise({
11354
- ...data,
11355
- plugin: {
11356
- options: getOptions(uid)
11357
- }
11358
- });
11359
- return res.compilationId = compilationId, res.uid = uid, res;
11360
- };
11361
- }),
11362
- registerHtmlPluginAlterAssetTagGroupsTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginAlterAssetTagGroups, function() {
11363
- return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).alterAssetTagGroups;
11364
- }, function(queried) {
11365
- return async function(data) {
11366
- let { compilationId, uid } = data, res = await queried.promise({
11367
- ...data,
11368
- plugin: {
11369
- options: getOptions(uid)
11370
- }
11371
- });
11372
- return res.compilationId = compilationId, res.uid = uid, res;
11373
- };
11374
- }),
11375
- registerHtmlPluginAfterTemplateExecutionTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginAfterTemplateExecution, function() {
11376
- return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).afterTemplateExecution;
11377
- }, function(queried) {
11378
- return async function(data) {
11379
- let { compilationId, uid } = data, res = await queried.promise({
11380
- ...data,
11381
- plugin: {
11382
- options: getOptions(uid)
11383
- }
11384
- });
11385
- return res.compilationId = compilationId, res;
11386
- };
11387
- }),
11388
- registerHtmlPluginBeforeEmitTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginBeforeEmit, function() {
11389
- return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).beforeEmit;
11390
- }, function(queried) {
11391
- return async function(data) {
11392
- let { compilationId, uid } = data, res = await queried.promise({
11393
- ...data,
11394
- plugin: {
11395
- options: getOptions(uid)
11396
- }
11397
- });
11398
- return res.compilationId = compilationId, res.uid = uid, res;
11399
- };
11400
- }),
11401
- registerHtmlPluginAfterEmitTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginAfterEmit, function() {
11402
- return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).afterEmit;
11403
- }, function(queried) {
11404
- return async function(data) {
11405
- let { compilationId, uid } = data, res = await queried.promise({
11406
- ...data,
11407
- plugin: {
11408
- options: getOptions(uid)
11409
- }
11410
- });
11411
- return res.compilationId = compilationId, res.uid = uid, res;
11412
- };
11413
- })
11414
- };
11415
- })(getCompiler7, createTap6, createMapTap2),
11416
- ...(getCompiler5 = getCompiler7, {
11417
- registerRuntimePluginCreateScriptTaps: (createTap4 = createTap6)(binding_default().RegisterJsTapKind.RuntimePluginCreateScript, function() {
11418
- return RuntimePlugin.getCompilationHooks(getCompiler5().__internal__get_compilation()).createScript;
11315
+ ...(getCompiler = getCompiler8, createTap = createTap7, getOptions = (uid)=>((compilation, uid)=>{
11316
+ if (!(compilation instanceof Compilation)) throw TypeError("The 'compilation' argument must be an instance of Compilation");
11317
+ return compilationOptionsMap.get(compilation)?.[uid];
11318
+ })(getCompiler().__internal__get_compilation(), uid), {
11319
+ registerHtmlPluginBeforeAssetTagGenerationTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginBeforeAssetTagGeneration, function() {
11320
+ return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).beforeAssetTagGeneration;
11321
+ }, function(queried) {
11322
+ return async function(data) {
11323
+ let { compilationId, uid } = data, res = await queried.promise({
11324
+ ...data,
11325
+ plugin: {
11326
+ options: getOptions(uid)
11327
+ }
11328
+ });
11329
+ return res.compilationId = compilationId, res.uid = uid, res;
11330
+ };
11331
+ }),
11332
+ registerHtmlPluginAlterAssetTagsTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginAlterAssetTags, function() {
11333
+ return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).alterAssetTags;
11334
+ }, function(queried) {
11335
+ return async function(data) {
11336
+ let { compilationId, uid } = data, res = await queried.promise({
11337
+ ...data,
11338
+ plugin: {
11339
+ options: getOptions(uid)
11340
+ }
11341
+ });
11342
+ return res.compilationId = compilationId, res.uid = uid, res;
11343
+ };
11344
+ }),
11345
+ registerHtmlPluginAlterAssetTagGroupsTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginAlterAssetTagGroups, function() {
11346
+ return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).alterAssetTagGroups;
11347
+ }, function(queried) {
11348
+ return async function(data) {
11349
+ let { compilationId, uid } = data, res = await queried.promise({
11350
+ ...data,
11351
+ plugin: {
11352
+ options: getOptions(uid)
11353
+ }
11354
+ });
11355
+ return res.compilationId = compilationId, res.uid = uid, res;
11356
+ };
11357
+ }),
11358
+ registerHtmlPluginAfterTemplateExecutionTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginAfterTemplateExecution, function() {
11359
+ return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).afterTemplateExecution;
11360
+ }, function(queried) {
11361
+ return async function(data) {
11362
+ let { compilationId, uid } = data, res = await queried.promise({
11363
+ ...data,
11364
+ plugin: {
11365
+ options: getOptions(uid)
11366
+ }
11367
+ });
11368
+ return res.compilationId = compilationId, res;
11369
+ };
11370
+ }),
11371
+ registerHtmlPluginBeforeEmitTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginBeforeEmit, function() {
11372
+ return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).beforeEmit;
11373
+ }, function(queried) {
11374
+ return async function(data) {
11375
+ let { compilationId, uid } = data, res = await queried.promise({
11376
+ ...data,
11377
+ plugin: {
11378
+ options: getOptions(uid)
11379
+ }
11380
+ });
11381
+ return res.compilationId = compilationId, res.uid = uid, res;
11382
+ };
11383
+ }),
11384
+ registerHtmlPluginAfterEmitTaps: createTap(binding_default().RegisterJsTapKind.HtmlPluginAfterEmit, function() {
11385
+ return HtmlRspackPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).afterEmit;
11386
+ }, function(queried) {
11387
+ return async function(data) {
11388
+ let { compilationId, uid } = data, res = await queried.promise({
11389
+ ...data,
11390
+ plugin: {
11391
+ options: getOptions(uid)
11392
+ }
11393
+ });
11394
+ return res.compilationId = compilationId, res.uid = uid, res;
11395
+ };
11396
+ })
11397
+ }),
11398
+ ...(getCompiler6 = getCompiler8, {
11399
+ registerRuntimePluginCreateScriptTaps: (createTap5 = createTap7)(binding_default().RegisterJsTapKind.RuntimePluginCreateScript, function() {
11400
+ return RuntimePlugin.getCompilationHooks(getCompiler6().__internal__get_compilation()).createScript;
11419
11401
  }, function(queried) {
11420
11402
  return function(data) {
11421
11403
  return queried.call(data.code, data.chunk);
11422
11404
  };
11423
11405
  }),
11424
- registerRuntimePluginLinkPreloadTaps: createTap4(binding_default().RegisterJsTapKind.RuntimePluginLinkPreload, function() {
11425
- return RuntimePlugin.getCompilationHooks(getCompiler5().__internal__get_compilation()).linkPreload;
11406
+ registerRuntimePluginLinkPreloadTaps: createTap5(binding_default().RegisterJsTapKind.RuntimePluginLinkPreload, function() {
11407
+ return RuntimePlugin.getCompilationHooks(getCompiler6().__internal__get_compilation()).linkPreload;
11426
11408
  }, function(queried) {
11427
11409
  return function(data) {
11428
11410
  return queried.call(data.code, data.chunk);
11429
11411
  };
11430
11412
  }),
11431
- registerRuntimePluginLinkPrefetchTaps: createTap4(binding_default().RegisterJsTapKind.RuntimePluginLinkPrefetch, function() {
11432
- return RuntimePlugin.getCompilationHooks(getCompiler5().__internal__get_compilation()).linkPrefetch;
11413
+ registerRuntimePluginLinkPrefetchTaps: createTap5(binding_default().RegisterJsTapKind.RuntimePluginLinkPrefetch, function() {
11414
+ return RuntimePlugin.getCompilationHooks(getCompiler6().__internal__get_compilation()).linkPrefetch;
11433
11415
  }, function(queried) {
11434
11416
  return function(data) {
11435
11417
  return queried.call(data.code, data.chunk);
11436
11418
  };
11437
11419
  })
11438
11420
  }),
11439
- ...(getCompiler6 = getCompiler7, {
11440
- registerRsdoctorPluginModuleGraphTaps: (createTap5 = createTap6)(binding_.RegisterJsTapKind.RsdoctorPluginModuleGraph, function() {
11441
- return RsdoctorPluginImpl.getCompilationHooks(getCompiler6().__internal__get_compilation()).moduleGraph;
11421
+ ...(getCompiler7 = getCompiler8, {
11422
+ registerRsdoctorPluginModuleGraphTaps: (createTap6 = createTap7)(binding_.RegisterJsTapKind.RsdoctorPluginModuleGraph, function() {
11423
+ return RsdoctorPluginImpl.getCompilationHooks(getCompiler7().__internal__get_compilation()).moduleGraph;
11442
11424
  }, function(queried) {
11443
11425
  return async function(data) {
11444
11426
  return await queried.promise(data);
11445
11427
  };
11446
11428
  }),
11447
- registerRsdoctorPluginChunkGraphTaps: createTap5(binding_.RegisterJsTapKind.RsdoctorPluginChunkGraph, function() {
11448
- return RsdoctorPluginImpl.getCompilationHooks(getCompiler6().__internal__get_compilation()).chunkGraph;
11429
+ registerRsdoctorPluginChunkGraphTaps: createTap6(binding_.RegisterJsTapKind.RsdoctorPluginChunkGraph, function() {
11430
+ return RsdoctorPluginImpl.getCompilationHooks(getCompiler7().__internal__get_compilation()).chunkGraph;
11449
11431
  }, function(queried) {
11450
11432
  return async function(data) {
11451
11433
  return await queried.promise(data);
11452
11434
  };
11453
11435
  }),
11454
- registerRsdoctorPluginModuleIdsTaps: createTap5(binding_.RegisterJsTapKind.RsdoctorPluginModuleIds, function() {
11455
- return RsdoctorPluginImpl.getCompilationHooks(getCompiler6().__internal__get_compilation()).moduleIds;
11436
+ registerRsdoctorPluginModuleIdsTaps: createTap6(binding_.RegisterJsTapKind.RsdoctorPluginModuleIds, function() {
11437
+ return RsdoctorPluginImpl.getCompilationHooks(getCompiler7().__internal__get_compilation()).moduleIds;
11456
11438
  }, function(queried) {
11457
11439
  return async function(data) {
11458
11440
  return await queried.promise(data);
11459
11441
  };
11460
11442
  }),
11461
- registerRsdoctorPluginModuleSourcesTaps: createTap5(binding_.RegisterJsTapKind.RsdoctorPluginModuleSources, function() {
11462
- return RsdoctorPluginImpl.getCompilationHooks(getCompiler6().__internal__get_compilation()).moduleSources;
11443
+ registerRsdoctorPluginModuleSourcesTaps: createTap6(binding_.RegisterJsTapKind.RsdoctorPluginModuleSources, function() {
11444
+ return RsdoctorPluginImpl.getCompilationHooks(getCompiler7().__internal__get_compilation()).moduleSources;
11463
11445
  }, function(queried) {
11464
11446
  return async function(data) {
11465
11447
  return await queried.promise(data);
11466
11448
  };
11467
11449
  }),
11468
- registerRsdoctorPluginAssetsTaps: createTap5(binding_.RegisterJsTapKind.RsdoctorPluginAssets, function() {
11469
- return RsdoctorPluginImpl.getCompilationHooks(getCompiler6().__internal__get_compilation()).assets;
11450
+ registerRsdoctorPluginAssetsTaps: createTap6(binding_.RegisterJsTapKind.RsdoctorPluginAssets, function() {
11451
+ return RsdoctorPluginImpl.getCompilationHooks(getCompiler7().__internal__get_compilation()).assets;
11470
11452
  }, function(queried) {
11471
11453
  return async function(data) {
11472
11454
  return await queried.promise(data);
@@ -11598,7 +11580,7 @@ Help:
11598
11580
  obj.children = this.stats.map((stat, idx)=>{
11599
11581
  let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
11600
11582
  return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
11601
- }), childOptions.version && (obj.rspackVersion = "1.5.8", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
11583
+ }), childOptions.version && (obj.rspackVersion = "1.6.0-beta.0", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
11602
11584
  let mapError = (j, obj)=>({
11603
11585
  ...obj,
11604
11586
  compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
@@ -11614,11 +11596,8 @@ Help:
11614
11596
  forToString: !0
11615
11597
  });
11616
11598
  return this.stats.map((stat, idx)=>{
11617
- let str = stat.toString(childOptions.children[idx]), compilationName = stat.compilation.name, name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root).replace(/\|/g, " ");
11618
- return str && name ? `${name}:\n${function(str, prefix) {
11619
- let rem = str.replace(/\n([^\n])/g, `\n $1`);
11620
- return " " + rem;
11621
- }(str, " ")}` : str;
11599
+ let rem, str = stat.toString(childOptions.children[idx]), compilationName = stat.compilation.name, name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root).replace(/\|/g, " ");
11600
+ return str ? name ? `${name}:\n${" " + (rem = str.replace(/\n([^\n])/g, `\n $1`))}` : str : str;
11622
11601
  }).filter(Boolean).join("\n\n");
11623
11602
  }
11624
11603
  }
@@ -11738,9 +11717,11 @@ Help:
11738
11717
  }, this.compilers = normalizedCompilers, this._options = {
11739
11718
  parallelism: options?.parallelism || 1 / 0
11740
11719
  }, this.dependencies = new WeakMap(), this.running = !1;
11741
- let compilerStats = this.compilers.map(()=>null), doneCompilers = 0;
11720
+ const compilerStats = this.compilers.map(()=>null);
11721
+ let doneCompilers = 0;
11742
11722
  for(let index = 0; index < this.compilers.length; index++){
11743
- let compiler = this.compilers[index], compilerIndex = index, compilerDone = !1;
11723
+ const compiler = this.compilers[index], compilerIndex = index;
11724
+ let compilerDone = !1;
11744
11725
  compiler.hooks.done.tap("MultiCompiler", (stats)=>{
11745
11726
  !compilerDone && (compilerDone = !0, doneCompilers++), compilerStats[compilerIndex] = stats, doneCompilers === this.compilers.length && this.hooks.done.call(new MultiStats(compilerStats));
11746
11727
  }), compiler.hooks.invalid.tap("MultiCompiler", ()=>{
@@ -12495,7 +12476,7 @@ Help:
12495
12476
  object.hash = context.getStatsCompilation(compilation).hash;
12496
12477
  },
12497
12478
  version: (object)=>{
12498
- object.version = "5.75.0", object.rspackVersion = "1.5.8";
12479
+ object.version = "5.75.0", object.rspackVersion = "1.6.0-beta.0";
12499
12480
  },
12500
12481
  env: (object, _compilation, _context, { _env })=>{
12501
12482
  object.env = _env;
@@ -13220,7 +13201,7 @@ Help:
13220
13201
  "chunkOrigin.moduleName": (moduleName, { bold })=>bold(moduleName),
13221
13202
  "chunkOrigin.loc": (loc)=>loc,
13222
13203
  "error.file": (file, { bold })=>bold(file),
13223
- "error.moduleName": (moduleName, { bold })=>moduleName.includes("!") ? `${bold(moduleName.replace(/^(\s|\S)*!/, ""))} (${moduleName})` : `${bold(moduleName)}`,
13204
+ "error.moduleName": (moduleName, { bold })=>moduleName.includes("!") ? `${bold(moduleName.replace(/^(\s|\S)*!/, ""))} (${moduleName})` : bold(moduleName),
13224
13205
  "error.loc": (loc, { green })=>green(loc),
13225
13206
  "error.message": (message, { bold, formatError })=>message.includes("\u001b[") ? message : bold(formatError(message)),
13226
13207
  "error.details": (details, { formatError })=>formatError(details),
@@ -13714,7 +13695,7 @@ Help:
13714
13695
  return time < times[3] ? `${time}${unit}` : time < times[2] ? bold(`${time}${unit}`) : time < times[1] ? green(`${time}${unit}`) : time < times[0] ? yellow(`${time}${unit}`) : red(`${time}${unit}`);
13715
13696
  }
13716
13697
  let timeStr = time.toString();
13717
- return time > 1000 && (timeStr = `${(time / 1000).toFixed(2)}`, unit = " s"), `${boldQuantity ? bold(timeStr) : timeStr}${unit}`;
13698
+ return time > 1000 && (timeStr = (time / 1000).toFixed(2), unit = " s"), `${boldQuantity ? bold(timeStr) : timeStr}${unit}`;
13718
13699
  },
13719
13700
  formatError: (msg, { green, yellow, red })=>{
13720
13701
  let message = msg;
@@ -14979,7 +14960,8 @@ Help:
14979
14960
  generator: schemas_record(schemas_string(), any()),
14980
14961
  resolve: resolveOptions,
14981
14962
  sideEffects: schemas_boolean(),
14982
- enforce: literal("pre").or(literal("post"))
14963
+ enforce: literal("pre").or(literal("post")),
14964
+ extractSourceMap: schemas_boolean()
14983
14965
  }).partial().extend({
14984
14966
  oneOf: lazy(()=>ruleSetRule.or(falsy).array()).optional(),
14985
14967
  rules: lazy(()=>ruleSetRule.or(falsy).array()).optional()
@@ -15684,7 +15666,7 @@ Help:
15684
15666
  _provides;
15685
15667
  _enhanced;
15686
15668
  constructor(options){
15687
- let sharedOptions = parseOptions(options.shared, (item, key)=>{
15669
+ const sharedOptions = parseOptions(options.shared, (item, key)=>{
15688
15670
  var str;
15689
15671
  if ("string" != typeof item) throw Error("Unexpected array in shared");
15690
15672
  return item !== key && (str = item, VERSION_PATTERN_REGEXP.test(str)) ? {
@@ -15820,7 +15802,7 @@ Help:
15820
15802
  let _options = JSON.stringify(options || {});
15821
15803
  return binding_default().transform(source, _options);
15822
15804
  }
15823
- let exports_rspackVersion = "1.5.8", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
15805
+ let exports_rspackVersion = "1.6.0-beta.0", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
15824
15806
  getNormalizedRspackOptions: getNormalizedRspackOptions,
15825
15807
  applyRspackOptionsDefaults: applyRspackOptionsDefaults,
15826
15808
  getNormalizedWebpackOptions: getNormalizedRspackOptions,
@@ -15867,22 +15849,20 @@ Help:
15867
15849
  this._options = _options;
15868
15850
  }
15869
15851
  apply(compiler) {
15870
- let { webpack } = compiler, paths = function(options) {
15871
- let runtimeToolsPath = options.implementation ?? require.resolve("@module-federation/runtime-tools"), bundlerRuntimePath = require.resolve("@module-federation/webpack-bundler-runtime", {
15872
- paths: [
15873
- runtimeToolsPath
15874
- ]
15875
- }), runtimePath = require.resolve("@module-federation/runtime", {
15876
- paths: [
15877
- runtimeToolsPath
15878
- ]
15879
- });
15880
- return {
15881
- runtimeTools: runtimeToolsPath,
15882
- bundlerRuntime: bundlerRuntimePath,
15883
- runtime: runtimePath
15884
- };
15885
- }(this._options);
15852
+ var options;
15853
+ let runtimeToolsPath, bundlerRuntimePath, runtimePath, { webpack } = compiler, paths = (runtimeToolsPath = (options = this._options).implementation ?? require.resolve("@module-federation/runtime-tools"), bundlerRuntimePath = require.resolve("@module-federation/webpack-bundler-runtime", {
15854
+ paths: [
15855
+ runtimeToolsPath
15856
+ ]
15857
+ }), runtimePath = require.resolve("@module-federation/runtime", {
15858
+ paths: [
15859
+ runtimeToolsPath
15860
+ ]
15861
+ }), {
15862
+ runtimeTools: runtimeToolsPath,
15863
+ bundlerRuntime: bundlerRuntimePath,
15864
+ runtime: runtimePath
15865
+ });
15886
15866
  compiler.options.resolve.alias = {
15887
15867
  "@module-federation/runtime-tools": paths.runtimeTools,
15888
15868
  "@module-federation/runtime": paths.runtime,
@@ -15945,8 +15925,10 @@ Help:
15945
15925
  return remoteInfos;
15946
15926
  }(options), runtimePluginImports = [], runtimePluginVars = [];
15947
15927
  for(let i = 0; i < runtimePlugins.length; i++){
15948
- let runtimePluginVar = `__module_federation_runtime_plugin_${i}__`;
15949
- runtimePluginImports.push(`import ${runtimePluginVar} from ${JSON.stringify(runtimePlugins[i])}`), runtimePluginVars.push(`${runtimePluginVar}()`);
15928
+ let runtimePluginVar = `__module_federation_runtime_plugin_${i}__`, pluginSpec = runtimePlugins[i], pluginPath = Array.isArray(pluginSpec) ? pluginSpec[0] : pluginSpec, pluginParams = Array.isArray(pluginSpec) ? pluginSpec[1] : void 0;
15929
+ runtimePluginImports.push(`import ${runtimePluginVar} from ${JSON.stringify(pluginPath)}`);
15930
+ let paramsCode = void 0 === pluginParams ? "undefined" : JSON.stringify(pluginParams);
15931
+ runtimePluginVars.push(`${runtimePluginVar}(${paramsCode})`);
15950
15932
  }
15951
15933
  let content = [
15952
15934
  `import __module_federation_bundler_runtime__ from ${JSON.stringify(paths.bundlerRuntime)}`,