@rspack/core 1.3.9 → 1.3.11

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
@@ -225,6 +225,12 @@ var __webpack_modules__ = {
225
225
  "node:child_process": function(module) {
226
226
  module.exports = require("node:child_process");
227
227
  },
228
+ "node:http": function(module) {
229
+ module.exports = require("node:http");
230
+ },
231
+ "node:https": function(module) {
232
+ module.exports = require("node:https");
233
+ },
228
234
  "node:os": function(module) {
229
235
  module.exports = require("node:os");
230
236
  },
@@ -238,6 +244,11 @@ var __webpack_modules__ = {
238
244
  module.exports = import("../compiled/tinypool/dist/index.js").then(function(module) {
239
245
  return module;
240
246
  });
247
+ },
248
+ "node:inspector": function(module) {
249
+ module.exports = import("node:inspector").then(function(module) {
250
+ return module;
251
+ });
241
252
  }
242
253
  }, __webpack_module_cache__ = {};
243
254
  function __webpack_require__(moduleId) {
@@ -589,6 +600,9 @@ for(var __webpack_i__ in (()=>{
589
600
  constructor(binding){
590
601
  this.#inner = binding;
591
602
  }
603
+ hasChunkEntryDependentChunks(chunk) {
604
+ return this.#inner.hasChunkEntryDependentChunks(Chunk.__to_binding(chunk));
605
+ }
592
606
  getChunkModules(chunk) {
593
607
  return this.#inner.getChunkModules(Chunk.__to_binding(chunk));
594
608
  }
@@ -757,6 +771,11 @@ for(var __webpack_i__ in (()=>{
757
771
  super(), this.name = "NonErrorEmittedError", this.message = `(Emitted value instead of an instance of Error) ${error}`;
758
772
  }
759
773
  }
774
+ class DeadlockRiskError extends Error {
775
+ constructor(message){
776
+ super(message), this.name = "DeadlockRiskError", this.stack = "";
777
+ }
778
+ }
760
779
  class RuntimeModule {
761
780
  static STAGE_NORMAL = 0;
762
781
  static STAGE_BASIC = 5;
@@ -855,6 +874,7 @@ for(var __webpack_i__ in (()=>{
855
874
  getInner: this.#getInnerByCompilation.bind(this)
856
875
  });
857
876
  } catch (e) {
877
+ if (e instanceof DeadlockRiskError) throw e;
858
878
  console.warn(`Failed to get stats due to error: ${e?.message}, are you trying to access the stats from the previous compilation?`);
859
879
  }
860
880
  return stats;
@@ -874,6 +894,7 @@ for(var __webpack_i__ in (()=>{
874
894
  getInner: this.#getInnerByCompilation.bind(this)
875
895
  });
876
896
  } catch (e) {
897
+ if (e instanceof DeadlockRiskError) throw e;
877
898
  console.warn(`Failed to get stats due to error: ${e?.message}, are you trying to access the stats from the previous compilation?`);
878
899
  }
879
900
  if (!stats) return "";
@@ -1520,14 +1541,23 @@ for(var __webpack_i__ in (()=>{
1520
1541
  value (value) {
1521
1542
  return this._has(Chunk.__to_binding(value));
1522
1543
  }
1544
+ }), Object.defineProperty(binding_.Sources.prototype, "get", {
1545
+ enumerable: !0,
1546
+ configurable: !0,
1547
+ value (sourceType) {
1548
+ let originalSource = this._get(sourceType);
1549
+ return originalSource ? JsSource.__from_binding(originalSource) : null;
1550
+ }
1523
1551
  });
1524
- let checkCompilation = (compilation)=>{
1552
+ let $proxy = Symbol.for("proxy"), checkCompilation = (compilation)=>{
1525
1553
  if (!(compilation instanceof Compilation)) throw TypeError('The \'compilation\' argument must be an instance of Compilation. This usually occurs when multiple versions of "@rspack/core" are used, or when the code in "@rspack/core" is executed multiple times.');
1526
1554
  };
1527
1555
  Compilation_computedKey = binding_.COMPILATION_HOOKS_MAP_SYMBOL;
1528
1556
  class Compilation {
1529
1557
  #inner;
1530
1558
  #shutdown;
1559
+ #errors;
1560
+ #chunks;
1531
1561
  hooks;
1532
1562
  name;
1533
1563
  startTime;
@@ -1547,6 +1577,7 @@ for(var __webpack_i__ in (()=>{
1547
1577
  };
1548
1578
  needAdditionalPass;
1549
1579
  #addIncludeDispatcher;
1580
+ #addEntryDispatcher;
1550
1581
  [Compilation_computedKey];
1551
1582
  constructor(compiler, inner){
1552
1583
  this.#inner = inner, this.#shutdown = !1;
@@ -1668,7 +1699,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1668
1699
  seal: new lite_tapable_namespaceObject.SyncHook([]),
1669
1700
  afterSeal: new lite_tapable_namespaceObject.AsyncSeriesHook([]),
1670
1701
  needAdditionalPass: new lite_tapable_namespaceObject.SyncBailHook([])
1671
- }, this.compiler = compiler, this.resolverFactory = compiler.resolverFactory, this.inputFileSystem = compiler.inputFileSystem, this.options = compiler.options, this.outputOptions = compiler.options.output, this.logging = new Map(), this.childrenCounters = {}, this.children = [], this.needAdditionalPass = !1, this.chunkGraph = ChunkGraph.__from_binding(inner.chunkGraph), this.moduleGraph = ModuleGraph.__from_binding(inner.moduleGraph), this.#addIncludeDispatcher = new AddIncludeDispatcher(inner.addInclude.bind(inner)), this[binding_.COMPILATION_HOOKS_MAP_SYMBOL] = new WeakMap();
1702
+ }, this.compiler = compiler, this.resolverFactory = compiler.resolverFactory, this.inputFileSystem = compiler.inputFileSystem, this.options = compiler.options, this.outputOptions = compiler.options.output, this.logging = new Map(), this.childrenCounters = {}, this.children = [], this.needAdditionalPass = !1, this.chunkGraph = ChunkGraph.__from_binding(inner.chunkGraph), this.moduleGraph = ModuleGraph.__from_binding(inner.moduleGraph), this.#addIncludeDispatcher = new AddEntryItemDispatcher(inner.addInclude.bind(inner)), this.#addEntryDispatcher = new AddEntryItemDispatcher(inner.addEntry.bind(inner)), this[binding_.COMPILATION_HOOKS_MAP_SYMBOL] = new WeakMap();
1672
1703
  }
1673
1704
  get hash() {
1674
1705
  return this.#inner.hash;
@@ -1709,7 +1740,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1709
1740
  return new Set(this.#inner.builtModules);
1710
1741
  }
1711
1742
  get chunks() {
1712
- return this.#inner.chunks;
1743
+ return this.#chunks || (this.#chunks = this.#inner.chunks), this.#chunks;
1713
1744
  }
1714
1745
  get namedChunks() {
1715
1746
  return createReadonlyMap({
@@ -1725,6 +1756,9 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1725
1756
  get entries() {
1726
1757
  return new Entries(this.#inner.entries);
1727
1758
  }
1759
+ get codeGenerationResults() {
1760
+ return this.#inner.codeGenerationResults;
1761
+ }
1728
1762
  #createCachedAssets() {
1729
1763
  return new Proxy({}, {
1730
1764
  get: (_, property)=>{
@@ -1809,51 +1843,55 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1809
1843
  this.#inner.pushNativeDiagnostics(diagnostics);
1810
1844
  }
1811
1845
  get errors() {
1812
- let inner = this.#inner, errors = inner.getErrors();
1813
- for (let item of [
1814
- {
1815
- method: "push",
1816
- handler (target, thisArg, errs) {
1817
- for(let i = 0; i < errs.length; i++){
1818
- let error = errs[i];
1819
- inner.pushDiagnostic(JsRspackDiagnostic.__to_binding(error, binding_.JsRspackSeverity.Error));
1820
- }
1821
- return Reflect.apply(target, thisArg, errs);
1822
- }
1823
- },
1824
- {
1825
- method: "pop",
1826
- handler: (target, thisArg)=>(inner.spliceDiagnostic(errors.length - 1, errors.length, []), Reflect.apply(target, thisArg, []))
1827
- },
1828
- {
1829
- method: "shift",
1830
- handler: (target, thisArg)=>(inner.spliceDiagnostic(0, 1, []), Reflect.apply(target, thisArg, []))
1831
- },
1832
- {
1833
- method: "unshift",
1834
- handler (target, thisArg, errs) {
1835
- let errList = errs.map((error)=>JsRspackDiagnostic.__to_binding(error, binding_.JsRspackSeverity.Error));
1836
- return inner.spliceDiagnostic(0, 0, errList), Reflect.apply(target, thisArg, errs);
1846
+ return this.#errors || (this.#errors = function(adm) {
1847
+ if ($proxy in adm) return adm[$proxy];
1848
+ let array = [];
1849
+ array[external_node_util_default().inspect.custom] = ()=>adm.values();
1850
+ let splice = function(index, deleteCount, ...newItems) {
1851
+ switch(arguments.length){
1852
+ case 0:
1853
+ return [];
1854
+ case 1:
1855
+ return adm.spliceWithArray(index, adm.length);
1856
+ case 2:
1857
+ return adm.spliceWithArray(index, deleteCount);
1837
1858
  }
1838
- },
1839
- {
1840
- method: "splice",
1841
- handler (target, thisArg, [startIdx, delCount, ...errors]) {
1842
- let errList = errors.map((error)=>JsRspackDiagnostic.__to_binding(error, binding_.JsRspackSeverity.Error));
1843
- return inner.spliceDiagnostic(startIdx, startIdx + delCount, errList), Reflect.apply(target, thisArg, [
1844
- startIdx,
1845
- delCount,
1846
- ...errors
1847
- ]);
1859
+ return adm.spliceWithArray(index, deleteCount, newItems.map((item)=>concatErrorMsgAndStack(item)));
1860
+ }, arrayExtensions = {
1861
+ [Symbol.iterator]: ()=>adm.values().values(),
1862
+ splice,
1863
+ push: (...newItems)=>(adm.spliceWithArray(adm.length, 0, newItems.map((item)=>concatErrorMsgAndStack(item))), adm.length),
1864
+ pop: ()=>splice(Math.max(adm.length - 1, 0), 1)[0],
1865
+ shift: ()=>splice(0, 1)[0],
1866
+ unshift: (...newItems)=>(adm.spliceWithArray(0, 0, newItems.map((item)=>concatErrorMsgAndStack(item))), adm.length),
1867
+ reverse: ()=>adm.values().reverse(),
1868
+ sort (compareFn) {
1869
+ let copy = adm.values();
1870
+ return copy.sort(compareFn), adm.spliceWithArray(0, adm.length, copy), this;
1871
+ },
1872
+ at: (index)=>adm.get(index),
1873
+ concat: (...items)=>([].includes, adm.values().concat(...items)),
1874
+ flat: ()=>adm.values(),
1875
+ every: (predicate, thisArg)=>adm.values().every(predicate, thisArg),
1876
+ filter: (predicate, thisArg)=>adm.values().filter(predicate, thisArg),
1877
+ find: (predicate, thisArg)=>adm.values().find(predicate, thisArg),
1878
+ findIndex: (predicate, thisArg)=>adm.values().findIndex(predicate, thisArg),
1879
+ flatMap: (callbackfn, thisArg)=>adm.values().flatMap(callbackfn, thisArg),
1880
+ forEach (callbackfn, thisArg) {
1881
+ adm.values().forEach(callbackfn, thisArg);
1882
+ },
1883
+ map: (callbackfn, thisArg)=>adm.values().map(callbackfn, thisArg),
1884
+ reduce: (callbackfn, initialValue)=>adm.values().reduce(callbackfn, initialValue),
1885
+ reduceRight: (callbackfn, initialValue)=>adm.values().reduceRight(callbackfn, initialValue)
1886
+ }, proxy = new Proxy(array, {
1887
+ get: (target, name)=>"length" === name ? adm.length : "string" != typeof name || Number.isNaN(Number.parseInt(name)) ? Object.prototype.hasOwnProperty.call(arrayExtensions, name) ? arrayExtensions[name] : target[name] : adm.get(Number.parseInt(name)),
1888
+ set (target, name, value) {
1889
+ if ("length" === name) throw Error("The 'length' property is read-only and cannot be assigned a new value.");
1890
+ return "symbol" == typeof name || Number.isNaN(Number.parseInt(name)) ? target[name] = value : adm.set(Number.parseInt(name), concatErrorMsgAndStack(value)), !0;
1848
1891
  }
1849
- }
1850
- ]){
1851
- let proxiedMethod = new Proxy(errors[item.method], {
1852
- apply: item.handler
1853
1892
  });
1854
- errors[item.method] = proxiedMethod;
1855
- }
1856
- return errors;
1893
+ return adm[$proxy] = proxy, proxy;
1894
+ }(this.#inner.errors)), this.#errors;
1857
1895
  }
1858
1896
  set errors(errors) {
1859
1897
  let inner = this.#inner, length = inner.getErrors().length;
@@ -1994,6 +2032,11 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1994
2032
  addInclude(context, dependency, options, callback) {
1995
2033
  this.#addIncludeDispatcher.call(context, dependency, options, callback);
1996
2034
  }
2035
+ addEntry(context, dependency, optionsOrName, callback) {
2036
+ this.#addEntryDispatcher.call(context, dependency, "object" == typeof optionsOrName ? optionsOrName : {
2037
+ name: optionsOrName
2038
+ }, callback);
2039
+ }
1997
2040
  __internal__getAssetSource(filename) {
1998
2041
  let rawSource = this.#inner.getAssetSource(filename);
1999
2042
  if (rawSource) return JsSource.__from_binding(rawSource);
@@ -2038,7 +2081,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2038
2081
  static PROCESS_ASSETS_STAGE_ANALYSE = 4000;
2039
2082
  static PROCESS_ASSETS_STAGE_REPORT = 5000;
2040
2083
  }
2041
- class AddIncludeDispatcher {
2084
+ class AddEntryItemDispatcher {
2042
2085
  #inner;
2043
2086
  #running;
2044
2087
  #args = [];
@@ -2139,7 +2182,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2139
2182
  compiler.hooks.thisCompilation.tap("executeModule", (compilation)=>{
2140
2183
  compiler.__internal__get_module_execution_results_map().clear(), compilation.hooks.executeModule.tap("executeModule", (options, context)=>{
2141
2184
  let moduleObject = options.moduleObject, source = options.codeGenerationResult.get("javascript");
2142
- try {
2185
+ if (void 0 !== source) try {
2143
2186
  external_node_vm_default().runInThisContext(`(function(module, __webpack_module__, __webpack_exports__, exports, ${RuntimeGlobals.require}) {\n${source}\n})`, {
2144
2187
  filename: moduleObject.id
2145
2188
  }).call(moduleObject.exports, moduleObject, moduleObject, moduleObject.exports, moduleObject.exports, context.__webpack_require__);
@@ -3061,16 +3104,16 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
3061
3104
  });
3062
3105
  let external_node_fs_namespaceObject = require("node:fs");
3063
3106
  var external_node_fs_default = __webpack_require__.n(external_node_fs_namespaceObject);
3064
- let external_node_inspector_namespaceObject = require("node:inspector");
3065
- var external_node_inspector_default = __webpack_require__.n(external_node_inspector_namespaceObject);
3066
3107
  class JavaScriptTracer {
3067
3108
  static startTime;
3068
3109
  static events;
3069
3110
  static layer;
3070
3111
  static output;
3071
3112
  static session;
3072
- static initJavaScriptTrace(layer, output) {
3073
- this.session = new (external_node_inspector_default()).Session(), this.layer = layer, this.output = output, this.events = [];
3113
+ static counter = 100;
3114
+ static async initJavaScriptTrace(layer, output) {
3115
+ let { Session } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "node:inspector"));
3116
+ this.session = new Session(), this.layer = layer, this.output = output, this.events = [];
3074
3117
  let hrtime = process.hrtime();
3075
3118
  this.startTime = 1000000 * hrtime[0] + Math.round(hrtime[1] / 1000);
3076
3119
  }
@@ -3744,7 +3787,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
3744
3787
  else {
3745
3788
  var args1, raw;
3746
3789
  loaderState === binding_.JsLoaderState.Normal && (args1 = args, !(raw = !!currentLoaderObject?.raw) && args1[0] instanceof Uint8Array ? args1[0] = function(buf) {
3747
- let str = decoder.decode(buf);
3790
+ let str = decoder.decode(buf.buffer instanceof SharedArrayBuffer ? Buffer.from(buf) : buf);
3748
3791
  return 0xfeff === str.charCodeAt(0) ? str.slice(1) : str;
3749
3792
  }(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) || [];
3750
3793
  }
@@ -3799,7 +3842,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
3799
3842
  additionalData
3800
3843
  ], context.resourceData));
3801
3844
  }
3802
- context.content = isNil(content) ? null : toBuffer(content), context.sourceMap = JsSourceMap.__to_binding(sourceMap), context.additionalData = additionalData || void 0;
3845
+ context.content = isNil(content) ? null : toBuffer(content), context.sourceMap = JsSourceMap.__to_binding(sourceMap), context.additionalData = additionalData || void 0, context.__internal__utf8Hint = "string" == typeof content;
3803
3846
  break;
3804
3847
  }
3805
3848
  default:
@@ -4193,7 +4236,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
4193
4236
  }
4194
4237
  function getRawCssParserOptions(parser) {
4195
4238
  return {
4196
- namedExports: parser.namedExports
4239
+ namedExports: parser.namedExports,
4240
+ url: parser.url
4197
4241
  };
4198
4242
  }
4199
4243
  function getRawGeneratorOptions(generator, type) {
@@ -4257,7 +4301,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
4257
4301
  };
4258
4302
  if ("function" == typeof dataUrl && null !== dataUrl) return (source, context)=>dataUrl(source, context);
4259
4303
  throw Error(`unreachable: AssetGeneratorDataUrl type should be one of "options", "function", but got ${dataUrl}`);
4260
- }(options.dataUrl) : void 0
4304
+ }(options.dataUrl) : void 0,
4305
+ binary: options.binary
4261
4306
  };
4262
4307
  }
4263
4308
  function getRawAssetResourceGeneratorOptions(options) {
@@ -4266,7 +4311,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
4266
4311
  filename: options.filename,
4267
4312
  outputPath: options.outputPath,
4268
4313
  publicPath: options.publicPath,
4269
- importMode: options.importMode
4314
+ importMode: options.importMode,
4315
+ binary: options.binary
4270
4316
  };
4271
4317
  }
4272
4318
  function getRawCssAutoOrModuleGeneratorOptions(options) {
@@ -4423,9 +4469,13 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
4423
4469
  let ret = {
4424
4470
  patterns: []
4425
4471
  };
4426
- return ret.patterns = (copy.patterns || []).map((pattern)=>("string" == typeof pattern && (pattern = {
4472
+ return ret.patterns = (copy.patterns || []).map((pattern)=>{
4473
+ "string" == typeof pattern && (pattern = {
4427
4474
  from: pattern
4428
- }), pattern.force ??= !1, pattern.noErrorOnMissing ??= !1, pattern.priority ??= 0, pattern.globOptions ??= {}, pattern.copyPermissions ??= !1, pattern)), ret;
4475
+ }), pattern.force ??= !1, pattern.noErrorOnMissing ??= !1, pattern.priority ??= 0, pattern.globOptions ??= {}, pattern.copyPermissions ??= !1;
4476
+ let originalTransform = pattern.transform;
4477
+ return originalTransform && ("object" == typeof originalTransform ? pattern.transform = (input, absoluteFilename)=>Promise.resolve(originalTransform.transformer(input, absoluteFilename)) : pattern.transform = (input, absoluteFilename)=>Promise.resolve(originalTransform(input, absoluteFilename))), pattern;
4478
+ }), ret;
4429
4479
  }), DEFAULT_FILENAME = "[name].css", LOADER_PATH = (0, external_node_path_namespaceObject.join)(__dirname, "cssExtractLoader.js");
4430
4480
  class CssExtractRspackPlugin {
4431
4481
  static pluginName = "css-extract-rspack-plugin";
@@ -4609,15 +4659,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
4609
4659
  if (!enabled.has(type)) return enabled.add(type), createBuiltinPlugin(this.name, type);
4610
4660
  }
4611
4661
  }
4612
- let EnableWasmLoadingPlugin = base_create(binding_.BuiltinPluginName.EnableWasmLoadingPlugin, (type)=>type), EnsureChunkConditionsPlugin = base_create(binding_.BuiltinPluginName.EnsureChunkConditionsPlugin, ()=>{}), EvalDevToolModulePlugin = base_create(binding_.BuiltinPluginName.EvalDevToolModulePlugin, (options)=>options, "compilation"), EvalSourceMapDevToolPlugin = base_create(binding_.BuiltinPluginName.EvalSourceMapDevToolPlugin, (options)=>({
4613
- filename: options.filename || void 0,
4614
- append: options.append,
4615
- namespace: options.namespace ?? "",
4616
- columns: options.columns ?? !0,
4617
- noSources: options.noSources ?? !1,
4618
- publicPath: options.publicPath,
4619
- module: options.module
4620
- }), "compilation");
4662
+ let EnableWasmLoadingPlugin = base_create(binding_.BuiltinPluginName.EnableWasmLoadingPlugin, (type)=>type), EnsureChunkConditionsPlugin = base_create(binding_.BuiltinPluginName.EnsureChunkConditionsPlugin, ()=>{}), EvalDevToolModulePlugin = base_create(binding_.BuiltinPluginName.EvalDevToolModulePlugin, (options)=>options, "compilation"), EvalSourceMapDevToolPlugin = base_create(binding_.BuiltinPluginName.EvalSourceMapDevToolPlugin, (options)=>options, "compilation");
4621
4663
  class ExternalsPlugin extends RspackBuiltinPlugin {
4622
4664
  type;
4623
4665
  externals;
@@ -5047,18 +5089,36 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
5047
5089
  let HttpExternalsRspackPlugin = base_create(binding_.BuiltinPluginName.HttpExternalsRspackPlugin, (css, webAsync)=>({
5048
5090
  css,
5049
5091
  webAsync
5050
- })), defaultHttpClient = (url, headers)=>fetch(url, {
5092
+ })), external_node_zlib_namespaceObject = require("node:zlib"), getHttp = memoize(()=>__webpack_require__("node:http")), getHttps = memoize(()=>__webpack_require__("node:https")), defaultHttpClient = async (url, headers)=>{
5093
+ let { res, body } = await function(url, options) {
5094
+ let send = "https:" === new URL(url).protocol ? getHttps() : getHttp();
5095
+ return new Promise((resolve, reject)=>{
5096
+ send.get(url, options, (res)=>{
5097
+ let contentEncoding = res.headers["content-encoding"], stream = res;
5098
+ "gzip" === contentEncoding ? stream = stream.pipe((0, external_node_zlib_namespaceObject.createGunzip)()) : "br" === contentEncoding ? stream = stream.pipe((0, external_node_zlib_namespaceObject.createBrotliDecompress)()) : "deflate" === contentEncoding && (stream = stream.pipe((0, external_node_zlib_namespaceObject.createInflate)()));
5099
+ let chunks = [];
5100
+ stream.on("data", (chunk)=>{
5101
+ chunks.push(chunk);
5102
+ }), stream.on("end", ()=>{
5103
+ let bodyBuffer = Buffer.concat(chunks);
5104
+ if (!res.complete) return void reject(Error(`${url} request was terminated early`));
5105
+ resolve({
5106
+ res,
5107
+ body: bodyBuffer
5108
+ });
5109
+ });
5110
+ }).on("error", reject);
5111
+ });
5112
+ }(url, {
5051
5113
  headers
5052
- }).then((response)=>response.arrayBuffer().then((buffer)=>{
5053
- let responseHeaders = {};
5054
- return response.headers.forEach((value, key)=>{
5055
- responseHeaders[key] = value;
5056
- }), {
5057
- status: response.status,
5058
- headers: responseHeaders,
5059
- body: Buffer.from(buffer)
5060
- };
5061
- }));
5114
+ }), responseHeaders = {};
5115
+ for (let [key, value] of Object.entries(res.headers))Array.isArray(value) ? responseHeaders[key] = value.join(", ") : responseHeaders[key] = value;
5116
+ return {
5117
+ status: res.statusCode,
5118
+ headers: responseHeaders,
5119
+ body: Buffer.from(body)
5120
+ };
5121
+ };
5062
5122
  class HttpUriPlugin extends RspackBuiltinPlugin {
5063
5123
  options;
5064
5124
  name;
@@ -5516,7 +5576,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
5516
5576
  integrities = new Map();
5517
5577
  options;
5518
5578
  validateError = null;
5519
- constructor(options){
5579
+ constructor(options = {}){
5520
5580
  let validateError = null;
5521
5581
  if ("object" != typeof options) throw Error("SubResourceIntegrity: argument must be an object");
5522
5582
  try {
@@ -5630,7 +5690,20 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
5630
5690
  function normalizePath(path) {
5631
5691
  return path.replace(/\?.*$/, "").split(external_node_path_namespaceObject.sep).join("/");
5632
5692
  }
5633
- let ModuleInfoHeaderPlugin = base_create(binding_.BuiltinPluginName.ModuleInfoHeaderPlugin, (verbose)=>verbose, "compilation");
5693
+ let ModuleInfoHeaderPlugin = base_create(binding_.BuiltinPluginName.ModuleInfoHeaderPlugin, (verbose)=>verbose, "compilation"), CssChunkingPlugin = base_create(binding_.BuiltinPluginName.CssChunkingPlugin, function(options) {
5694
+ if (options.nextjs) return {
5695
+ strict: options.strict,
5696
+ exclude: /^pages\//
5697
+ };
5698
+ let { splitChunks } = this.options.optimization;
5699
+ if (splitChunks) {
5700
+ let cssMiniExtractIndex = splitChunks.defaultSizeTypes.indexOf("css/mini-extract");
5701
+ cssMiniExtractIndex && splitChunks.defaultSizeTypes.splice(cssMiniExtractIndex, 1);
5702
+ let cssIndex = splitChunks.defaultSizeTypes.indexOf("css");
5703
+ cssIndex && splitChunks.defaultSizeTypes.splice(cssIndex, 1);
5704
+ }
5705
+ return options;
5706
+ });
5634
5707
  function assertNotNill(value) {
5635
5708
  if (null == value) throw Error(`${value} should not be undefined or null`);
5636
5709
  }
@@ -6461,7 +6534,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6461
6534
  asyncWebAssembly: options.experiments.asyncWebAssembly,
6462
6535
  css: options.experiments.css,
6463
6536
  targetProperties,
6464
- mode: options.mode
6537
+ mode: options.mode,
6538
+ uniqueName: options.output.uniqueName
6465
6539
  }), applyOutputDefaults(options.output, {
6466
6540
  context: options.context,
6467
6541
  targetProperties,
@@ -6500,15 +6574,20 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6500
6574
  }, applyExperimentsDefaults = (experiments, { production, development })=>{
6501
6575
  F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "layers", !1), D(experiments, "topLevelAwait", !0), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !1), D(experiments.incremental, "providedExports", !1), D(experiments.incremental, "dependenciesDiagnostics", !1), D(experiments.incremental, "sideEffects", !1), D(experiments.incremental, "buildChunkGraph", !1), D(experiments.incremental, "moduleIds", !1), D(experiments.incremental, "chunkIds", !1), D(experiments.incremental, "modulesHashes", !1), D(experiments.incremental, "modulesCodegen", !1), D(experiments.incremental, "modulesRuntimeRequirements", !1), D(experiments.incremental, "chunksRuntimeRequirements", !1), D(experiments.incremental, "chunksHashes", !1), D(experiments.incremental, "chunksRender", !1), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !0), D(experiments, "parallelLoader", !1);
6502
6576
  }, applybundlerInfoDefaults = (rspackFuture, library)=>{
6503
- "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.3.9"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
6577
+ "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.3.11"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
6504
6578
  }, applySnapshotDefaults = (_snapshot, _env)=>{}, applyJavascriptParserOptionsDefaults = (parserOptions)=>{
6505
6579
  D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "wrappedContextCritical", !1), D(parserOptions, "wrappedContextRegExp", /.*/), D(parserOptions, "strictExportPresence", !1), D(parserOptions, "requireAsExpression", !0), D(parserOptions, "requireDynamic", !0), D(parserOptions, "requireResolve", !0), D(parserOptions, "importDynamic", !0), D(parserOptions, "worker", [
6506
6580
  "..."
6507
6581
  ]), D(parserOptions, "importMeta", !0);
6508
6582
  }, applyJsonGeneratorOptionsDefaults = (generatorOptions)=>{
6509
6583
  D(generatorOptions, "JSONParse", !0);
6510
- }, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode })=>{
6511
- assertNotNill(module.parser), assertNotNill(module.generator), F(module.parser, "asset", ()=>({})), assertNotNill(module.parser.asset), F(module.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module.parser.asset.dataUrlCondition && D(module.parser.asset.dataUrlCondition, "maxSize", 8096), F(module.parser, "javascript", ()=>({})), assertNotNill(module.parser.javascript), applyJavascriptParserOptionsDefaults(module.parser.javascript), F(module.parser, JSON_MODULE_TYPE, ()=>({})), assertNotNill(module.parser[JSON_MODULE_TYPE]), D(module.parser[JSON_MODULE_TYPE], "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER), F(module.generator, "json", ()=>({})), assertNotNill(module.generator.json), applyJsonGeneratorOptionsDefaults(module.generator.json), css && (F(module.parser, "css", ()=>({})), assertNotNill(module.parser.css), D(module.parser.css, "namedExports", !0), F(module.parser, "css/auto", ()=>({})), assertNotNill(module.parser["css/auto"]), D(module.parser["css/auto"], "namedExports", !0), F(module.parser, "css/module", ()=>({})), assertNotNill(module.parser["css/module"]), D(module.parser["css/module"], "namedExports", !0), F(module.generator, "css", ()=>({})), assertNotNill(module.generator.css), D(module.generator.css, "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator.css, "esModule", !0), F(module.generator, "css/auto", ()=>({})), assertNotNill(module.generator["css/auto"]), D(module.generator["css/auto"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/auto"], "exportsConvention", "as-is"), D(module.generator["css/auto"], "localIdentName", "[uniqueName]-[id]-[local]"), D(module.generator["css/auto"], "esModule", !0), F(module.generator, "css/module", ()=>({})), assertNotNill(module.generator["css/module"]), D(module.generator["css/module"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/module"], "exportsConvention", "as-is"), D(module.generator["css/module"], "localIdentName", "[uniqueName]-[id]-[local]"), D(module.generator["css/module"], "esModule", !0)), A(module, "defaultRules", ()=>{
6584
+ }, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName })=>{
6585
+ if (assertNotNill(module.parser), assertNotNill(module.generator), F(module.parser, "asset", ()=>({})), assertNotNill(module.parser.asset), F(module.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module.parser.asset.dataUrlCondition && D(module.parser.asset.dataUrlCondition, "maxSize", 8096), F(module.parser, "javascript", ()=>({})), assertNotNill(module.parser.javascript), applyJavascriptParserOptionsDefaults(module.parser.javascript), F(module.parser, JSON_MODULE_TYPE, ()=>({})), assertNotNill(module.parser[JSON_MODULE_TYPE]), D(module.parser[JSON_MODULE_TYPE], "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER), F(module.generator, "json", ()=>({})), assertNotNill(module.generator.json), applyJsonGeneratorOptionsDefaults(module.generator.json), css) {
6586
+ F(module.parser, "css", ()=>({})), assertNotNill(module.parser.css), D(module.parser.css, "namedExports", !0), D(module.parser.css, "url", !0), F(module.parser, "css/auto", ()=>({})), assertNotNill(module.parser["css/auto"]), D(module.parser["css/auto"], "namedExports", !0), D(module.parser["css/auto"], "url", !0), F(module.parser, "css/module", ()=>({})), assertNotNill(module.parser["css/module"]), D(module.parser["css/module"], "namedExports", !0), D(module.parser["css/module"], "url", !0), F(module.generator, "css", ()=>({})), assertNotNill(module.generator.css), D(module.generator.css, "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator.css, "esModule", !0), F(module.generator, "css/auto", ()=>({})), assertNotNill(module.generator["css/auto"]), D(module.generator["css/auto"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/auto"], "exportsConvention", "as-is");
6587
+ let localIdentName = uniqueName && uniqueName.length > 0 ? "[uniqueName]-[id]-[local]" : "[id]-[local]";
6588
+ D(module.generator["css/auto"], "localIdentName", localIdentName), D(module.generator["css/auto"], "esModule", !0), F(module.generator, "css/module", ()=>({})), assertNotNill(module.generator["css/module"]), D(module.generator["css/module"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/module"], "exportsConvention", "as-is"), D(module.generator["css/module"], "localIdentName", localIdentName), D(module.generator["css/module"], "esModule", !0);
6589
+ }
6590
+ A(module, "defaultRules", ()=>{
6512
6591
  let esm = {
6513
6592
  type: "javascript/esm",
6514
6593
  resolve: {
@@ -6642,7 +6721,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6642
6721
  if ("ENOENT" !== err.code) throw err.message += `\nwhile determining default 'output.uniqueName' from 'name' in ${pkgPath}`, err;
6643
6722
  return "";
6644
6723
  }
6645
- }), F(output, "devtoolNamespace", ()=>output.uniqueName), F(output, "module", ()=>!!outputModule), D(output, "filename", output.module ? "[name].mjs" : "[name].js"), F(output, "iife", ()=>!output.module), F(output, "chunkFilename", ()=>{
6724
+ }), F(output, "devtoolNamespace", ()=>output.uniqueName), F(output, "module", ()=>!!outputModule);
6725
+ let environment = output.environment, optimistic = (v)=>v || void 0 === v, conditionallyOptimistic = (v, c)=>void 0 === v && c || v;
6726
+ F(environment, "globalThis", ()=>tp?.globalThis), F(environment, "bigIntLiteral", ()=>tp && optimistic(tp.bigIntLiteral)), F(environment, "const", ()=>tp && optimistic(tp.const)), F(environment, "arrowFunction", ()=>tp && optimistic(tp.arrowFunction)), F(environment, "asyncFunction", ()=>tp && optimistic(tp.asyncFunction)), F(environment, "forOf", ()=>tp && optimistic(tp.forOf)), F(environment, "destructuring", ()=>tp && optimistic(tp.destructuring)), F(environment, "optionalChaining", ()=>tp && optimistic(tp.optionalChaining)), F(environment, "nodePrefixForCoreModules", ()=>tp && optimistic(tp.nodePrefixForCoreModules)), F(environment, "templateLiteral", ()=>tp && optimistic(tp.templateLiteral)), F(environment, "dynamicImport", ()=>conditionallyOptimistic(tp?.dynamicImport, output.module)), F(environment, "dynamicImportInWorker", ()=>conditionallyOptimistic(tp?.dynamicImportInWorker, output.module)), F(environment, "module", ()=>conditionallyOptimistic(tp?.module, output.module)), F(environment, "document", ()=>tp && optimistic(tp.document)), D(output, "filename", output.module ? "[name].mjs" : "[name].js"), F(output, "iife", ()=>!output.module), F(output, "chunkFilename", ()=>{
6646
6727
  let filename = output.filename;
6647
6728
  if ("function" != typeof filename) {
6648
6729
  let hasName = filename.includes("[name]"), hasId = filename.includes("[id]"), hasChunkHash = filename.includes("[chunkhash]"), hasContentHash = filename.includes("[contenthash]");
@@ -6661,7 +6742,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6661
6742
  if (tp) {
6662
6743
  let helpMessage = isAffectedByBrowserslist ? "Make sure that your 'browserslist' includes only platforms that support these features or select an appropriate 'target' to allow selecting a chunk format by default. Alternatively specify the 'output.chunkFormat' directly." : "Select an appropriate 'target' to allow selecting one by default, or specify the 'output.chunkFormat' directly.";
6663
6744
  if (output.module) {
6664
- if (tp.dynamicImport) return "module";
6745
+ if (environment.dynamicImport) return "module";
6665
6746
  if (tp.document) return "array-push";
6666
6747
  throw Error(`For the selected environment is no default ESM chunk format available:\nESM exports can be chosen when 'import()' is available.\nJSONP Array push can be chosen when 'document' is available.\n${helpMessage}`);
6667
6748
  }
@@ -6683,9 +6764,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6683
6764
  if (tp.nodeBuiltins) return "async-node";
6684
6765
  break;
6685
6766
  case "module":
6686
- if (tp.dynamicImport) return "import";
6767
+ if (environment.dynamicImport) return "import";
6687
6768
  }
6688
- if (null === tp.require || null === tp.nodeBuiltins || null === tp.document || null === tp.importScripts) return "universal";
6769
+ if ((null === tp.require || null === tp.nodeBuiltins || null === tp.document || null === tp.importScripts) && output.module && environment.dynamicImport) return "universal";
6689
6770
  }
6690
6771
  return !1;
6691
6772
  }), F(output, "workerChunkLoading", ()=>{
@@ -6699,16 +6780,16 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6699
6780
  if (tp.nodeBuiltins) return "async-node";
6700
6781
  break;
6701
6782
  case "module":
6702
- if (tp.dynamicImportInWorker) return "import";
6783
+ if (environment.dynamicImportInWorker) return "import";
6703
6784
  }
6704
- if (null === tp.require || null === tp.nodeBuiltins || null === tp.importScriptsInWorker) return "universal";
6785
+ if ((null === tp.require || null === tp.nodeBuiltins || null === tp.importScriptsInWorker) && output.module && environment.dynamicImport) return "universal";
6705
6786
  }
6706
6787
  return !1;
6707
6788
  }), F(output, "wasmLoading", ()=>{
6708
6789
  if (tp) {
6709
6790
  if (tp.fetchWasm) return "fetch";
6710
6791
  if (tp.nodeBuiltins) return "async-node";
6711
- if (null === tp.nodeBuiltins || null === tp.fetchWasm) return "universal";
6792
+ null === tp.nodeBuiltins || tp.fetchWasm;
6712
6793
  }
6713
6794
  return !1;
6714
6795
  }), F(output, "workerWasmLoading", ()=>output.wasmLoading), F(output, "globalObject", ()=>{
@@ -6737,8 +6818,6 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6737
6818
  let enabledWasmLoadingTypes = new Set();
6738
6819
  return output.wasmLoading && enabledWasmLoadingTypes.add(output.wasmLoading), output.workerWasmLoading && enabledWasmLoadingTypes.add(output.workerWasmLoading), Array.from(enabledWasmLoadingTypes);
6739
6820
  });
6740
- let environment = output.environment, optimistic = (v)=>v || void 0 === v, conditionallyOptimistic = (v, c)=>void 0 === v && c || v;
6741
- F(environment, "globalThis", ()=>tp?.globalThis), F(environment, "bigIntLiteral", ()=>tp && optimistic(tp.bigIntLiteral)), F(environment, "const", ()=>tp && optimistic(tp.const)), F(environment, "arrowFunction", ()=>tp && optimistic(tp.arrowFunction)), F(environment, "asyncFunction", ()=>tp && optimistic(tp.asyncFunction)), F(environment, "forOf", ()=>tp && optimistic(tp.forOf)), F(environment, "destructuring", ()=>tp && optimistic(tp.destructuring)), F(environment, "optionalChaining", ()=>tp && optimistic(tp.optionalChaining)), F(environment, "nodePrefixForCoreModules", ()=>tp && optimistic(tp.nodePrefixForCoreModules)), F(environment, "templateLiteral", ()=>tp && optimistic(tp.templateLiteral)), F(environment, "dynamicImport", ()=>conditionallyOptimistic(tp?.dynamicImport, output.module)), F(environment, "dynamicImportInWorker", ()=>conditionallyOptimistic(tp?.dynamicImportInWorker, output.module)), F(environment, "module", ()=>conditionallyOptimistic(tp?.module, output.module)), F(environment, "document", ()=>tp && optimistic(tp.document));
6742
6821
  }, applyExternalsPresetsDefaults = (externalsPresets, { targetProperties, buildHttp })=>{
6743
6822
  D(externalsPresets, "web", !buildHttp && targetProperties?.web), D(externalsPresets, "node", targetProperties?.node), D(externalsPresets, "electron", targetProperties?.electron), D(externalsPresets, "electronMain", targetProperties?.electron && targetProperties.electronMain), D(externalsPresets, "electronPreload", targetProperties?.electron && targetProperties.electronPreload), D(externalsPresets, "electronRenderer", targetProperties?.electron && targetProperties.electronRenderer), D(externalsPresets, "nwjs", targetProperties?.nwjs);
6744
6823
  }, applyLoaderDefaults = (loader, { targetProperties, environment })=>{
@@ -7403,7 +7482,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7403
7482
  },
7404
7483
  arm: "gnueabihf"
7405
7484
  }
7406
- }, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.3.9", getAddonPlatformArchAbi = ()=>{
7485
+ }, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.3.11", getAddonPlatformArchAbi = ()=>{
7407
7486
  let { platform, arch } = process, binding = "";
7408
7487
  binding += platform;
7409
7488
  let abi = NodePlatformArchToAbi[platform][arch];
@@ -7537,136 +7616,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7537
7616
  };
7538
7617
  })
7539
7618
  };
7540
- };
7541
- class ContextModuleFactoryBeforeResolveData {
7542
- #inner;
7543
- static __from_binding(binding) {
7544
- return new ContextModuleFactoryBeforeResolveData(binding);
7545
- }
7546
- static __to_binding(data) {
7547
- return data.#inner;
7548
- }
7549
- constructor(binding){
7550
- this.#inner = binding, Object.defineProperties(this, {
7551
- context: {
7552
- enumerable: !0,
7553
- get: ()=>binding.context,
7554
- set (val) {
7555
- binding.context = val;
7556
- }
7557
- },
7558
- request: {
7559
- enumerable: !0,
7560
- get: ()=>binding.request,
7561
- set (val) {
7562
- binding.request = val;
7563
- }
7564
- },
7565
- regExp: {
7566
- enumerable: !0,
7567
- get: ()=>binding.regExp,
7568
- set (val) {
7569
- binding.regExp = val;
7570
- }
7571
- },
7572
- recursive: {
7573
- enumerable: !0,
7574
- get: ()=>binding.recursive,
7575
- set (val) {
7576
- binding.recursive = val;
7577
- }
7578
- }
7579
- });
7580
- }
7581
- }
7582
- class ContextModuleFactoryAfterResolveData {
7583
- #inner;
7584
- static __from_binding(binding) {
7585
- return new ContextModuleFactoryAfterResolveData(binding);
7586
- }
7587
- static __to_binding(data) {
7588
- return data.#inner;
7589
- }
7590
- constructor(binding){
7591
- this.#inner = binding, Object.defineProperties(this, {
7592
- resource: {
7593
- enumerable: !0,
7594
- get: ()=>binding.resource,
7595
- set (val) {
7596
- binding.resource = val;
7597
- }
7598
- },
7599
- context: {
7600
- enumerable: !0,
7601
- get: ()=>binding.context,
7602
- set (val) {
7603
- binding.context = val;
7604
- }
7605
- },
7606
- request: {
7607
- enumerable: !0,
7608
- get: ()=>binding.request,
7609
- set (val) {
7610
- binding.request = val;
7611
- }
7612
- },
7613
- regExp: {
7614
- enumerable: !0,
7615
- get: ()=>binding.regExp,
7616
- set (val) {
7617
- binding.regExp = val;
7618
- }
7619
- },
7620
- recursive: {
7621
- enumerable: !0,
7622
- get: ()=>binding.recursive,
7623
- set (val) {
7624
- binding.recursive = val;
7625
- }
7626
- },
7627
- dependencies: {
7628
- enumerable: !0,
7629
- get: ()=>binding.dependencies
7630
- }
7631
- });
7632
- }
7633
- }
7634
- Object.defineProperty(binding_.Module.prototype, "identifier", {
7635
- enumerable: !0,
7636
- configurable: !0,
7637
- value () {
7638
- return this[binding_.MODULE_IDENTIFIER_SYMBOL];
7639
- }
7640
- }), Object.defineProperty(binding_.Module.prototype, "readableIdentifier", {
7641
- enumerable: !0,
7642
- configurable: !0,
7643
- value () {
7644
- return this._readableIdentifier;
7645
- }
7646
- }), Object.defineProperty(binding_.Module.prototype, "originalSource", {
7647
- enumerable: !0,
7648
- configurable: !0,
7649
- value () {
7650
- let originalSource = this._originalSource();
7651
- return originalSource ? JsSource.__from_binding(originalSource) : null;
7652
- }
7653
- }), Object.defineProperty(binding_.Module.prototype, "emitFile", {
7654
- enumerable: !0,
7655
- configurable: !0,
7656
- value (filename, source, assetInfo) {
7657
- return this._emitFile(filename, JsSource.__to_binding(source), assetInfo);
7658
- }
7659
- });
7660
- class CodeGenerationResult {
7661
- #inner;
7662
- constructor(result){
7663
- this.#inner = result;
7664
- }
7665
- get(sourceType) {
7666
- return this.#inner.sources[sourceType];
7667
- }
7668
- }
7669
- let RESERVED_RUNTIME_GLOBALS = new Map();
7619
+ }, RESERVED_RUNTIME_GLOBALS = new Map();
7670
7620
  function __from_binding_runtime_globals(runtimeRequirements) {
7671
7621
  let res = new Set();
7672
7622
  for (let flag of runtimeRequirements.value)flag in RuntimeGlobals ? res.add(RuntimeGlobals[flag]) : res.add(flag);
@@ -7755,7 +7705,17 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7755
7705
  asyncModule: "__webpack_require__.a"
7756
7706
  };
7757
7707
  for (let entry of Object.entries(RuntimeGlobals))RESERVED_RUNTIME_GLOBALS.set(entry[1], entry[0]);
7758
- let isReservedRuntimeGlobal = (r)=>RESERVED_RUNTIME_GLOBALS.has(r), createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>({
7708
+ let isReservedRuntimeGlobal = (r)=>RESERVED_RUNTIME_GLOBALS.has(r);
7709
+ class CodeGenerationResult {
7710
+ #inner;
7711
+ constructor(result){
7712
+ this.#inner = result;
7713
+ }
7714
+ get(sourceType) {
7715
+ return this.#inner.sources[sourceType];
7716
+ }
7717
+ }
7718
+ let createCompilationHooksRegisters = (getCompiler, createTap, createMapTap)=>({
7759
7719
  registerCompilationAdditionalTreeRuntimeRequirementsTaps: createTap(binding_.RegisterJsTapKind.CompilationAdditionalTreeRuntimeRequirements, function() {
7760
7720
  return getCompiler().__internal__get_compilation().hooks.additionalTreeRuntimeRequirements;
7761
7721
  }, function(queried) {
@@ -7816,7 +7776,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7816
7776
  }, function(queried) {
7817
7777
  return function({ entry, id, codegenResults, runtimeModules }) {
7818
7778
  try {
7819
- let __nested_webpack_require_4807_4826__ = (id)=>{
7779
+ let __nested_webpack_require_4944_4963__ = (id)=>{
7820
7780
  let cached = moduleCache[id];
7821
7781
  if (void 0 !== cached) {
7822
7782
  if (cached.error) throw cached.error;
@@ -7830,7 +7790,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7830
7790
  loaded: !1,
7831
7791
  error: void 0
7832
7792
  },
7833
- require: __nested_webpack_require_4807_4826__
7793
+ require: __nested_webpack_require_4944_4963__
7834
7794
  };
7835
7795
  for (let handler of interceptModuleExecution)handler(execOptions);
7836
7796
  let result = codegenResults.map[id]["build time"], moduleObject = execOptions.module;
@@ -7838,11 +7798,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7838
7798
  codeGenerationResult: new CodeGenerationResult(result),
7839
7799
  moduleObject
7840
7800
  }, {
7841
- __webpack_require__: __nested_webpack_require_4807_4826__
7801
+ __webpack_require__: __nested_webpack_require_4944_4963__
7842
7802
  }), "Compilation.hooks.executeModule"), moduleObject.loaded = !0, moduleObject.exports;
7843
- }, moduleCache = __nested_webpack_require_4807_4826__[RuntimeGlobals.moduleCache.replace(`${RuntimeGlobals.require}.`, "")] = {}, interceptModuleExecution = __nested_webpack_require_4807_4826__[RuntimeGlobals.interceptModuleExecution.replace(`${RuntimeGlobals.require}.`, "")] = [];
7844
- for (let runtimeModule of runtimeModules)__nested_webpack_require_4807_4826__(runtimeModule);
7845
- let executeResult = __nested_webpack_require_4807_4826__(entry);
7803
+ }, moduleCache = __nested_webpack_require_4944_4963__[RuntimeGlobals.moduleCache.replace(`${RuntimeGlobals.require}.`, "")] = {}, interceptModuleExecution = __nested_webpack_require_4944_4963__[RuntimeGlobals.interceptModuleExecution.replace(`${RuntimeGlobals.require}.`, "")] = [];
7804
+ for (let runtimeModule of runtimeModules)__nested_webpack_require_4944_4963__(runtimeModule);
7805
+ let executeResult = __nested_webpack_require_4944_4963__(entry);
7846
7806
  getCompiler().__internal__get_module_execution_results_map().set(id, executeResult);
7847
7807
  } catch (e) {
7848
7808
  throw getCompiler().__internal__get_module_execution_results_map().set(id, e), e;
@@ -7996,7 +7956,146 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7996
7956
  });
7997
7957
  };
7998
7958
  })
7999
- }), createContextModuleFactoryHooksRegisters = (getCompiler, createTap, createMapTap)=>({
7959
+ });
7960
+ class ContextModuleFactoryBeforeResolveData {
7961
+ #inner;
7962
+ static __from_binding(binding) {
7963
+ return new ContextModuleFactoryBeforeResolveData(binding);
7964
+ }
7965
+ static __to_binding(data) {
7966
+ return data.#inner;
7967
+ }
7968
+ constructor(binding){
7969
+ this.#inner = binding, Object.defineProperties(this, {
7970
+ context: {
7971
+ enumerable: !0,
7972
+ get: ()=>binding.context,
7973
+ set (val) {
7974
+ binding.context = val;
7975
+ }
7976
+ },
7977
+ request: {
7978
+ enumerable: !0,
7979
+ get: ()=>binding.request,
7980
+ set (val) {
7981
+ binding.request = val;
7982
+ }
7983
+ },
7984
+ regExp: {
7985
+ enumerable: !0,
7986
+ get: ()=>binding.regExp,
7987
+ set (val) {
7988
+ binding.regExp = val;
7989
+ }
7990
+ },
7991
+ recursive: {
7992
+ enumerable: !0,
7993
+ get: ()=>binding.recursive,
7994
+ set (val) {
7995
+ binding.recursive = val;
7996
+ }
7997
+ }
7998
+ });
7999
+ }
8000
+ }
8001
+ class ContextModuleFactoryAfterResolveData {
8002
+ #inner;
8003
+ static __from_binding(binding) {
8004
+ return new ContextModuleFactoryAfterResolveData(binding);
8005
+ }
8006
+ static __to_binding(data) {
8007
+ return data.#inner;
8008
+ }
8009
+ constructor(binding){
8010
+ this.#inner = binding, Object.defineProperties(this, {
8011
+ resource: {
8012
+ enumerable: !0,
8013
+ get: ()=>binding.resource,
8014
+ set (val) {
8015
+ binding.resource = val;
8016
+ }
8017
+ },
8018
+ context: {
8019
+ enumerable: !0,
8020
+ get: ()=>binding.context,
8021
+ set (val) {
8022
+ binding.context = val;
8023
+ }
8024
+ },
8025
+ request: {
8026
+ enumerable: !0,
8027
+ get: ()=>binding.request,
8028
+ set (val) {
8029
+ binding.request = val;
8030
+ }
8031
+ },
8032
+ regExp: {
8033
+ enumerable: !0,
8034
+ get: ()=>binding.regExp,
8035
+ set (val) {
8036
+ binding.regExp = val;
8037
+ }
8038
+ },
8039
+ recursive: {
8040
+ enumerable: !0,
8041
+ get: ()=>binding.recursive,
8042
+ set (val) {
8043
+ binding.recursive = val;
8044
+ }
8045
+ },
8046
+ dependencies: {
8047
+ enumerable: !0,
8048
+ get: ()=>binding.dependencies
8049
+ }
8050
+ });
8051
+ }
8052
+ }
8053
+ let $assets = Symbol("assets");
8054
+ Object.defineProperty(binding_.BuildInfo.prototype, "assets", {
8055
+ enumerable: !0,
8056
+ configurable: !0,
8057
+ get () {
8058
+ if (this._assets[$assets]) return this._assets[$assets];
8059
+ let assets = new Proxy(Object.create(null), {
8060
+ ownKeys: ()=>this._assets.keys(),
8061
+ getOwnPropertyDescriptor: ()=>({
8062
+ enumerable: !0,
8063
+ configurable: !0
8064
+ })
8065
+ });
8066
+ return Object.defineProperty(this._assets, $assets, {
8067
+ enumerable: !1,
8068
+ configurable: !0,
8069
+ value: assets
8070
+ }), assets;
8071
+ }
8072
+ }), Object.defineProperty(binding_.Module.prototype, "identifier", {
8073
+ enumerable: !0,
8074
+ configurable: !0,
8075
+ value () {
8076
+ return this[binding_.MODULE_IDENTIFIER_SYMBOL];
8077
+ }
8078
+ }), Object.defineProperty(binding_.Module.prototype, "readableIdentifier", {
8079
+ enumerable: !0,
8080
+ configurable: !0,
8081
+ value () {
8082
+ return this._readableIdentifier;
8083
+ }
8084
+ }), Object.defineProperty(binding_.Module.prototype, "originalSource", {
8085
+ enumerable: !0,
8086
+ configurable: !0,
8087
+ value () {
8088
+ let originalSource = this._originalSource();
8089
+ return originalSource ? JsSource.__from_binding(originalSource) : null;
8090
+ }
8091
+ }), Object.defineProperty(binding_.Module.prototype, "emitFile", {
8092
+ enumerable: !0,
8093
+ configurable: !0,
8094
+ value (filename, source, assetInfo) {
8095
+ return this._emitFile(filename, JsSource.__to_binding(source), assetInfo);
8096
+ }
8097
+ });
8098
+ let createContextModuleFactoryHooksRegisters = (getCompiler, createTap, createMapTap)=>({
8000
8099
  registerContextModuleFactoryBeforeResolveTaps: createTap(binding_.RegisterJsTapKind.ContextModuleFactoryBeforeResolve, function() {
8001
8100
  return getCompiler().__internal__get_compilation_params().contextModuleFactory.hooks.beforeResolve;
8002
8101
  }, function(queried) {
@@ -8125,7 +8224,132 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8125
8224
  await queried.promise(data, {});
8126
8225
  };
8127
8226
  })
8128
- }), COMPILATION_WEAK_MAP = new WeakMap();
8227
+ }), traceHookPlugin_PLUGIN_NAME = "TraceHookPlugin", makeInterceptorFor = (compilerName, tracer)=>(hookName)=>({
8228
+ register: (tapInfo)=>{
8229
+ let { name, type, fn: internalFn } = tapInfo, newFn = name === traceHookPlugin_PLUGIN_NAME ? internalFn : makeNewTraceTapFn(compilerName, hookName, tracer, {
8230
+ name,
8231
+ type,
8232
+ fn: internalFn
8233
+ });
8234
+ return {
8235
+ ...tapInfo,
8236
+ fn: newFn
8237
+ };
8238
+ }
8239
+ }), interceptAllHooksFor = (instance, tracer, logLabel)=>{
8240
+ if (Reflect.has(instance, "hooks")) for (let hookName of Object.keys(instance.hooks)){
8241
+ let hook = instance.hooks[hookName];
8242
+ hook && !hook._fakeHook && hook.intercept(makeInterceptorFor(logLabel, tracer)(hookName));
8243
+ }
8244
+ }, makeNewTraceTapFn = (compilerName, hookName, tracer, { name: pluginName, type, fn })=>{
8245
+ let name = `${pluginName}:${hookName}`;
8246
+ switch(type){
8247
+ case "promise":
8248
+ return (...args)=>{
8249
+ let id2 = tracer.counter++;
8250
+ return tracer.startAsync({
8251
+ name,
8252
+ id: pluginName,
8253
+ args: {
8254
+ id2,
8255
+ compilerName,
8256
+ hookName,
8257
+ pluginName
8258
+ }
8259
+ }), fn(...args).then((r)=>(tracer.endAsync({
8260
+ name,
8261
+ id: pluginName,
8262
+ args: {
8263
+ id2,
8264
+ compilerName,
8265
+ hookName,
8266
+ pluginName
8267
+ }
8268
+ }), r));
8269
+ };
8270
+ case "async":
8271
+ return (...args)=>{
8272
+ let id2 = tracer.counter++;
8273
+ tracer.startAsync({
8274
+ name,
8275
+ id: pluginName,
8276
+ args: {
8277
+ id2,
8278
+ compilerName,
8279
+ hookName,
8280
+ pluginName
8281
+ }
8282
+ });
8283
+ let callback = args.pop();
8284
+ fn(...args, (...r)=>{
8285
+ tracer.endAsync({
8286
+ name,
8287
+ id: pluginName,
8288
+ args: {
8289
+ id2,
8290
+ compilerName,
8291
+ hookName,
8292
+ pluginName
8293
+ }
8294
+ }), callback(...r);
8295
+ });
8296
+ };
8297
+ case "sync":
8298
+ return (...args)=>{
8299
+ let r, id2 = tracer.counter++;
8300
+ if (name === traceHookPlugin_PLUGIN_NAME) return fn(...args);
8301
+ tracer.startAsync({
8302
+ name,
8303
+ id: pluginName,
8304
+ args: {
8305
+ id2,
8306
+ compilerName,
8307
+ hookName,
8308
+ pluginName
8309
+ }
8310
+ });
8311
+ try {
8312
+ r = fn(...args);
8313
+ } catch (err) {
8314
+ throw tracer.endAsync({
8315
+ name,
8316
+ id: pluginName,
8317
+ args: {
8318
+ id2: compilerName,
8319
+ hookName,
8320
+ pluginName
8321
+ }
8322
+ }), err;
8323
+ }
8324
+ return tracer.endAsync({
8325
+ name,
8326
+ id: pluginName,
8327
+ args: {
8328
+ id2,
8329
+ compilerName,
8330
+ hookName,
8331
+ pluginName
8332
+ }
8333
+ }), r;
8334
+ };
8335
+ default:
8336
+ return fn;
8337
+ }
8338
+ }, compilerId = 0;
8339
+ class TraceHookPlugin {
8340
+ name = traceHookPlugin_PLUGIN_NAME;
8341
+ apply(compiler) {
8342
+ let compilerName = compiler.name || (compilerId++).toString();
8343
+ for (let hookName of Object.keys(compiler.hooks)){
8344
+ let hook = compiler.hooks[hookName];
8345
+ hook && hook.intercept(makeInterceptorFor(compilerName, JavaScriptTracer)(hookName));
8346
+ }
8347
+ compiler.hooks.compilation.tap(traceHookPlugin_PLUGIN_NAME, (compilation, { normalModuleFactory, contextModuleFactory })=>{
8348
+ interceptAllHooksFor(compilation, JavaScriptTracer, "Compilation"), interceptAllHooksFor(normalModuleFactory, JavaScriptTracer, "Normal Module Factory"), interceptAllHooksFor(contextModuleFactory, JavaScriptTracer, "Context Module Factory");
8349
+ });
8350
+ }
8351
+ }
8352
+ let COMPILATION_WEAK_MAP = new WeakMap();
8129
8353
  class Compiler {
8130
8354
  #instance;
8131
8355
  #initial;
@@ -8250,7 +8474,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8250
8474
  "entry"
8251
8475
  ]),
8252
8476
  additionalPass: new lite_tapable_namespaceObject.AsyncSeriesHook([])
8253
- }, this.webpack = src_rspack, this.rspack = src_rspack, this.root = this, this.outputPath = "", this.inputFileSystem = null, this.intermediateFileSystem = null, this.outputFileSystem = null, this.watchFileSystem = null, this.records = {}, this.options = options, this.context = context, this.cache = new Cache_Cache(), this.compilerPath = "", this.running = !1, this.idle = !1, this.watchMode = !1, this.resolverFactory = new ResolverFactory(options.resolve.pnp ?? getPnpDefault()), new JsLoaderRspackPlugin(this).apply(this), new ExecuteModulePlugin().apply(this);
8477
+ }, this.webpack = src_rspack, this.rspack = src_rspack, this.root = this, this.outputPath = "", this.inputFileSystem = null, this.intermediateFileSystem = null, this.outputFileSystem = null, this.watchFileSystem = null, this.records = {}, this.options = options, this.context = context, this.cache = new Cache_Cache(), this.compilerPath = "", this.running = !1, this.idle = !1, this.watchMode = !1, this.resolverFactory = new ResolverFactory(options.resolve.pnp ?? getPnpDefault()), new JsLoaderRspackPlugin(this).apply(this), new ExecuteModulePlugin().apply(this), new TraceHookPlugin().apply(this);
8254
8478
  }
8255
8479
  get recordsInputPath() {
8256
8480
  return unsupported("Compiler.recordsInputPath");
@@ -8307,7 +8531,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8307
8531
  let startTime = Date.now();
8308
8532
  this.running = !0;
8309
8533
  let instanceBinding = __webpack_require__("@rspack/binding"), isRuntimeShutdown = !1, finalCallback = (err, stats)=>{
8310
- this.idle = !0, this.cache.beginIdle(), this.idle = !0, this.running = !1, err && this.hooks.failed.call(err), callback && callback(err, stats), this.hooks.afterDone.call(stats), instanceBinding.shutdownAsyncRuntime();
8534
+ this.idle = !0, this.cache.beginIdle(), this.idle = !0, this.running = !1, err && this.hooks.failed.call(err), callback && callback(err, stats), this.hooks.afterDone.call(stats), instanceBinding.shutdownAsyncRuntime(), instanceBinding.cleanupGlobalTrace();
8311
8535
  }, onCompiled = (err, _compilation)=>{
8312
8536
  if (err) return finalCallback(err);
8313
8537
  if (_compilation.hooks.needAdditionalPass.call()) {
@@ -8581,7 +8805,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8581
8805
  obj.children = this.stats.map((stat, idx)=>{
8582
8806
  let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
8583
8807
  return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
8584
- }), childOptions.version && (obj.rspackVersion = "1.3.9", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
8808
+ }), childOptions.version && (obj.rspackVersion = "1.3.11", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
8585
8809
  let mapError = (j, obj)=>({
8586
8810
  ...obj,
8587
8811
  compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
@@ -9471,7 +9695,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9471
9695
  object.hash = context.getStatsCompilation(compilation).hash;
9472
9696
  },
9473
9697
  version: (object)=>{
9474
- object.version = "5.75.0", object.rspackVersion = "1.3.9";
9698
+ object.version = "5.75.0", object.rspackVersion = "1.3.11";
9475
9699
  },
9476
9700
  env: (object, _compilation, _context, { _env })=>{
9477
9701
  object.env = _env;
@@ -9483,6 +9707,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9483
9707
  object.builtAt = compilation.endTime;
9484
9708
  },
9485
9709
  publicPath: (object, compilation)=>{
9710
+ if ("function" == typeof compilation.outputOptions.publicPath) throw new DeadlockRiskError("publicPath as function can't be used with stats.publicPath=true, which may cause deadlock risk, consider setting stats.publicPath=false in rspack config");
9486
9711
  object.publicPath = compilation.getPath(compilation.outputOptions.publicPath || "");
9487
9712
  },
9488
9713
  outputPath: (object, compilation)=>{
@@ -11917,7 +12142,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
11917
12142
  }), entryStatic = zod_index_js_namespaceObject.z.record(entryItem.or(entryDescription)).or(entryItem), entryDynamic = zod_index_js_namespaceObject.z.function().returns(entryStatic.or(zod_index_js_namespaceObject.z.promise(entryStatic))), zod_entry = entryStatic.or(entryDynamic), zod_path = zod_index_js_namespaceObject.z.string(), pathinfo = zod_index_js_namespaceObject.z.boolean().or(zod_index_js_namespaceObject.z.literal("verbose")), webassemblyModuleFilename = zod_index_js_namespaceObject.z.string(), zod_crossOriginLoading = zod_index_js_namespaceObject.z.literal(!1).or(zod_index_js_namespaceObject.z.enum([
11918
12143
  "anonymous",
11919
12144
  "use-credentials"
11920
- ])), hotUpdateGlobal = zod_index_js_namespaceObject.z.string(), uniqueName = zod_index_js_namespaceObject.z.string(), chunkLoadingGlobal = zod_index_js_namespaceObject.z.string(), zod_enabledLibraryTypes = zod_index_js_namespaceObject.z.array(libraryType), clean = zod_index_js_namespaceObject.z.union([
12145
+ ])), hotUpdateGlobal = zod_index_js_namespaceObject.z.string(), zod_uniqueName = zod_index_js_namespaceObject.z.string(), chunkLoadingGlobal = zod_index_js_namespaceObject.z.string(), zod_enabledLibraryTypes = zod_index_js_namespaceObject.z.array(libraryType), clean = zod_index_js_namespaceObject.z.union([
11921
12146
  zod_index_js_namespaceObject.z.boolean(),
11922
12147
  zod_index_js_namespaceObject.z.strictObject({
11923
12148
  keep: zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.string()).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.boolean())).optional()
@@ -11966,7 +12191,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
11966
12191
  hotUpdateChunkFilename: filenameTemplate.optional(),
11967
12192
  hotUpdateGlobal: hotUpdateGlobal.optional(),
11968
12193
  assetModuleFilename: zod_filename.optional(),
11969
- uniqueName: uniqueName.optional(),
12194
+ uniqueName: zod_uniqueName.optional(),
11970
12195
  chunkLoadingGlobal: chunkLoadingGlobal.optional(),
11971
12196
  enabledLibraryTypes: zod_enabledLibraryTypes.optional(),
11972
12197
  library: zod_library.optional(),
@@ -12147,12 +12372,15 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12147
12372
  maxSize: zod_index_js_namespaceObject.z.number().optional()
12148
12373
  }), assetParserOptions = zod_index_js_namespaceObject.z.strictObject({
12149
12374
  dataUrlCondition: assetParserDataUrlOptions.optional()
12150
- }), cssParserNamedExports = zod_index_js_namespaceObject.z.boolean(), cssParserOptions = zod_index_js_namespaceObject.z.strictObject({
12151
- namedExports: cssParserNamedExports.optional()
12375
+ }), cssParserNamedExports = zod_index_js_namespaceObject.z.boolean(), cssParserUrl = zod_index_js_namespaceObject.z.boolean(), cssParserOptions = zod_index_js_namespaceObject.z.strictObject({
12376
+ namedExports: cssParserNamedExports.optional(),
12377
+ url: cssParserUrl.optional()
12152
12378
  }), cssAutoParserOptions = zod_index_js_namespaceObject.z.strictObject({
12153
- namedExports: cssParserNamedExports.optional()
12379
+ namedExports: cssParserNamedExports.optional(),
12380
+ url: cssParserUrl.optional()
12154
12381
  }), cssModuleParserOptions = zod_index_js_namespaceObject.z.strictObject({
12155
- namedExports: cssParserNamedExports.optional()
12382
+ namedExports: cssParserNamedExports.optional(),
12383
+ url: cssParserUrl.optional()
12156
12384
  }), dynamicImportMode = zod_index_js_namespaceObject.z.enum([
12157
12385
  "eager",
12158
12386
  "lazy",
@@ -12215,7 +12443,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12215
12443
  "javascript/auto": javascriptParserOptions.optional(),
12216
12444
  "javascript/dynamic": javascriptParserOptions.optional(),
12217
12445
  "javascript/esm": javascriptParserOptions.optional()
12218
- }), parserOptionsByModuleTypeUnknown = zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.any())), parserOptionsByModuleType = parserOptionsByModuleTypeKnown.or(parserOptionsByModuleTypeUnknown), assetGeneratorDataUrlOptions = zod_index_js_namespaceObject.z.strictObject({
12446
+ }), assetGeneratorDataUrlOptions = zod_index_js_namespaceObject.z.strictObject({
12219
12447
  encoding: zod_index_js_namespaceObject.z.literal(!1).or(zod_index_js_namespaceObject.z.literal("base64")).optional(),
12220
12448
  mimetype: zod_index_js_namespaceObject.z.string().optional()
12221
12449
  }), assetGeneratorDataUrlFunction = zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.instanceof(Buffer), zod_index_js_namespaceObject.z.strictObject({
@@ -12226,7 +12454,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12226
12454
  }), assetResourceGeneratorOptions = zod_index_js_namespaceObject.z.strictObject({
12227
12455
  emit: zod_index_js_namespaceObject.z.boolean().optional(),
12228
12456
  filename: zod_filename.optional(),
12229
- publicPath: zod_publicPath.optional()
12457
+ publicPath: zod_publicPath.optional(),
12458
+ outputPath: zod_filename.optional()
12230
12459
  }), assetGeneratorOptions = assetInlineGeneratorOptions.merge(assetResourceGeneratorOptions), cssGeneratorExportsConvention = zod_index_js_namespaceObject.z.enum([
12231
12460
  "as-is",
12232
12461
  "camel-case",
@@ -12256,11 +12485,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12256
12485
  "css/auto": cssAutoGeneratorOptions.optional(),
12257
12486
  "css/module": cssModuleGeneratorOptions.optional(),
12258
12487
  json: jsonGeneratorOptions.optional()
12259
- }), generatorOptionsByModuleTypeUnknown = zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.any())), generatorOptionsByModuleType = generatorOptionsByModuleTypeKnown.or(generatorOptionsByModuleTypeUnknown), noParseOptionSingle = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.boolean())), noParseOption = noParseOptionSingle.or(zod_index_js_namespaceObject.z.array(noParseOptionSingle)), moduleOptions = zod_index_js_namespaceObject.z.strictObject({
12488
+ }), noParseOptionSingle = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.boolean())), noParseOption = noParseOptionSingle.or(zod_index_js_namespaceObject.z.array(noParseOptionSingle)), moduleOptions = zod_index_js_namespaceObject.z.strictObject({
12260
12489
  defaultRules: ruleSetRules.optional(),
12261
12490
  rules: ruleSetRules.optional(),
12262
- parser: parserOptionsByModuleType.optional(),
12263
- generator: generatorOptionsByModuleType.optional(),
12491
+ parser: parserOptionsByModuleTypeKnown.optional(),
12492
+ generator: generatorOptionsByModuleTypeKnown.optional(),
12264
12493
  noParse: noParseOption.optional()
12265
12494
  }), allowTarget = zod_index_js_namespaceObject.z.union([
12266
12495
  zod_index_js_namespaceObject.z.enum([
@@ -13130,7 +13359,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
13130
13359
  let _options = JSON.stringify(options || {});
13131
13360
  return binding_default().transform(source, _options);
13132
13361
  }
13133
- let exports_rspackVersion = "1.3.9", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
13362
+ let exports_rspackVersion = "1.3.11", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
13134
13363
  getNormalizedRspackOptions: getNormalizedRspackOptions,
13135
13364
  applyRspackOptionsDefaults: applyRspackOptionsDefaults,
13136
13365
  getNormalizedWebpackOptions: getNormalizedRspackOptions,
@@ -13211,7 +13440,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
13211
13440
  }, exports_experiments = {
13212
13441
  globalTrace: {
13213
13442
  async register (filter, layer, output) {
13214
- JavaScriptTracer.initJavaScriptTrace(layer, output), (0, binding_.registerGlobalTrace)(filter, layer, output), JavaScriptTracer.initCpuProfiler();
13443
+ await JavaScriptTracer.initJavaScriptTrace(layer, output), (0, binding_.registerGlobalTrace)(filter, layer, output), JavaScriptTracer.initCpuProfiler();
13215
13444
  },
13216
13445
  async cleanup () {
13217
13446
  (0, binding_.cleanupGlobalTrace)(), JavaScriptTracer.cleanupJavaScriptTrace();
@@ -13237,7 +13466,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
13237
13466
  swc: {
13238
13467
  minify: minify,
13239
13468
  transform: transform
13240
- }
13469
+ },
13470
+ CssChunkingPlugin: CssChunkingPlugin
13241
13471
  };
13242
13472
  function createCompiler(userOptions) {
13243
13473
  let options = getNormalizedRspackOptions(userOptions);