@rspack/core 1.6.0 → 1.6.2

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
@@ -243,21 +243,6 @@ var __webpack_modules__ = {
243
243
  },
244
244
  process: function(module1) {
245
245
  module1.exports = require("process");
246
- },
247
- tinypool: function(module1) {
248
- module1.exports = import("../compiled/tinypool/dist/index.js").then(function(module1) {
249
- return module1;
250
- });
251
- },
252
- "node:inspector": function(module1) {
253
- module1.exports = import("node:inspector").then(function(module1) {
254
- return module1;
255
- });
256
- },
257
- "node:worker_threads": function(module1) {
258
- module1.exports = import("node:worker_threads").then(function(module1) {
259
- return module1;
260
- });
261
246
  }
262
247
  }, __webpack_module_cache__ = {};
263
248
  function __webpack_require__(moduleId) {
@@ -289,75 +274,75 @@ var __webpack_exports__ = {};
289
274
  for(var __webpack_i__ in (()=>{
290
275
  let createMd4, createXxhash64, service_pool, loadLoader_url;
291
276
  __webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
292
- CopyRspackPlugin: ()=>CopyRspackPlugin,
293
- RuntimePlugin: ()=>RuntimePlugin,
277
+ EntryPlugin: ()=>EntryPlugin,
278
+ version: ()=>exports_version,
279
+ webworker: ()=>webworker,
294
280
  RspackOptionsApply: ()=>RspackOptionsApply,
295
- SourceMapDevToolPlugin: ()=>SourceMapDevToolPlugin,
296
- AsyncDependenciesBlock: ()=>binding_.AsyncDependenciesBlock,
297
- electron: ()=>electron,
298
- ExternalModule: ()=>binding_.ExternalModule,
299
- Stats: ()=>Stats,
300
- LoaderOptionsPlugin: ()=>LoaderOptionsPlugin,
301
- Template: ()=>Template,
302
- Compilation: ()=>Compilation,
303
- IgnorePlugin: ()=>IgnorePlugin,
304
- ContextModule: ()=>binding_.ContextModule,
305
- WebpackError: ()=>exports_WebpackError,
306
- RuntimeGlobals: ()=>RuntimeGlobals,
307
281
  DynamicEntryPlugin: ()=>DynamicEntryPlugin,
308
- EntryPlugin: ()=>EntryPlugin,
282
+ NoEmitOnErrorsPlugin: ()=>NoEmitOnErrorsPlugin,
283
+ Stats: ()=>Stats,
309
284
  EntryDependency: ()=>binding_.EntryDependency,
310
- DllReferencePlugin: ()=>DllReferencePlugin,
311
- HotModuleReplacementPlugin: ()=>HotModuleReplacementPlugin,
312
- Dependency: ()=>binding_.Dependency,
313
- LoaderTargetPlugin: ()=>LoaderTargetPlugin,
314
- container: ()=>container,
315
- EvalDevToolModulePlugin: ()=>EvalDevToolModulePlugin,
285
+ BannerPlugin: ()=>BannerPlugin,
286
+ ExternalsPlugin: ()=>ExternalsPlugin,
287
+ MultiStats: ()=>MultiStats,
316
288
  SwcJsMinimizerRspackPlugin: ()=>SwcJsMinimizerRspackPlugin,
317
- MultiCompiler: ()=>MultiCompiler,
318
- EntryOptionPlugin: ()=>lib_EntryOptionPlugin,
289
+ ContextModule: ()=>binding_.ContextModule,
290
+ DllPlugin: ()=>DllPlugin,
291
+ WarnCaseSensitiveModulesPlugin: ()=>WarnCaseSensitiveModulesPlugin,
292
+ ProvidePlugin: ()=>ProvidePlugin,
293
+ Template: ()=>Template,
294
+ container: ()=>container,
295
+ HtmlRspackPlugin: ()=>HtmlRspackPlugin,
319
296
  javascript: ()=>javascript,
320
- sources: ()=>sources,
321
- EvalSourceMapDevToolPlugin: ()=>EvalSourceMapDevToolPlugin,
322
- ContextReplacementPlugin: ()=>ContextReplacementPlugin,
297
+ EvalDevToolModulePlugin: ()=>EvalDevToolModulePlugin,
298
+ NormalModuleReplacementPlugin: ()=>NormalModuleReplacementPlugin,
299
+ WebpackOptionsApply: ()=>RspackOptionsApply,
323
300
  EnvironmentPlugin: ()=>EnvironmentPlugin,
324
- NoEmitOnErrorsPlugin: ()=>NoEmitOnErrorsPlugin,
301
+ HotModuleReplacementPlugin: ()=>HotModuleReplacementPlugin,
302
+ Compilation: ()=>Compilation,
303
+ experiments: ()=>exports_experiments,
304
+ CircularDependencyRspackPlugin: ()=>CircularDependencyRspackPlugin,
305
+ EvalSourceMapDevToolPlugin: ()=>EvalSourceMapDevToolPlugin,
306
+ RuntimePlugin: ()=>RuntimePlugin,
307
+ Dependency: ()=>binding_.Dependency,
308
+ DllReferencePlugin: ()=>DllReferencePlugin,
309
+ IgnorePlugin: ()=>IgnorePlugin,
310
+ StatsErrorCode: ()=>statsFactoryUtils_StatsErrorCode,
311
+ sources: ()=>sources,
325
312
  ValidationError: ()=>ValidationError,
326
- LightningCssMinimizerRspackPlugin: ()=>LightningCssMinimizerRspackPlugin,
327
- default: ()=>src_0,
313
+ ConcatenatedModule: ()=>binding_.ConcatenatedModule,
314
+ AsyncDependenciesBlock: ()=>binding_.AsyncDependenciesBlock,
328
315
  web: ()=>web,
316
+ default: ()=>src_0,
317
+ LoaderTargetPlugin: ()=>LoaderTargetPlugin,
318
+ WebpackError: ()=>exports_WebpackError,
319
+ RuntimeModule: ()=>RuntimeModule,
329
320
  sharing: ()=>sharing,
330
- CircularDependencyRspackPlugin: ()=>CircularDependencyRspackPlugin,
331
- NormalModule: ()=>binding_.NormalModule,
332
321
  config: ()=>exports_config,
322
+ ContextReplacementPlugin: ()=>ContextReplacementPlugin,
323
+ NormalModule: ()=>binding_.NormalModule,
324
+ LightningCssMinimizerRspackPlugin: ()=>LightningCssMinimizerRspackPlugin,
325
+ LoaderOptionsPlugin: ()=>LoaderOptionsPlugin,
326
+ EntryOptionPlugin: ()=>lib_EntryOptionPlugin,
327
+ Compiler: ()=>Compiler,
328
+ DefinePlugin: ()=>DefinePlugin,
333
329
  ModuleFilenameHelpers: ()=>ModuleFilenameHelpers_namespaceObject,
334
- webworker: ()=>webworker,
335
- experiments: ()=>exports_experiments,
336
- RuntimeModule: ()=>RuntimeModule,
330
+ MultiCompiler: ()=>MultiCompiler,
331
+ SourceMapDevToolPlugin: ()=>SourceMapDevToolPlugin,
337
332
  library: ()=>exports_library,
338
333
  node: ()=>exports_node,
339
- HtmlRspackPlugin: ()=>HtmlRspackPlugin,
340
- WarnCaseSensitiveModulesPlugin: ()=>WarnCaseSensitiveModulesPlugin,
334
+ RuntimeGlobals: ()=>RuntimeGlobals,
335
+ rspackVersion: ()=>exports_rspackVersion,
341
336
  util: ()=>util,
342
- ConcatenatedModule: ()=>binding_.ConcatenatedModule,
343
337
  optimize: ()=>optimize,
344
- ProvidePlugin: ()=>ProvidePlugin,
345
- rspackVersion: ()=>exports_rspackVersion,
346
- DllPlugin: ()=>DllPlugin,
347
- CssExtractRspackPlugin: ()=>CssExtractRspackPlugin,
348
- DefinePlugin: ()=>DefinePlugin,
349
- BannerPlugin: ()=>BannerPlugin,
350
- ProgressPlugin: ()=>ProgressPlugin,
351
- StatsErrorCode: ()=>statsFactoryUtils_StatsErrorCode,
352
- MultiStats: ()=>MultiStats,
338
+ ExternalModule: ()=>binding_.ExternalModule,
339
+ electron: ()=>electron,
353
340
  Module: ()=>binding_.Module,
354
- WebpackOptionsApply: ()=>RspackOptionsApply,
355
- NormalModuleReplacementPlugin: ()=>NormalModuleReplacementPlugin,
356
- ExternalsPlugin: ()=>ExternalsPlugin,
357
- rspack: ()=>src_rspack,
358
- Compiler: ()=>Compiler,
341
+ CopyRspackPlugin: ()=>CopyRspackPlugin,
342
+ rspack: ()=>src_rspack_0,
343
+ CssExtractRspackPlugin: ()=>CssExtractRspackPlugin,
359
344
  wasm: ()=>exports_wasm,
360
- version: ()=>exports_version
345
+ ProgressPlugin: ()=>ProgressPlugin
361
346
  });
362
347
  var StatsErrorCode, _computedKey, _computedKey1, _computedKey2, ArrayQueue_computedKey, browserslistTargetHandler_namespaceObject = {};
363
348
  __webpack_require__.r(browserslistTargetHandler_namespaceObject), __webpack_require__.d(browserslistTargetHandler_namespaceObject, {
@@ -449,7 +434,7 @@ for(var __webpack_i__ in (()=>{
449
434
  return -1 === nextLine ? stack === message ? "" : stack : stack.slice(0, nextLine) === `${name}: ${message}` ? stack.slice(nextLine + 1) : stack;
450
435
  }, external_node_util_namespaceObject = require("node:util");
451
436
  var external_node_util_default = __webpack_require__.n(external_node_util_namespaceObject);
452
- class WebpackError_WebpackError extends Error {
437
+ class WebpackError extends Error {
453
438
  loc;
454
439
  file;
455
440
  chunk;
@@ -457,14 +442,14 @@ for(var __webpack_i__ in (()=>{
457
442
  details;
458
443
  hideStack;
459
444
  }
460
- Object.defineProperty(WebpackError_WebpackError.prototype, external_node_util_namespaceObject.inspect.custom, {
445
+ Object.defineProperty(WebpackError.prototype, external_node_util_namespaceObject.inspect.custom, {
461
446
  value: function() {
462
447
  return this.stack + (this.details ? `\n${this.details}` : "");
463
448
  },
464
449
  enumerable: !1,
465
450
  configurable: !0
466
451
  });
467
- let WebpackError = WebpackError_WebpackError, LogType = Object.freeze({
452
+ let lib_WebpackError = WebpackError, LogType = Object.freeze({
468
453
  error: "error",
469
454
  warn: "warn",
470
455
  info: "info",
@@ -1902,13 +1887,13 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
1902
1887
  let cbs = this.#cbs;
1903
1888
  this.#cbs = [], this.#inner(args, (wholeErr, results)=>{
1904
1889
  if (0 !== this.#args.length && queueMicrotask(this.#execute.bind(this)), wholeErr) {
1905
- let webpackError = new WebpackError(wholeErr.message);
1890
+ let webpackError = new lib_WebpackError(wholeErr.message);
1906
1891
  for (let cb of cbs)cb(webpackError);
1907
1892
  return;
1908
1893
  }
1909
1894
  for(let i = 0; i < results.length; i++){
1910
1895
  let [errMsg, module1] = results[i];
1911
- (0, cbs[i])(errMsg ? new WebpackError(errMsg) : null, module1);
1896
+ (0, cbs[i])(errMsg ? new lib_WebpackError(errMsg) : null, module1);
1912
1897
  }
1913
1898
  });
1914
1899
  };
@@ -2304,7 +2289,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
2304
2289
  if (!function(options, logger) {
2305
2290
  options.optimization.concatenateModules = !1, options.output.chunkFormat = !1, options.output.chunkLoading && "import" !== options.output.chunkLoading && (logger.warn(`\`output.chunkLoading\` should be \`"import"\` or \`false\`, but got ${options.output.chunkLoading}, changed it to \`"import"\``), options.output.chunkLoading = "import"), void 0 === options.output.chunkLoading && (options.output.chunkLoading = "import"), options.output.library && (options.output.library = void 0);
2306
2291
  let { splitChunks } = options.optimization;
2307
- splitChunks && (splitChunks.chunks = "all", splitChunks.minSize = 0, splitChunks.maxAsyncRequests = 1 / 0, splitChunks.maxInitialRequests = 1 / 0, splitChunks.cacheGroups && (splitChunks.cacheGroups.default = !1, splitChunks.cacheGroups.defaultVendors = !1));
2292
+ void 0 === splitChunks && (splitChunks = options.optimization.splitChunks = {}), !1 !== splitChunks && (splitChunks.chunks = "all", splitChunks.minSize = 0, splitChunks.maxAsyncRequests = 1 / 0, splitChunks.maxInitialRequests = 1 / 0, splitChunks.cacheGroups ??= {}, splitChunks.cacheGroups.default = !1, splitChunks.cacheGroups.defaultVendors = !1);
2308
2293
  }(compiler.options, logger), new RemoveDuplicateModulesPlugin().apply(compiler), err = (config = compiler.options).optimization.concatenateModules ? "You should disable `config.optimization.concatenateModules`" : !1 !== config.output.chunkFormat ? "You should disable default chunkFormat by `config.output.chunkFormat = false`" : void 0) throw new src_0.WebpackError(`Conflicted config for ${EsmLibraryPlugin.PLUGIN_NAME}: ${err}`);
2309
2294
  compiler.__internal__registerBuiltinPlugin({
2310
2295
  name: binding_.BuiltinPluginName.EsmLibraryPlugin,
@@ -2653,7 +2638,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
2653
2638
  static session;
2654
2639
  static counter = 10000;
2655
2640
  static async initJavaScriptTrace(layer, output) {
2656
- let { Session } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "node:inspector"));
2641
+ let { Session } = await import("node:inspector");
2657
2642
  this.session = new Session(), this.layer = layer, this.output = output, this.events = [], this.state = "on", this.startTime = process.hrtime.bigint();
2658
2643
  }
2659
2644
  static uuid() {
@@ -2756,7 +2741,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
2756
2741
  this.message = match?.[1] ? createMessage(match[1]) : createMessage();
2757
2742
  }
2758
2743
  }
2759
- class AbstractMethodError extends WebpackError {
2744
+ class AbstractMethodError extends lib_WebpackError {
2760
2745
  constructor(){
2761
2746
  super(new Message().message), this.name = "AbstractMethodError";
2762
2747
  }
@@ -2948,19 +2933,19 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
2948
2933
  var stack, name, message;
2949
2934
  return err && "object" == typeof err && err.stack ? (stack = err.stack, name = err.name, message = err.message, cutOffLoaderExecution(stack), cutOffMessage(stack, name, message)) : void 0;
2950
2935
  };
2951
- class ModuleError extends WebpackError {
2936
+ class ModuleError extends lib_WebpackError {
2952
2937
  error;
2953
2938
  constructor(err, { from } = {}){
2954
2939
  super(ModuleError_createMessage(err, "Error", from)), this.name = "ModuleError", this.error = err, this.details = getErrorDetails(err);
2955
2940
  }
2956
2941
  }
2957
- class ModuleWarning extends WebpackError {
2942
+ class ModuleWarning extends lib_WebpackError {
2958
2943
  error;
2959
2944
  constructor(err, { from } = {}){
2960
2945
  super(ModuleError_createMessage(err, "Warning", from)), this.name = "ModuleWarning", this.error = err, this.details = getErrorDetails(err);
2961
2946
  }
2962
2947
  }
2963
- let ensureLoaderWorkerPool = async ()=>service_pool || (service_pool = Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "tinypool")).then(({ Tinypool })=>{
2948
+ let ensureLoaderWorkerPool = async ()=>service_pool || (service_pool = import("../compiled/tinypool/dist/index.js").then(({ Tinypool })=>{
2964
2949
  let availableThreads = Math.max(__webpack_require__("node:os").cpus().length - 1, 1);
2965
2950
  return new Tinypool({
2966
2951
  filename: external_node_path_default().resolve(__dirname, "worker.js"),
@@ -2984,7 +2969,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
2984
2969
  throw Error("Failed to serialize error, only string, Error instances and objects with a message property are supported");
2985
2970
  }
2986
2971
  let service_run = async (loaderName, task, options)=>ensureLoaderWorkerPool().then(async (pool)=>{
2987
- let { MessageChannel } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "node:worker_threads")), { port1: mainPort, port2: workerPort } = new MessageChannel(), { port1: mainSyncPort, port2: workerSyncPort } = new MessageChannel();
2972
+ let { MessageChannel } = await import("node:worker_threads"), { port1: mainPort, port2: workerPort } = new MessageChannel(), { port1: mainSyncPort, port2: workerSyncPort } = new MessageChannel();
2988
2973
  return new Promise((resolve, reject)=>{
2989
2974
  let handleError = (error)=>{
2990
2975
  mainPort.close(), mainSyncPort.close(), reject(error);
@@ -5747,7 +5732,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
5747
5732
  }, applyExperimentsDefaults = (experiments, { development })=>{
5748
5733
  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, "deferImport", !1), 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);
5749
5734
  }, applybundlerInfoDefaults = (rspackFuture, library)=>{
5750
- "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.6.0"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
5735
+ "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.6.2"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
5751
5736
  }, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module1, { cache, asyncWebAssembly, css, targetProperties, mode, uniqueName, usedExports, inlineConst, deferImport })=>{
5752
5737
  if (assertNotNill(module1.parser), assertNotNill(module1.generator), cache ? D(module1, "unsafeCache", /[\\/]node_modules[\\/]/) : D(module1, "unsafeCache", !1), F(module1.parser, "asset", ()=>({})), assertNotNill(module1.parser.asset), F(module1.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module1.parser.asset.dataUrlCondition && D(module1.parser.asset.dataUrlCondition, "maxSize", 8096), F(module1.parser, "javascript", ()=>({})), assertNotNill(module1.parser.javascript), ((parserOptions, { usedExports, inlineConst, deferImport })=>{
5753
5738
  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", [
@@ -6356,7 +6341,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6356
6341
  plugins: nestedArray(config.plugins, (p)=>[
6357
6342
  ...p
6358
6343
  ]),
6359
- 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.")(), {
6344
+ 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.")(), experiments.parallelCodeSplitting && external_node_util_default().deprecate(()=>{}, "`experiments.parallelCodeSplitting` config has been deprecated and will be removed in next minor. It has huge regression in some edge cases where the chunk graph has lots of cycles, we'll improve the performance of build_chunk_graph in the future instead")(), {
6360
6345
  ...experiments,
6361
6346
  cache: optionalNestedConfig(experiments.cache, (cache)=>{
6362
6347
  if ("boolean" == typeof cache || "memory" === cache.type) return cache;
@@ -6730,7 +6715,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6730
6715
  return new this(fs);
6731
6716
  }
6732
6717
  }
6733
- class HookWebpackError extends WebpackError {
6718
+ class HookWebpackError extends lib_WebpackError {
6734
6719
  hook;
6735
6720
  error;
6736
6721
  constructor(error, hook){
@@ -6738,7 +6723,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6738
6723
  }
6739
6724
  }
6740
6725
  let makeWebpackErrorCallback = (callback, hook)=>(err, result)=>{
6741
- err ? err instanceof WebpackError ? callback(err) : callback(new HookWebpackError(err, hook)) : callback(null, result);
6726
+ err ? err instanceof lib_WebpackError ? callback(err) : callback(new HookWebpackError(err, hook)) : callback(null, result);
6742
6727
  };
6743
6728
  class Cache {
6744
6729
  static STAGE_DISK = 10;
@@ -6770,7 +6755,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6770
6755
  let gotHandlers = [];
6771
6756
  this.hooks.get.callAsync(identifier, etag, gotHandlers, (err, res)=>{
6772
6757
  var error, hook, times, callback1;
6773
- if (err) return void callback((hook = "Cache.hooks.get", (error = err) instanceof WebpackError ? error : new HookWebpackError(error, hook)));
6758
+ if (err) return void callback((hook = "Cache.hooks.get", (error = err) instanceof lib_WebpackError ? error : new HookWebpackError(error, hook)));
6774
6759
  let result = res;
6775
6760
  if (null === result && (result = void 0), gotHandlers.length > 1) {
6776
6761
  let leftTimes, innerCallback = (times = gotHandlers.length, callback1 = ()=>callback(null, result), leftTimes = times, (err)=>0 == --leftTimes ? callback1() : err && leftTimes > 0 ? (leftTimes = 0, callback1()) : void 0);
@@ -6864,7 +6849,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6864
6849
  return await this.storePromise(result), result;
6865
6850
  }
6866
6851
  }
6867
- class CacheFacade_CacheFacade {
6852
+ class CacheFacade {
6868
6853
  _name;
6869
6854
  _cache;
6870
6855
  _hashFunction;
@@ -6872,7 +6857,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6872
6857
  this._cache = cache, this._name = name, this._hashFunction = hashFunction;
6873
6858
  }
6874
6859
  getChildCache(name) {
6875
- return new CacheFacade_CacheFacade(this._cache, `${this._name}|${name}`, this._hashFunction);
6860
+ return new CacheFacade(this._cache, `${this._name}|${name}`, this._hashFunction);
6876
6861
  }
6877
6862
  getItemCache(identifier, etag) {
6878
6863
  return new ItemCacheFacade(this._cache, `${this._name}|${identifier}`, etag);
@@ -7000,7 +6985,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7000
6985
  this.#binding.resolve(path, request, (error, text)=>{
7001
6986
  if (error) return void callback(error);
7002
6987
  let req = text ? JSON.parse(text) : void 0;
7003
- callback(error, !!req && `${req.path.replace(/#/g, "\u200b#")}${req.query.replace(/#/g, "\u200b#")}${req.fragment}`, req);
6988
+ req?.fileDependencies && req.fileDependencies.forEach((file)=>{
6989
+ resolveContext.fileDependencies?.add(file);
6990
+ }), req?.missingDependencies && req.missingDependencies.forEach((missing)=>{
6991
+ resolveContext.missingDependencies?.add(missing);
6992
+ }), callback(error, !!req && `${req.path.replace(/#/g, "\u200b#")}${req.query.replace(/#/g, "\u200b#")}${req.fragment}`, req);
7004
6993
  });
7005
6994
  }
7006
6995
  }
@@ -7393,7 +7382,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7393
7382
  });
7394
7383
  }
7395
7384
  }
7396
- let CORE_VERSION = "1.6.0", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
7385
+ let CORE_VERSION = "1.6.2", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
7397
7386
 
7398
7387
  Help:
7399
7388
  Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
@@ -7783,7 +7772,7 @@ Help:
7783
7772
  "entry"
7784
7773
  ]),
7785
7774
  additionalPass: new lite_tapable_namespaceObject.AsyncSeriesHook([])
7786
- }, 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(), this.compilerPath = "", this.running = !1, this.idle = !1, this.watchMode = !1, this.__internal_browser_require = ()=>{
7775
+ }, this.webpack = src_rspack_0, this.rspack = src_rspack_0, 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(), this.compilerPath = "", this.running = !1, this.idle = !1, this.watchMode = !1, this.__internal_browser_require = ()=>{
7787
7776
  throw Error("Cannot execute user defined code in browser without `BrowserRequirePlugin`");
7788
7777
  }, this.resolverFactory = new ResolverFactory(options.resolve.pnp ?? getPnpDefault(), options.resolve, options.resolveLoader), new JsLoaderRspackPlugin(this).apply(this), new ExecuteModulePlugin().apply(this), new TraceHookPlugin().apply(this);
7789
7778
  }
@@ -7809,7 +7798,7 @@ Help:
7809
7798
  return this.#ruleSet;
7810
7799
  }
7811
7800
  getCache(name) {
7812
- return new CacheFacade_CacheFacade(this.cache, `${this.compilerPath}${name}`, this.options.output.hashFunction);
7801
+ return new CacheFacade(this.cache, `${this.compilerPath}${name}`, this.options.output.hashFunction);
7813
7802
  }
7814
7803
  getInfrastructureLogger(name) {
7815
7804
  if (!name) throw TypeError("Compiler.getInfrastructureLogger(name) called without a name");
@@ -8137,7 +8126,9 @@ Help:
8137
8126
  targetPath,
8138
8127
  outputPath,
8139
8128
  get source () {
8140
- return getCompiler1().__internal__get_compilation().getAsset(filename)?.source;
8129
+ let source = getCompiler1().__internal__get_compilation().getAsset(filename)?.source;
8130
+ if (!source) throw Error(`Asset ${filename} not found`);
8131
+ return source;
8141
8132
  },
8142
8133
  get content () {
8143
8134
  return this.source?.buffer();
@@ -8230,7 +8221,7 @@ Help:
8230
8221
  try {
8231
8222
  fn();
8232
8223
  } catch (err) {
8233
- if (err instanceof WebpackError) throw err;
8224
+ if (err instanceof lib_WebpackError) throw err;
8234
8225
  throw new HookWebpackError(err, hook);
8235
8226
  }
8236
8227
  })(()=>queried.call({
@@ -8684,7 +8675,7 @@ Help:
8684
8675
  obj.children = this.stats.map((stat, idx)=>{
8685
8676
  let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
8686
8677
  return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
8687
- }), childOptions.version && (obj.rspackVersion = "1.6.0", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
8678
+ }), childOptions.version && (obj.rspackVersion = "1.6.2", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
8688
8679
  let mapError = (j, obj)=>({
8689
8680
  ...obj,
8690
8681
  compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
@@ -8731,7 +8722,7 @@ Help:
8731
8722
  }(callback1));
8732
8723
  }
8733
8724
  size || callback(null);
8734
- }, MultiWatching = class {
8725
+ }, src_MultiWatching = class {
8735
8726
  watchings;
8736
8727
  compiler;
8737
8728
  constructor(watchings, compiler){
@@ -8760,7 +8751,7 @@ Help:
8760
8751
  }
8761
8752
  };
8762
8753
  ArrayQueue_computedKey = Symbol.iterator;
8763
- let ArrayQueue = class {
8754
+ let util_ArrayQueue = class {
8764
8755
  _list;
8765
8756
  _listReversed;
8766
8757
  constructor(items){
@@ -8921,7 +8912,7 @@ Help:
8921
8912
  node.parents.push(parent), parent.children.push(node);
8922
8913
  }
8923
8914
  }
8924
- let queue = new ArrayQueue();
8915
+ let queue = new util_ArrayQueue();
8925
8916
  for (let node of nodes)0 === node.parents.length && (node.state = "queued", queue.enqueue(node));
8926
8917
  let errored = !1, running = 0, parallelism = this._options.parallelism, nodeDone = (node, err, stats)=>{
8927
8918
  if (!errored) {
@@ -8970,9 +8961,9 @@ Help:
8970
8961
  }, (compiler, watching, _done)=>{
8971
8962
  compiler.watching === watching && (watching.running || watching.invalidate());
8972
8963
  }, handler);
8973
- return this.watching = new MultiWatching(watchings, this), this.watching;
8964
+ return this.watching = new src_MultiWatching(watchings, this), this.watching;
8974
8965
  }
8975
- return this.watching = new MultiWatching([], this), this.watching;
8966
+ return this.watching = new src_MultiWatching([], this), this.watching;
8976
8967
  }
8977
8968
  run(callback, options) {
8978
8969
  if (this.running) return callback(new ConcurrentCompilationError());
@@ -9583,7 +9574,7 @@ Help:
9583
9574
  object.hash = context.getStatsCompilation(compilation).hash;
9584
9575
  },
9585
9576
  version: (object)=>{
9586
- object.version = "5.75.0", object.rspackVersion = "1.6.0";
9577
+ object.version = "5.75.0", object.rspackVersion = "1.6.2";
9587
9578
  },
9588
9579
  env: (object, _compilation, _context, { _env })=>{
9589
9580
  object.env = _env;
@@ -11096,7 +11087,7 @@ Help:
11096
11087
  });
11097
11088
  }
11098
11089
  }
11099
- class DllManifestError extends WebpackError {
11090
+ class DllManifestError extends lib_WebpackError {
11100
11091
  constructor(filename, message){
11101
11092
  super(), this.name = "DllManifestError", this.message = `Dll manifest ${filename}\n${message}`;
11102
11093
  }
@@ -11112,7 +11103,7 @@ Help:
11112
11103
  for (let key of this.keys){
11113
11104
  let value = void 0 !== process.env[key] ? process.env[key] : this.defaultValues[key];
11114
11105
  void 0 === value && compiler.hooks.thisCompilation.tap("EnvironmentPlugin", (compilation)=>{
11115
- let error = new WebpackError(`EnvironmentPlugin - ${key} environment variable is undefined.\n\nYou can pass an object with default values to suppress this warning.\nSee https://rspack.rs/plugins/webpack/environment-plugin for example.`);
11106
+ let error = new lib_WebpackError(`EnvironmentPlugin - ${key} environment variable is undefined.\n\nYou can pass an object with default values to suppress this warning.\nSee https://rspack.rs/plugins/webpack/environment-plugin for example.`);
11116
11107
  error.name = "EnvVariableNotDefinedError", compilation.errors.push(error);
11117
11108
  }), definitions[`process.env.${key}`] = void 0 === value ? "undefined" : JSON.stringify(value);
11118
11109
  }
@@ -11424,6 +11415,68 @@ Help:
11424
11415
  });
11425
11416
  }
11426
11417
  }
11418
+ let VERSION_PATTERN_REGEXP = /^([\d^=v<>~]|[*xX]$)/;
11419
+ function isRequiredVersion(str) {
11420
+ return VERSION_PATTERN_REGEXP.test(str);
11421
+ }
11422
+ let MANIFEST_FILE_NAME = "mf-manifest.json", STATS_FILE_NAME = "mf-stats.json", JSON_EXT = ".json";
11423
+ function isPlainObject(value) {
11424
+ return !!value && "object" == typeof value && !Array.isArray(value);
11425
+ }
11426
+ class ModuleFederationManifestPlugin extends RspackBuiltinPlugin {
11427
+ name = binding_.BuiltinPluginName.ModuleFederationManifestPlugin;
11428
+ opts;
11429
+ constructor(opts){
11430
+ super(), this.opts = opts;
11431
+ }
11432
+ raw(compiler) {
11433
+ var isDev;
11434
+ let pkg, buildVersion, { fileName, filePath, disableAssetsAnalyze, remoteAliasMap, exposes, shared } = this.opts, { statsFileName, manifestFileName } = function(manifestOptions) {
11435
+ var name;
11436
+ if (!manifestOptions) return {
11437
+ statsFileName: STATS_FILE_NAME,
11438
+ manifestFileName: MANIFEST_FILE_NAME
11439
+ };
11440
+ let filePath = "boolean" == typeof manifestOptions ? "" : manifestOptions.filePath || "", fileName = "boolean" == typeof manifestOptions ? "" : manifestOptions.fileName || "", manifestFileName = fileName ? (name = fileName).endsWith(JSON_EXT) ? name : `${name}${JSON_EXT}` : MANIFEST_FILE_NAME, statsFileName = fileName ? manifestFileName.replace(JSON_EXT, `-stats${JSON_EXT}`) : STATS_FILE_NAME;
11441
+ return {
11442
+ statsFileName: (0, external_node_path_namespaceObject.join)(filePath, statsFileName),
11443
+ manifestFileName: (0, external_node_path_namespaceObject.join)(filePath, manifestFileName)
11444
+ };
11445
+ }(this.opts), rawOptions = {
11446
+ name: this.opts.name,
11447
+ globalName: this.opts.globalName,
11448
+ fileName,
11449
+ filePath,
11450
+ manifestFileName,
11451
+ statsFileName,
11452
+ disableAssetsAnalyze,
11453
+ remoteAliasMap,
11454
+ exposes,
11455
+ shared,
11456
+ buildInfo: (isDev = "development" === compiler.options.mode, pkg = function(root) {
11457
+ let base = root ? (0, external_node_path_namespaceObject.resolve)(root) : process.cwd(), pkgPath = (0, external_node_path_namespaceObject.join)(base, "package.json");
11458
+ try {
11459
+ let content = (0, external_node_fs_namespaceObject.readFileSync)(pkgPath, "utf-8"), parsed = function(input, guard) {
11460
+ try {
11461
+ let parsed = JSON.parse(input);
11462
+ if (guard(parsed)) return parsed;
11463
+ } catch {}
11464
+ }(content, isPlainObject);
11465
+ if (parsed) {
11466
+ let filtered = {};
11467
+ for (let [key, value] of Object.entries(parsed))"string" == typeof value && (filtered[key] = value);
11468
+ if (Object.keys(filtered).length > 0) return filtered;
11469
+ }
11470
+ } catch {}
11471
+ return {};
11472
+ }(compiler.context || process.cwd()), buildVersion = isDev ? "local" : pkg?.version, {
11473
+ buildVersion: process.env.MF_BUILD_VERSION || buildVersion || "UNKNOWN",
11474
+ buildName: process.env.MF_BUILD_NAME || pkg?.name || "UNKNOWN"
11475
+ })
11476
+ };
11477
+ return createBuiltinPlugin(this.name, rawOptions);
11478
+ }
11479
+ }
11427
11480
  let ModuleFederationRuntimePlugin = base_create(binding_.BuiltinPluginName.ModuleFederationRuntimePlugin, (options = {})=>options), parseOptions = (options, normalizeSimple, normalizeOptions)=>{
11428
11481
  let items = [];
11429
11482
  var options1 = options, normalizeSimple1 = normalizeSimple, normalizeOptions1 = normalizeOptions, fn = (key, value)=>{
@@ -11443,7 +11496,63 @@ Help:
11443
11496
  } else if ("object" == typeof options1) object(options1);
11444
11497
  else throw Error("Unexpected options format");
11445
11498
  return items;
11446
- }, compilerSet = new WeakSet();
11499
+ };
11500
+ function getRemoteInfos(options) {
11501
+ if (!options.remotes) return {};
11502
+ let remoteType = options.remoteType || (options.library ? options.library.type : "script"), remotes = parseOptions(options.remotes, (item)=>({
11503
+ external: Array.isArray(item) ? item : [
11504
+ item
11505
+ ],
11506
+ shareScope: options.shareScope || "default"
11507
+ }), (item)=>({
11508
+ external: Array.isArray(item.external) ? item.external : [
11509
+ item.external
11510
+ ],
11511
+ shareScope: item.shareScope || options.shareScope || "default"
11512
+ })), remoteInfos = {};
11513
+ for (let [key, config] of remotes)for (let external of config.external){
11514
+ let [externalType, externalRequest] = function(external) {
11515
+ let result = function(external) {
11516
+ if (/^[a-z0-9-]+ /.test(external)) {
11517
+ let idx = external.indexOf(" ");
11518
+ return [
11519
+ external.slice(0, idx),
11520
+ external.slice(idx + 1)
11521
+ ];
11522
+ }
11523
+ return null;
11524
+ }(external);
11525
+ return null === result ? [
11526
+ remoteType,
11527
+ external
11528
+ ] : result;
11529
+ }(external);
11530
+ if (remoteInfos[key] ??= [], "script" === externalType) {
11531
+ let [url, global] = function(urlAndGlobal) {
11532
+ let index = urlAndGlobal.indexOf("@");
11533
+ return index <= 0 || index === urlAndGlobal.length - 1 ? null : [
11534
+ urlAndGlobal.substring(index + 1),
11535
+ urlAndGlobal.substring(0, index)
11536
+ ];
11537
+ }(externalRequest);
11538
+ remoteInfos[key].push({
11539
+ alias: key,
11540
+ name: global,
11541
+ entry: url,
11542
+ externalType,
11543
+ shareScope: config.shareScope
11544
+ });
11545
+ } else remoteInfos[key].push({
11546
+ alias: key,
11547
+ name: void 0,
11548
+ entry: void 0,
11549
+ externalType,
11550
+ shareScope: config.shareScope
11551
+ });
11552
+ }
11553
+ return remoteInfos;
11554
+ }
11555
+ let compilerSet = new WeakSet();
11447
11556
  class ShareRuntimePlugin extends RspackBuiltinPlugin {
11448
11557
  enhanced;
11449
11558
  name = binding_.BuiltinPluginName.ShareRuntimePlugin;
@@ -11455,16 +11564,14 @@ Help:
11455
11564
  if (compiler1 = compiler, !compilerSet.has(compiler1)) return compiler2 = compiler, compilerSet.add(compiler2), createBuiltinPlugin(this.name, this.enhanced);
11456
11565
  }
11457
11566
  }
11458
- let VERSION_PATTERN_REGEXP = /^([\d^=v<>~]|[*xX]$)/;
11459
11567
  class ConsumeSharedPlugin extends RspackBuiltinPlugin {
11460
11568
  name = binding_.BuiltinPluginName.ConsumeSharedPlugin;
11461
11569
  _options;
11462
11570
  constructor(options){
11463
11571
  super(), this._options = {
11464
11572
  consumes: parseOptions(options.consumes, (item, key)=>{
11465
- var str;
11466
11573
  if (Array.isArray(item)) throw Error("Unexpected array in options");
11467
- return item !== key && (str = item, VERSION_PATTERN_REGEXP.test(str)) ? {
11574
+ return item !== key && isRequiredVersion(item) ? {
11468
11575
  import: key,
11469
11576
  shareScope: options.shareScope || "default",
11470
11577
  shareKey: key,
@@ -11552,9 +11659,8 @@ Help:
11552
11659
  _enhanced;
11553
11660
  constructor(options){
11554
11661
  const sharedOptions = parseOptions(options.shared, (item, key)=>{
11555
- var str;
11556
11662
  if ("string" != typeof item) throw Error("Unexpected array in shared");
11557
- return item !== key && (str = item, VERSION_PATTERN_REGEXP.test(str)) ? {
11663
+ return item !== key && isRequiredVersion(item) ? {
11558
11664
  import: key,
11559
11665
  requiredVersion: item
11560
11666
  } : {
@@ -11687,7 +11793,7 @@ Help:
11687
11793
  let _options = JSON.stringify(options || {});
11688
11794
  return binding_default().transform(source, _options);
11689
11795
  }
11690
- let exports_rspackVersion = "1.6.0", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
11796
+ let exports_rspackVersion = "1.6.2", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
11691
11797
  getNormalizedRspackOptions: getNormalizedRspackOptions,
11692
11798
  applyRspackOptionsDefaults: applyRspackOptionsDefaults,
11693
11799
  getNormalizedWebpackOptions: getNormalizedRspackOptions,
@@ -11748,67 +11854,13 @@ Help:
11748
11854
  bundlerRuntime: bundlerRuntimePath,
11749
11855
  runtime: runtimePath
11750
11856
  });
11751
- compiler.options.resolve.alias = {
11857
+ if (compiler.options.resolve.alias = {
11752
11858
  "@module-federation/runtime-tools": paths.runtimeTools,
11753
11859
  "@module-federation/runtime": paths.runtime,
11754
11860
  ...compiler.options.resolve.alias
11755
11861
  }, new ModuleFederationRuntimePlugin({
11756
11862
  entryRuntime: function(paths, options, compiler) {
11757
- let runtimePlugins = options.runtimePlugins ?? [], remoteInfos = function(options) {
11758
- if (!options.remotes) return {};
11759
- let remoteType = options.remoteType || (options.library ? options.library.type : "script"), remotes = parseOptions(options.remotes, (item)=>({
11760
- external: Array.isArray(item) ? item : [
11761
- item
11762
- ],
11763
- shareScope: options.shareScope || "default"
11764
- }), (item)=>({
11765
- external: Array.isArray(item.external) ? item.external : [
11766
- item.external
11767
- ],
11768
- shareScope: item.shareScope || options.shareScope || "default"
11769
- })), remoteInfos = {};
11770
- for (let [key, config] of remotes)for (let external of config.external){
11771
- let [externalType, externalRequest] = function(external) {
11772
- let result = function(external) {
11773
- if (/^[a-z0-9-]+ /.test(external)) {
11774
- let idx = external.indexOf(" ");
11775
- return [
11776
- external.slice(0, idx),
11777
- external.slice(idx + 1)
11778
- ];
11779
- }
11780
- return null;
11781
- }(external);
11782
- return null === result ? [
11783
- remoteType,
11784
- external
11785
- ] : result;
11786
- }(external);
11787
- if (remoteInfos[key] ??= [], "script" === externalType) {
11788
- let [url, global] = function(urlAndGlobal) {
11789
- let index = urlAndGlobal.indexOf("@");
11790
- return index <= 0 || index === urlAndGlobal.length - 1 ? null : [
11791
- urlAndGlobal.substring(index + 1),
11792
- urlAndGlobal.substring(0, index)
11793
- ];
11794
- }(externalRequest);
11795
- remoteInfos[key].push({
11796
- alias: key,
11797
- name: global,
11798
- entry: url,
11799
- externalType,
11800
- shareScope: config.shareScope
11801
- });
11802
- } else remoteInfos[key].push({
11803
- alias: key,
11804
- name: void 0,
11805
- entry: void 0,
11806
- externalType,
11807
- shareScope: config.shareScope
11808
- });
11809
- }
11810
- return remoteInfos;
11811
- }(options), runtimePluginImports = [], runtimePluginVars = [];
11863
+ let runtimePlugins = options.runtimePlugins ?? [], remoteInfos = getRemoteInfos(options), runtimePluginImports = [], runtimePluginVars = [];
11812
11864
  for(let i = 0; i < runtimePlugins.length; i++){
11813
11865
  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;
11814
11866
  runtimePluginImports.push(`import ${runtimePluginVar} from ${JSON.stringify(pluginPath)}`);
@@ -11829,7 +11881,74 @@ Help:
11829
11881
  }).apply(compiler), new webpack.container.ModuleFederationPluginV1({
11830
11882
  ...this._options,
11831
11883
  enhanced: !0
11832
- }).apply(compiler);
11884
+ }).apply(compiler), this._options.manifest) {
11885
+ let manifestOptions = !0 === this._options.manifest ? {} : {
11886
+ ...this._options.manifest
11887
+ }, containerName = manifestOptions.name ?? this._options.name, globalName = manifestOptions.globalName ?? function(library) {
11888
+ if (!library) return;
11889
+ let libName = library.name;
11890
+ if (libName) {
11891
+ if ("string" == typeof libName) return libName;
11892
+ if (Array.isArray(libName)) return libName[0];
11893
+ if ("object" == typeof libName) return libName.root?.[0] ?? libName.amd ?? libName.commonjs ?? void 0;
11894
+ }
11895
+ }(this._options.library) ?? containerName, remoteAliasMap = Object.entries(getRemoteInfos(this._options)).reduce((sum, cur)=>{
11896
+ if (cur[1].length > 1) return sum;
11897
+ let { entry, alias, name } = cur[1][0];
11898
+ return entry && name && (sum[alias] = {
11899
+ name,
11900
+ entry
11901
+ }), sum;
11902
+ }, {}), manifestExposes = function(exposes) {
11903
+ if (!exposes) return;
11904
+ let result = parseOptions(exposes, (value, key)=>({
11905
+ import: Array.isArray(value) ? value : [
11906
+ value
11907
+ ],
11908
+ name: void 0
11909
+ }), (value)=>({
11910
+ import: Array.isArray(value.import) ? value.import : [
11911
+ value.import
11912
+ ],
11913
+ name: value.name ?? void 0
11914
+ })).map(([exposeKey, info])=>{
11915
+ let exposeName = info.name ?? exposeKey.replace(/^\.\//, "");
11916
+ return {
11917
+ path: exposeKey,
11918
+ name: exposeName
11919
+ };
11920
+ });
11921
+ return result.length > 0 ? result : void 0;
11922
+ }(this._options.exposes);
11923
+ void 0 === manifestOptions.exposes && manifestExposes && (manifestOptions.exposes = manifestExposes);
11924
+ let manifestShared = function(shared) {
11925
+ if (!shared) return;
11926
+ let result = parseOptions(shared, (item, key)=>{
11927
+ if ("string" != typeof item) throw Error("Unexpected array in shared");
11928
+ return item !== key && isRequiredVersion(item) ? {
11929
+ import: key,
11930
+ requiredVersion: item
11931
+ } : {
11932
+ import: item
11933
+ };
11934
+ }, (item)=>item).map(([key, config])=>{
11935
+ let name = config.shareKey || key, version = "string" == typeof config.version ? config.version : void 0;
11936
+ return {
11937
+ name,
11938
+ version,
11939
+ requiredVersion: "string" == typeof config.requiredVersion ? config.requiredVersion : void 0,
11940
+ singleton: config.singleton
11941
+ };
11942
+ });
11943
+ return result.length > 0 ? result : void 0;
11944
+ }(this._options.shared);
11945
+ void 0 === manifestOptions.shared && manifestShared && (manifestOptions.shared = manifestShared), new ModuleFederationManifestPlugin({
11946
+ ...manifestOptions,
11947
+ name: containerName,
11948
+ globalName,
11949
+ remoteAliasMap
11950
+ }).apply(compiler);
11951
+ }
11833
11952
  }
11834
11953
  },
11835
11954
  ModuleFederationPluginV1: class {
@@ -11941,6 +12060,8 @@ Help:
11941
12060
  function validateRspackConfig(config) {
11942
12061
  (({ context })=>{
11943
12062
  if (context && !(0, external_node_path_namespaceObject.isAbsolute)(context)) throw Error(`${ERROR_PREFIX} "context" must be an absolute path, get "${context}".`);
12063
+ })(config), (({ output })=>{
12064
+ if (output?.path && !(0, external_node_path_namespaceObject.isAbsolute)(output.path)) throw Error(`${ERROR_PREFIX} "output.path" must be an absolute path, get "${output.path}".`);
11944
12065
  })(config), (({ optimization })=>{
11945
12066
  if (optimization?.splitChunks) {
11946
12067
  let { minChunks } = optimization.splitChunks;
@@ -12019,7 +12140,7 @@ Help:
12019
12140
  }
12020
12141
  }, exports_namespaceObject);
12021
12142
  src_fn.rspack = src_fn, src_fn.webpack = src_fn;
12022
- let src_rspack = src_fn, src_0 = src_rspack;
12143
+ let src_rspack_0 = src_fn, src_0 = src_rspack_0;
12023
12144
  })(), exports.AsyncDependenciesBlock = __webpack_exports__.AsyncDependenciesBlock, exports.BannerPlugin = __webpack_exports__.BannerPlugin, exports.CircularDependencyRspackPlugin = __webpack_exports__.CircularDependencyRspackPlugin, exports.Compilation = __webpack_exports__.Compilation, exports.Compiler = __webpack_exports__.Compiler, exports.ConcatenatedModule = __webpack_exports__.ConcatenatedModule, exports.ContextModule = __webpack_exports__.ContextModule, exports.ContextReplacementPlugin = __webpack_exports__.ContextReplacementPlugin, exports.CopyRspackPlugin = __webpack_exports__.CopyRspackPlugin, exports.CssExtractRspackPlugin = __webpack_exports__.CssExtractRspackPlugin, exports.DefinePlugin = __webpack_exports__.DefinePlugin, exports.Dependency = __webpack_exports__.Dependency, exports.DllPlugin = __webpack_exports__.DllPlugin, exports.DllReferencePlugin = __webpack_exports__.DllReferencePlugin, exports.DynamicEntryPlugin = __webpack_exports__.DynamicEntryPlugin, exports.EntryDependency = __webpack_exports__.EntryDependency, exports.EntryOptionPlugin = __webpack_exports__.EntryOptionPlugin, exports.EntryPlugin = __webpack_exports__.EntryPlugin, exports.EnvironmentPlugin = __webpack_exports__.EnvironmentPlugin, exports.EvalDevToolModulePlugin = __webpack_exports__.EvalDevToolModulePlugin, exports.EvalSourceMapDevToolPlugin = __webpack_exports__.EvalSourceMapDevToolPlugin, exports.ExternalModule = __webpack_exports__.ExternalModule, exports.ExternalsPlugin = __webpack_exports__.ExternalsPlugin, exports.HotModuleReplacementPlugin = __webpack_exports__.HotModuleReplacementPlugin, exports.HtmlRspackPlugin = __webpack_exports__.HtmlRspackPlugin, exports.IgnorePlugin = __webpack_exports__.IgnorePlugin, exports.LightningCssMinimizerRspackPlugin = __webpack_exports__.LightningCssMinimizerRspackPlugin, exports.LoaderOptionsPlugin = __webpack_exports__.LoaderOptionsPlugin, exports.LoaderTargetPlugin = __webpack_exports__.LoaderTargetPlugin, exports.Module = __webpack_exports__.Module, exports.ModuleFilenameHelpers = __webpack_exports__.ModuleFilenameHelpers, exports.MultiCompiler = __webpack_exports__.MultiCompiler, exports.MultiStats = __webpack_exports__.MultiStats, exports.NoEmitOnErrorsPlugin = __webpack_exports__.NoEmitOnErrorsPlugin, exports.NormalModule = __webpack_exports__.NormalModule, exports.NormalModuleReplacementPlugin = __webpack_exports__.NormalModuleReplacementPlugin, exports.ProgressPlugin = __webpack_exports__.ProgressPlugin, exports.ProvidePlugin = __webpack_exports__.ProvidePlugin, exports.RspackOptionsApply = __webpack_exports__.RspackOptionsApply, exports.RuntimeGlobals = __webpack_exports__.RuntimeGlobals, exports.RuntimeModule = __webpack_exports__.RuntimeModule, exports.RuntimePlugin = __webpack_exports__.RuntimePlugin, exports.SourceMapDevToolPlugin = __webpack_exports__.SourceMapDevToolPlugin, exports.Stats = __webpack_exports__.Stats, exports.StatsErrorCode = __webpack_exports__.StatsErrorCode, exports.SwcJsMinimizerRspackPlugin = __webpack_exports__.SwcJsMinimizerRspackPlugin, exports.Template = __webpack_exports__.Template, exports.ValidationError = __webpack_exports__.ValidationError, exports.WarnCaseSensitiveModulesPlugin = __webpack_exports__.WarnCaseSensitiveModulesPlugin, exports.WebpackError = __webpack_exports__.WebpackError, exports.WebpackOptionsApply = __webpack_exports__.WebpackOptionsApply, exports.config = __webpack_exports__.config, exports.container = __webpack_exports__.container, exports.default = __webpack_exports__.default, exports.electron = __webpack_exports__.electron, exports.experiments = __webpack_exports__.experiments, exports.javascript = __webpack_exports__.javascript, exports.library = __webpack_exports__.library, exports.node = __webpack_exports__.node, exports.optimize = __webpack_exports__.optimize, exports.rspack = __webpack_exports__.rspack, exports.rspackVersion = __webpack_exports__.rspackVersion, exports.sharing = __webpack_exports__.sharing, exports.sources = __webpack_exports__.sources, exports.util = __webpack_exports__.util, exports.version = __webpack_exports__.version, exports.wasm = __webpack_exports__.wasm, exports.web = __webpack_exports__.web, exports.webworker = __webpack_exports__.webworker, __webpack_exports__)-1 === [
12024
12145
  "AsyncDependenciesBlock",
12025
12146
  "BannerPlugin",