@rspack/browser 2.0.6 → 2.0.7

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
@@ -15724,9 +15724,9 @@ __webpack_require__.add({
15724
15724
  }
15725
15725
  utils.intFromLE = intFromLE;
15726
15726
  },
15727
- "../../node_modules/.pnpm/enhanced-resolve@5.21.3/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js" (module, __unused_rspack_exports, __webpack_require__) {
15727
+ "../../node_modules/.pnpm/enhanced-resolve@5.22.1/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js" (module, __unused_rspack_exports, __webpack_require__) {
15728
15728
  var Buffer = __webpack_require__("./src/browser/buffer.ts").h;
15729
- const { nextTick } = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.21.3/node_modules/enhanced-resolve/lib/util/process-browser.js");
15729
+ const { nextTick } = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.22.1/node_modules/enhanced-resolve/lib/util/process-browser.js");
15730
15730
  const dirname = (path)=>{
15731
15731
  let idx = path.length - 1;
15732
15732
  while(idx >= 0){
@@ -15854,9 +15854,45 @@ __webpack_require__.add({
15854
15854
  if (callbacks) runCallbacks(callbacks, null, result);
15855
15855
  return result;
15856
15856
  }
15857
- purge(what) {
15858
- if (what) if ("string" == typeof what || Buffer.isBuffer(what) || what instanceof URL || "number" == typeof what) {
15857
+ purge(what, options) {
15858
+ if (null == what) {
15859
+ if (this._mode !== STORAGE_MODE_IDLE) {
15860
+ this._data.clear();
15861
+ for (const level of this._levels)level.clear();
15862
+ this._enterIdleMode();
15863
+ }
15864
+ return;
15865
+ }
15866
+ const exact = null != options && true === options.exact;
15867
+ if (exact) {
15868
+ if ("string" == typeof what || Buffer.isBuffer(what) || what instanceof URL || "number" == typeof what) {
15869
+ const strWhat = "string" != typeof what ? what.toString() : what;
15870
+ const data = this._data.get(strWhat);
15871
+ if (void 0 !== data) {
15872
+ this._data.delete(strWhat);
15873
+ data.level.delete(strWhat);
15874
+ }
15875
+ } else for (const item of what){
15876
+ const strItem = "string" != typeof item ? item.toString() : item;
15877
+ const data = this._data.get(strItem);
15878
+ if (void 0 !== data) {
15879
+ this._data.delete(strItem);
15880
+ data.level.delete(strItem);
15881
+ }
15882
+ }
15883
+ if (0 === this._data.size) this._enterIdleMode();
15884
+ return;
15885
+ }
15886
+ if ("string" == typeof what || Buffer.isBuffer(what) || what instanceof URL || "number" == typeof what) {
15859
15887
  const strWhat = "string" != typeof what ? what.toString() : what;
15888
+ if ("" === strWhat) {
15889
+ if (this._mode !== STORAGE_MODE_IDLE) {
15890
+ this._data.clear();
15891
+ for (const level of this._levels)level.clear();
15892
+ this._enterIdleMode();
15893
+ }
15894
+ return;
15895
+ }
15860
15896
  for (const [key, data] of this._data)if (key.startsWith(strWhat)) {
15861
15897
  this._data.delete(key);
15862
15898
  data.level.delete(key);
@@ -15873,14 +15909,10 @@ __webpack_require__.add({
15873
15909
  }
15874
15910
  if (0 === this._data.size) this._enterIdleMode();
15875
15911
  }
15876
- else if (this._mode !== STORAGE_MODE_IDLE) {
15877
- this._data.clear();
15878
- for (const level of this._levels)level.clear();
15879
- this._enterIdleMode();
15880
- }
15881
15912
  }
15882
15913
  purgeParent(what) {
15883
- if (what) if ("string" == typeof what || Buffer.isBuffer(what) || what instanceof URL || "number" == typeof what) {
15914
+ if (null == what) this.purge();
15915
+ else if ("string" == typeof what || Buffer.isBuffer(what) || what instanceof URL || "number" == typeof what) {
15884
15916
  const strWhat = "string" != typeof what ? what.toString() : what;
15885
15917
  this.purge(dirname(strWhat));
15886
15918
  } else {
@@ -15891,7 +15923,6 @@ __webpack_require__.add({
15891
15923
  }
15892
15924
  this.purge(set);
15893
15925
  }
15894
- else this.purge();
15895
15926
  }
15896
15927
  _storeResult(path, err, result) {
15897
15928
  if (this._data.has(path)) return;
@@ -16010,18 +16041,19 @@ __webpack_require__.add({
16010
16041
  const realpathSync = this._realpathBackend.provideSync;
16011
16042
  this.realpathSync = realpathSync;
16012
16043
  }
16013
- purge(what) {
16014
- this._statBackend.purge(what);
16015
- this._lstatBackend.purge(what);
16016
- this._readdirBackend.purgeParent(what);
16017
- this._readFileBackend.purge(what);
16018
- this._readlinkBackend.purge(what);
16019
- this._readJsonBackend.purge(what);
16020
- this._realpathBackend.purge(what);
16044
+ purge(what, options) {
16045
+ this._statBackend.purge(what, options);
16046
+ this._lstatBackend.purge(what, options);
16047
+ if (null != options && true === options.exact) this._readdirBackend.purge(what, options);
16048
+ else this._readdirBackend.purgeParent(what);
16049
+ this._readFileBackend.purge(what, options);
16050
+ this._readlinkBackend.purge(what, options);
16051
+ this._readJsonBackend.purge(what, options);
16052
+ this._realpathBackend.purge(what, options);
16021
16053
  }
16022
16054
  };
16023
16055
  },
16024
- "../../node_modules/.pnpm/enhanced-resolve@5.21.3/node_modules/enhanced-resolve/lib/util/process-browser.js" (module) {
16056
+ "../../node_modules/.pnpm/enhanced-resolve@5.22.1/node_modules/enhanced-resolve/lib/util/process-browser.js" (module) {
16025
16057
  module.exports = {
16026
16058
  versions: {},
16027
16059
  nextTick (fn) {
@@ -36504,7 +36536,7 @@ __webpack_require__.add({
36504
36536
  "./src/browser/fs.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
36505
36537
  __webpack_require__.r(__webpack_exports__);
36506
36538
  var _napi_rs_wasm_runtime_fs__rspack_import_0 = __webpack_require__("../../node_modules/.pnpm/@napi-rs+wasm-runtime@1.1.4_@emnapi+core@1.10.0_@emnapi+runtime@1.10.0/node_modules/@napi-rs/wasm-runtime/dist/fs.js");
36507
- var _rspack_binding__rspack_import_1 = __webpack_require__("@rspack/binding?1a47");
36539
+ var _rspack_binding__rspack_import_1 = __webpack_require__("@rspack/binding?637b");
36508
36540
  const fs = _rspack_binding__rspack_import_1.__fs;
36509
36541
  const volume = _rspack_binding__rspack_import_1.__volume;
36510
36542
  const memfs = _napi_rs_wasm_runtime_fs__rspack_import_0.tO;
@@ -36523,7 +36555,7 @@ __webpack_require__.add({
36523
36555
  watch: watch
36524
36556
  });
36525
36557
  },
36526
- "@rspack/binding?1a47" (module) {
36558
+ "@rspack/binding?637b" (module) {
36527
36559
  module.exports = __rspack_external__rspack_wasi_browser_js_bd433424;
36528
36560
  },
36529
36561
  "?7763" () {},
@@ -55161,6 +55193,7 @@ __webpack_require__.d(exports_namespaceObject, {
55161
55193
  AsyncDependenciesBlock: ()=>AsyncDependenciesBlock,
55162
55194
  BannerPlugin: ()=>BannerPlugin,
55163
55195
  CaseSensitivePlugin: ()=>CaseSensitivePlugin,
55196
+ CircularCheckRspackPlugin: ()=>CircularCheckRspackPlugin,
55164
55197
  CircularDependencyRspackPlugin: ()=>CircularDependencyRspackPlugin,
55165
55198
  Compilation: ()=>Compilation,
55166
55199
  Compiler: ()=>Compiler,
@@ -57370,6 +57403,31 @@ class CircularModulesInfoPlugin extends RspackBuiltinPlugin {
57370
57403
  return createBuiltinPlugin(this.name, void 0);
57371
57404
  }
57372
57405
  }
57406
+ class CircularCheckRspackPlugin extends RspackBuiltinPlugin {
57407
+ name = external_rspack_wasi_browser_js_BuiltinPluginName.CircularCheckRspackPlugin;
57408
+ _options;
57409
+ constructor(options = {}){
57410
+ super();
57411
+ this._options = options;
57412
+ }
57413
+ raw(compiler) {
57414
+ const { failOnError, exclude, include, onDetected } = this._options;
57415
+ const rawOptions = {
57416
+ failOnError,
57417
+ exclude,
57418
+ include,
57419
+ onDetected: onDetected ? (module, paths)=>{
57420
+ const compilation = compiler.__internal__get_compilation();
57421
+ onDetected({
57422
+ module,
57423
+ paths,
57424
+ compilation
57425
+ });
57426
+ } : void 0
57427
+ };
57428
+ return createBuiltinPlugin(this.name, rawOptions);
57429
+ }
57430
+ }
57373
57431
  class CircularDependencyRspackPlugin extends RspackBuiltinPlugin {
57374
57432
  name = external_rspack_wasi_browser_js_BuiltinPluginName.CircularDependencyRspackPlugin;
57375
57433
  _options;
@@ -59882,6 +59940,7 @@ const getRawModuleRule = (rule, path, options, upperType)=>{
59882
59940
  issuer: rule.issuer ? getRawRuleSetCondition(rule.issuer) : void 0,
59883
59941
  issuerLayer: rule.issuerLayer ? getRawRuleSetCondition(rule.issuerLayer) : void 0,
59884
59942
  dependency: rule.dependency ? getRawRuleSetCondition(rule.dependency) : void 0,
59943
+ phase: rule.phase ? getRawRuleSetCondition(rule.phase) : void 0,
59885
59944
  descriptionData: rule.descriptionData ? Object.fromEntries(Object.entries(rule.descriptionData).map(([k, v])=>[
59886
59945
  k,
59887
59946
  getRawRuleSetCondition(v)
@@ -59994,15 +60053,15 @@ function getRawParserOptions(parser, type) {
59994
60053
  };
59995
60054
  if ('css/auto' === type) return {
59996
60055
  type: 'css/auto',
59997
- cssAuto: getRawCssParserOptions(parser)
60056
+ cssAuto: getRawCssAutoOrModuleParserOptions(parser)
59998
60057
  };
59999
60058
  if ('css/global' === type) return {
60000
60059
  type: 'css/global',
60001
- cssGlobal: getRawCssParserOptions(parser)
60060
+ cssGlobal: getRawCssModuleParserOptions(parser)
60002
60061
  };
60003
60062
  if ('css/module' === type) return {
60004
60063
  type: 'css/module',
60005
- cssModule: getRawCssParserOptions(parser)
60064
+ cssModule: getRawCssAutoOrModuleParserOptions(parser)
60006
60065
  };
60007
60066
  if ('json' === type) return {
60008
60067
  type: 'json',
@@ -60040,6 +60099,7 @@ function getRawJavascriptParserOptions(parser) {
60040
60099
  typeReexportsPresence: parser.typeReexportsPresence,
60041
60100
  jsx: parser.jsx,
60042
60101
  deferImport: parser.deferImport,
60102
+ sourceImport: parser.sourceImport,
60043
60103
  importMetaResolve: parser.importMetaResolve,
60044
60104
  pureFunctions: parser.pureFunctions
60045
60105
  };
@@ -60058,15 +60118,24 @@ function getRawAssetParserDataUrl(dataUrlCondition) {
60058
60118
  };
60059
60119
  throw new Error(`unreachable: AssetParserDataUrl type should be one of "options", but got ${dataUrlCondition}`);
60060
60120
  }
60061
- function getRawCssParserOptions(parser) {
60121
+ function getRawCssModuleParserOptions(parser) {
60062
60122
  return {
60063
60123
  namedExports: parser.namedExports,
60064
60124
  url: parser.url,
60065
60125
  import: parser.import,
60066
60126
  resolveImport: parser.resolveImport,
60067
60127
  animation: parser.animation,
60128
+ container: parser.container,
60068
60129
  customIdents: parser.customIdents,
60069
- dashedIdents: parser.dashedIdents
60130
+ dashedIdents: parser.dashedIdents,
60131
+ function: parser.function,
60132
+ grid: parser.grid
60133
+ };
60134
+ }
60135
+ function getRawCssAutoOrModuleParserOptions(parser) {
60136
+ return {
60137
+ ...getRawCssModuleParserOptions(parser),
60138
+ pure: parser.pure
60070
60139
  };
60071
60140
  }
60072
60141
  function getRawCssParserOptionsForCss(parser) {
@@ -60074,10 +60143,7 @@ function getRawCssParserOptionsForCss(parser) {
60074
60143
  namedExports: parser.namedExports,
60075
60144
  url: parser.url,
60076
60145
  import: parser.import,
60077
- resolveImport: parser.resolveImport,
60078
- animation: parser.animation,
60079
- customIdents: parser.customIdents,
60080
- dashedIdents: parser.dashedIdents
60146
+ resolveImport: parser.resolveImport
60081
60147
  };
60082
60148
  }
60083
60149
  function getRawJsonParserOptions(parser) {
@@ -61222,6 +61288,20 @@ const SwcJsMinimizerRspackPlugin = base_create(external_rspack_wasi_browser_js_B
61222
61288
  }
61223
61289
  };
61224
61290
  }, 'compilation');
61291
+ class SyncModuleIdsPlugin extends RspackBuiltinPlugin {
61292
+ options;
61293
+ name = external_rspack_wasi_browser_js_BuiltinPluginName.SyncModuleIdsPlugin;
61294
+ affectedHooks = 'compilation';
61295
+ constructor(options){
61296
+ super(), this.options = options;
61297
+ }
61298
+ raw() {
61299
+ const options = {
61300
+ ...this.options
61301
+ };
61302
+ return createBuiltinPlugin(this.name, options);
61303
+ }
61304
+ }
61225
61305
  const URLPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.URLPlugin, ()=>{}, 'compilation');
61226
61306
  class WorkerPlugin extends RspackBuiltinPlugin {
61227
61307
  chunkLoading;
@@ -62627,6 +62707,7 @@ const applyRspackOptionsDefaults = (options)=>{
62627
62707
  mode: options.mode,
62628
62708
  uniqueName: options.output.uniqueName,
62629
62709
  deferImport: options.experiments.deferImport,
62710
+ sourceImport: options.experiments.sourceImport,
62630
62711
  outputModule: options.output.module,
62631
62712
  hashFunction: options.output.hashFunction,
62632
62713
  hashSalt: options.output.hashSalt
@@ -62688,6 +62769,7 @@ const applyExperimentsDefaults = (experiments)=>{
62688
62769
  D(experiments, 'futureDefaults', false);
62689
62770
  D(experiments, 'asyncWebAssembly', true);
62690
62771
  D(experiments, 'deferImport', false);
62772
+ D(experiments, 'sourceImport', false);
62691
62773
  D(experiments, 'buildHttp', void 0);
62692
62774
  if (experiments.buildHttp && 'object' == typeof experiments.buildHttp) D(experiments.buildHttp, 'upgrade', false);
62693
62775
  D(experiments, 'useInputFileSystem', false);
@@ -62714,7 +62796,7 @@ const applyIncrementalDefaults = (options)=>{
62714
62796
  }
62715
62797
  };
62716
62798
  const applySnapshotDefaults = (_snapshot, _env)=>{};
62717
- const applyJavascriptParserOptionsDefaults = (parserOptions, { deferImport, outputModule })=>{
62799
+ const applyJavascriptParserOptionsDefaults = (parserOptions, { deferImport, sourceImport, outputModule })=>{
62718
62800
  D(parserOptions, 'dynamicImportMode', 'lazy');
62719
62801
  D(parserOptions, 'dynamicImportPrefetch', false);
62720
62802
  D(parserOptions, 'dynamicImportPreload', false);
@@ -62738,12 +62820,18 @@ const applyJavascriptParserOptionsDefaults = (parserOptions, { deferImport, outp
62738
62820
  D(parserOptions, 'typeReexportsPresence', 'no-tolerant');
62739
62821
  D(parserOptions, 'jsx', false);
62740
62822
  D(parserOptions, 'deferImport', deferImport);
62823
+ D(parserOptions, 'sourceImport', sourceImport);
62741
62824
  D(parserOptions, 'importMetaResolve', false);
62742
62825
  };
62743
62826
  const applyCssGeneratorOptionsDefaults = (generatorOptions, { targetProperties })=>{
62744
62827
  D(generatorOptions, 'exportsOnly', !targetProperties || false === targetProperties.document);
62745
62828
  D(generatorOptions, 'esModule', true);
62746
62829
  };
62830
+ const applyCssParserOptionsDefaults = (parserOptions)=>{
62831
+ D(parserOptions, 'namedExports', true);
62832
+ D(parserOptions, 'url', true);
62833
+ D(parserOptions, 'import', true);
62834
+ };
62747
62835
  const applyCssModuleGeneratorOptionsDefaults = (generatorOptions, { hashFunction, hashSalt, localIdentName, targetProperties })=>{
62748
62836
  D(generatorOptions, 'exportsOnly', !targetProperties || false === targetProperties.document);
62749
62837
  D(generatorOptions, 'esModule', true);
@@ -62755,14 +62843,22 @@ const applyCssModuleGeneratorOptionsDefaults = (generatorOptions, { hashFunction
62755
62843
  D(generatorOptions, 'localIdentHashDigestLength', 6);
62756
62844
  };
62757
62845
  const applyCssModuleParserOptionsDefaults = (parserOptions)=>{
62758
- D(parserOptions, 'namedExports', true);
62759
- D(parserOptions, 'url', true);
62760
- D(parserOptions, 'import', true);
62846
+ applyCssParserOptionsDefaults(parserOptions);
62847
+ D(parserOptions, 'animation', true);
62848
+ D(parserOptions, 'container', true);
62849
+ D(parserOptions, 'customIdents', true);
62850
+ D(parserOptions, 'dashedIdents', true);
62851
+ D(parserOptions, 'function', true);
62852
+ D(parserOptions, 'grid', true);
62853
+ };
62854
+ const applyCssAutoOrModuleParserOptionsDefaults = (parserOptions)=>{
62855
+ applyCssModuleParserOptionsDefaults(parserOptions);
62856
+ D(parserOptions, 'pure', false);
62761
62857
  };
62762
62858
  const applyJsonGeneratorOptionsDefaults = (generatorOptions)=>{
62763
62859
  D(generatorOptions, 'JSONParse', true);
62764
62860
  };
62765
- const applyModuleDefaults = (module, { asyncWebAssembly, targetProperties, mode, uniqueName, deferImport, outputModule, hashFunction, hashSalt })=>{
62861
+ const applyModuleDefaults = (module, { asyncWebAssembly, targetProperties, mode, uniqueName, deferImport, sourceImport, outputModule, hashFunction, hashSalt })=>{
62766
62862
  assertNotNill(module.parser);
62767
62863
  assertNotNill(module.generator);
62768
62864
  F(module.parser, "asset", ()=>({}));
@@ -62773,6 +62869,7 @@ const applyModuleDefaults = (module, { asyncWebAssembly, targetProperties, mode,
62773
62869
  assertNotNill(module.parser.javascript);
62774
62870
  applyJavascriptParserOptionsDefaults(module.parser.javascript, {
62775
62871
  deferImport,
62872
+ sourceImport,
62776
62873
  outputModule
62777
62874
  });
62778
62875
  F(module.parser, "json", ()=>({}));
@@ -62783,19 +62880,16 @@ const applyModuleDefaults = (module, { asyncWebAssembly, targetProperties, mode,
62783
62880
  applyJsonGeneratorOptionsDefaults(module.generator.json);
62784
62881
  F(module.parser, 'css', ()=>({}));
62785
62882
  assertNotNill(module.parser.css);
62786
- D(module.parser.css, 'namedExports', true);
62787
- D(module.parser.css, 'url', true);
62788
- D(module.parser.css, 'import', true);
62789
- D(module.parser.css, 'animation', true);
62883
+ applyCssParserOptionsDefaults(module.parser.css);
62790
62884
  F(module.parser, 'css/auto', ()=>({}));
62791
62885
  assertNotNill(module.parser['css/auto']);
62792
- applyCssModuleParserOptionsDefaults(module.parser['css/auto']);
62886
+ applyCssAutoOrModuleParserOptionsDefaults(module.parser['css/auto']);
62793
62887
  F(module.parser, 'css/global', ()=>({}));
62794
62888
  assertNotNill(module.parser['css/global']);
62795
62889
  applyCssModuleParserOptionsDefaults(module.parser['css/global']);
62796
62890
  F(module.parser, 'css/module', ()=>({}));
62797
62891
  assertNotNill(module.parser['css/module']);
62798
- applyCssModuleParserOptionsDefaults(module.parser['css/module']);
62892
+ applyCssAutoOrModuleParserOptionsDefaults(module.parser['css/module']);
62799
62893
  F(module.generator, 'css', ()=>({}));
62800
62894
  assertNotNill(module.generator.css);
62801
62895
  applyCssGeneratorOptionsDefaults(module.generator.css, {
@@ -63151,7 +63245,7 @@ const applyOutputDefaults = (options, { context, targetProperties: tp, isAffecte
63151
63245
  });
63152
63246
  D(output, 'bundlerInfo', {});
63153
63247
  if ('object' == typeof output.bundlerInfo) {
63154
- D(output.bundlerInfo, 'version', "2.0.6");
63248
+ D(output.bundlerInfo, 'version', "2.0.7");
63155
63249
  D(output.bundlerInfo, 'bundler', 'rspack');
63156
63250
  D(output.bundlerInfo, 'force', false);
63157
63251
  }
@@ -63384,21 +63478,24 @@ const getResolveDefaults = ({ targetProperties, mode })=>{
63384
63478
  unknown: cjsDeps()
63385
63479
  }
63386
63480
  };
63387
- resolveOptions.byDependency['css-import'] = {
63481
+ const styleConditions = [];
63482
+ styleConditions.push('development' === mode ? 'development' : 'production');
63483
+ styleConditions.push('style');
63484
+ const cssResolveOptions = {
63388
63485
  mainFiles: [],
63389
63486
  mainFields: [
63390
63487
  'style',
63391
63488
  '...'
63392
63489
  ],
63393
- conditionNames: [
63394
- 'development' === mode ? 'development' : 'production',
63395
- 'style'
63396
- ],
63490
+ conditionNames: styleConditions,
63397
63491
  extensions: [
63398
63492
  '.css'
63399
63493
  ],
63400
63494
  preferRelative: true
63401
63495
  };
63496
+ resolveOptions.byDependency['css-import'] = cssResolveOptions;
63497
+ resolveOptions.byDependency['css-import-local-module'] = cssResolveOptions;
63498
+ resolveOptions.byDependency['css-import-global-module'] = cssResolveOptions;
63402
63499
  return resolveOptions;
63403
63500
  };
63404
63501
  const D = (obj, prop, value)=>{
@@ -63787,53 +63884,54 @@ var RuntimeGlobals_RuntimeGlobals = /*#__PURE__*/ function(RuntimeGlobals) {
63787
63884
  RuntimeGlobals[RuntimeGlobals["getFullHash"] = 26] = "getFullHash";
63788
63885
  RuntimeGlobals[RuntimeGlobals["wasmInstances"] = 27] = "wasmInstances";
63789
63886
  RuntimeGlobals[RuntimeGlobals["instantiateWasm"] = 28] = "instantiateWasm";
63790
- RuntimeGlobals[RuntimeGlobals["uncaughtErrorHandler"] = 29] = "uncaughtErrorHandler";
63791
- RuntimeGlobals[RuntimeGlobals["scriptNonce"] = 30] = "scriptNonce";
63792
- RuntimeGlobals[RuntimeGlobals["loadScript"] = 31] = "loadScript";
63793
- RuntimeGlobals[RuntimeGlobals["createScript"] = 32] = "createScript";
63794
- RuntimeGlobals[RuntimeGlobals["createScriptUrl"] = 33] = "createScriptUrl";
63795
- RuntimeGlobals[RuntimeGlobals["getTrustedTypesPolicy"] = 34] = "getTrustedTypesPolicy";
63796
- RuntimeGlobals[RuntimeGlobals["hasFetchPriority"] = 35] = "hasFetchPriority";
63797
- RuntimeGlobals[RuntimeGlobals["chunkName"] = 36] = "chunkName";
63798
- RuntimeGlobals[RuntimeGlobals["runtimeId"] = 37] = "runtimeId";
63799
- RuntimeGlobals[RuntimeGlobals["getChunkScriptFilename"] = 38] = "getChunkScriptFilename";
63800
- RuntimeGlobals[RuntimeGlobals["getChunkCssFilename"] = 39] = "getChunkCssFilename";
63801
- RuntimeGlobals[RuntimeGlobals["rspackVersion"] = 40] = "rspackVersion";
63802
- RuntimeGlobals[RuntimeGlobals["hasCssModules"] = 41] = "hasCssModules";
63803
- RuntimeGlobals[RuntimeGlobals["rspackUniqueId"] = 42] = "rspackUniqueId";
63804
- RuntimeGlobals[RuntimeGlobals["getChunkUpdateScriptFilename"] = 43] = "getChunkUpdateScriptFilename";
63805
- RuntimeGlobals[RuntimeGlobals["getChunkUpdateCssFilename"] = 44] = "getChunkUpdateCssFilename";
63806
- RuntimeGlobals[RuntimeGlobals["startup"] = 45] = "startup";
63807
- RuntimeGlobals[RuntimeGlobals["startupNoDefault"] = 46] = "startupNoDefault";
63808
- RuntimeGlobals[RuntimeGlobals["startupOnlyAfter"] = 47] = "startupOnlyAfter";
63809
- RuntimeGlobals[RuntimeGlobals["startupOnlyBefore"] = 48] = "startupOnlyBefore";
63810
- RuntimeGlobals[RuntimeGlobals["chunkCallback"] = 49] = "chunkCallback";
63811
- RuntimeGlobals[RuntimeGlobals["startupEntrypoint"] = 50] = "startupEntrypoint";
63812
- RuntimeGlobals[RuntimeGlobals["startupChunkDependencies"] = 51] = "startupChunkDependencies";
63813
- RuntimeGlobals[RuntimeGlobals["onChunksLoaded"] = 52] = "onChunksLoaded";
63814
- RuntimeGlobals[RuntimeGlobals["externalInstallChunk"] = 53] = "externalInstallChunk";
63815
- RuntimeGlobals[RuntimeGlobals["interceptModuleExecution"] = 54] = "interceptModuleExecution";
63816
- RuntimeGlobals[RuntimeGlobals["global"] = 55] = "global";
63817
- RuntimeGlobals[RuntimeGlobals["shareScopeMap"] = 56] = "shareScopeMap";
63818
- RuntimeGlobals[RuntimeGlobals["initializeSharing"] = 57] = "initializeSharing";
63819
- RuntimeGlobals[RuntimeGlobals["currentRemoteGetScope"] = 58] = "currentRemoteGetScope";
63820
- RuntimeGlobals[RuntimeGlobals["getUpdateManifestFilename"] = 59] = "getUpdateManifestFilename";
63821
- RuntimeGlobals[RuntimeGlobals["hmrDownloadManifest"] = 60] = "hmrDownloadManifest";
63822
- RuntimeGlobals[RuntimeGlobals["hmrDownloadUpdateHandlers"] = 61] = "hmrDownloadUpdateHandlers";
63823
- RuntimeGlobals[RuntimeGlobals["hmrModuleData"] = 62] = "hmrModuleData";
63824
- RuntimeGlobals[RuntimeGlobals["hmrInvalidateModuleHandlers"] = 63] = "hmrInvalidateModuleHandlers";
63825
- RuntimeGlobals[RuntimeGlobals["hmrRuntimeStatePrefix"] = 64] = "hmrRuntimeStatePrefix";
63826
- RuntimeGlobals[RuntimeGlobals["amdDefine"] = 65] = "amdDefine";
63827
- RuntimeGlobals[RuntimeGlobals["amdOptions"] = 66] = "amdOptions";
63828
- RuntimeGlobals[RuntimeGlobals["system"] = 67] = "system";
63829
- RuntimeGlobals[RuntimeGlobals["hasOwnProperty"] = 68] = "hasOwnProperty";
63830
- RuntimeGlobals[RuntimeGlobals["systemContext"] = 69] = "systemContext";
63831
- RuntimeGlobals[RuntimeGlobals["baseURI"] = 70] = "baseURI";
63832
- RuntimeGlobals[RuntimeGlobals["relativeUrl"] = 71] = "relativeUrl";
63833
- RuntimeGlobals[RuntimeGlobals["asyncModule"] = 72] = "asyncModule";
63834
- RuntimeGlobals[RuntimeGlobals["asyncModuleExportSymbol"] = 73] = "asyncModuleExportSymbol";
63835
- RuntimeGlobals[RuntimeGlobals["makeDeferredNamespaceObject"] = 74] = "makeDeferredNamespaceObject";
63836
- RuntimeGlobals[RuntimeGlobals["makeDeferredNamespaceObjectSymbol"] = 75] = "makeDeferredNamespaceObjectSymbol";
63887
+ RuntimeGlobals[RuntimeGlobals["compileWasm"] = 29] = "compileWasm";
63888
+ RuntimeGlobals[RuntimeGlobals["uncaughtErrorHandler"] = 30] = "uncaughtErrorHandler";
63889
+ RuntimeGlobals[RuntimeGlobals["scriptNonce"] = 31] = "scriptNonce";
63890
+ RuntimeGlobals[RuntimeGlobals["loadScript"] = 32] = "loadScript";
63891
+ RuntimeGlobals[RuntimeGlobals["createScript"] = 33] = "createScript";
63892
+ RuntimeGlobals[RuntimeGlobals["createScriptUrl"] = 34] = "createScriptUrl";
63893
+ RuntimeGlobals[RuntimeGlobals["getTrustedTypesPolicy"] = 35] = "getTrustedTypesPolicy";
63894
+ RuntimeGlobals[RuntimeGlobals["hasFetchPriority"] = 36] = "hasFetchPriority";
63895
+ RuntimeGlobals[RuntimeGlobals["chunkName"] = 37] = "chunkName";
63896
+ RuntimeGlobals[RuntimeGlobals["runtimeId"] = 38] = "runtimeId";
63897
+ RuntimeGlobals[RuntimeGlobals["getChunkScriptFilename"] = 39] = "getChunkScriptFilename";
63898
+ RuntimeGlobals[RuntimeGlobals["getChunkCssFilename"] = 40] = "getChunkCssFilename";
63899
+ RuntimeGlobals[RuntimeGlobals["rspackVersion"] = 41] = "rspackVersion";
63900
+ RuntimeGlobals[RuntimeGlobals["hasCssModules"] = 42] = "hasCssModules";
63901
+ RuntimeGlobals[RuntimeGlobals["rspackUniqueId"] = 43] = "rspackUniqueId";
63902
+ RuntimeGlobals[RuntimeGlobals["getChunkUpdateScriptFilename"] = 44] = "getChunkUpdateScriptFilename";
63903
+ RuntimeGlobals[RuntimeGlobals["getChunkUpdateCssFilename"] = 45] = "getChunkUpdateCssFilename";
63904
+ RuntimeGlobals[RuntimeGlobals["startup"] = 46] = "startup";
63905
+ RuntimeGlobals[RuntimeGlobals["startupNoDefault"] = 47] = "startupNoDefault";
63906
+ RuntimeGlobals[RuntimeGlobals["startupOnlyAfter"] = 48] = "startupOnlyAfter";
63907
+ RuntimeGlobals[RuntimeGlobals["startupOnlyBefore"] = 49] = "startupOnlyBefore";
63908
+ RuntimeGlobals[RuntimeGlobals["chunkCallback"] = 50] = "chunkCallback";
63909
+ RuntimeGlobals[RuntimeGlobals["startupEntrypoint"] = 51] = "startupEntrypoint";
63910
+ RuntimeGlobals[RuntimeGlobals["startupChunkDependencies"] = 52] = "startupChunkDependencies";
63911
+ RuntimeGlobals[RuntimeGlobals["onChunksLoaded"] = 53] = "onChunksLoaded";
63912
+ RuntimeGlobals[RuntimeGlobals["externalInstallChunk"] = 54] = "externalInstallChunk";
63913
+ RuntimeGlobals[RuntimeGlobals["interceptModuleExecution"] = 55] = "interceptModuleExecution";
63914
+ RuntimeGlobals[RuntimeGlobals["global"] = 56] = "global";
63915
+ RuntimeGlobals[RuntimeGlobals["shareScopeMap"] = 57] = "shareScopeMap";
63916
+ RuntimeGlobals[RuntimeGlobals["initializeSharing"] = 58] = "initializeSharing";
63917
+ RuntimeGlobals[RuntimeGlobals["currentRemoteGetScope"] = 59] = "currentRemoteGetScope";
63918
+ RuntimeGlobals[RuntimeGlobals["getUpdateManifestFilename"] = 60] = "getUpdateManifestFilename";
63919
+ RuntimeGlobals[RuntimeGlobals["hmrDownloadManifest"] = 61] = "hmrDownloadManifest";
63920
+ RuntimeGlobals[RuntimeGlobals["hmrDownloadUpdateHandlers"] = 62] = "hmrDownloadUpdateHandlers";
63921
+ RuntimeGlobals[RuntimeGlobals["hmrModuleData"] = 63] = "hmrModuleData";
63922
+ RuntimeGlobals[RuntimeGlobals["hmrInvalidateModuleHandlers"] = 64] = "hmrInvalidateModuleHandlers";
63923
+ RuntimeGlobals[RuntimeGlobals["hmrRuntimeStatePrefix"] = 65] = "hmrRuntimeStatePrefix";
63924
+ RuntimeGlobals[RuntimeGlobals["amdDefine"] = 66] = "amdDefine";
63925
+ RuntimeGlobals[RuntimeGlobals["amdOptions"] = 67] = "amdOptions";
63926
+ RuntimeGlobals[RuntimeGlobals["system"] = 68] = "system";
63927
+ RuntimeGlobals[RuntimeGlobals["hasOwnProperty"] = 69] = "hasOwnProperty";
63928
+ RuntimeGlobals[RuntimeGlobals["systemContext"] = 70] = "systemContext";
63929
+ RuntimeGlobals[RuntimeGlobals["baseURI"] = 71] = "baseURI";
63930
+ RuntimeGlobals[RuntimeGlobals["relativeUrl"] = 72] = "relativeUrl";
63931
+ RuntimeGlobals[RuntimeGlobals["asyncModule"] = 73] = "asyncModule";
63932
+ RuntimeGlobals[RuntimeGlobals["asyncModuleExportSymbol"] = 74] = "asyncModuleExportSymbol";
63933
+ RuntimeGlobals[RuntimeGlobals["makeDeferredNamespaceObject"] = 75] = "makeDeferredNamespaceObject";
63934
+ RuntimeGlobals[RuntimeGlobals["makeDeferredNamespaceObjectSymbol"] = 76] = "makeDeferredNamespaceObjectSymbol";
63837
63935
  return RuntimeGlobals;
63838
63936
  }(RuntimeGlobals_RuntimeGlobals || {});
63839
63937
  const isReservedRuntimeGlobal = (r, compilerRuntimeGlobals)=>Object.values(compilerRuntimeGlobals).includes(r);
@@ -63916,98 +64014,100 @@ function renderRuntimeGlobals(runtimeGlobals, _compilerOptions) {
63916
64014
  case 28:
63917
64015
  return `${scope_name}.v`;
63918
64016
  case 29:
63919
- return `${scope_name}.oe`;
64017
+ return `${scope_name}.vs`;
63920
64018
  case 30:
63921
- return `${scope_name}.nc`;
64019
+ return `${scope_name}.oe`;
63922
64020
  case 31:
63923
- return `${scope_name}.l`;
64021
+ return `${scope_name}.nc`;
63924
64022
  case 32:
63925
- return `${scope_name}.ts`;
64023
+ return `${scope_name}.l`;
63926
64024
  case 33:
63927
- return `${scope_name}.tu`;
64025
+ return `${scope_name}.ts`;
63928
64026
  case 34:
63929
- return `${scope_name}.tt`;
64027
+ return `${scope_name}.tu`;
63930
64028
  case 35:
63931
- return "has fetch priority";
64029
+ return `${scope_name}.tt`;
63932
64030
  case 36:
63933
- return `${scope_name}.cn`;
64031
+ return "has fetch priority";
63934
64032
  case 37:
63935
- return `${scope_name}.j`;
64033
+ return `${scope_name}.cn`;
63936
64034
  case 38:
63937
- return `${scope_name}.u`;
64035
+ return `${scope_name}.j`;
63938
64036
  case 39:
63939
- return `${scope_name}.k`;
64037
+ return `${scope_name}.u`;
63940
64038
  case 40:
63941
- return `${scope_name}.rv`;
64039
+ return `${scope_name}.k`;
63942
64040
  case 41:
63943
- return "has css modules";
64041
+ return `${scope_name}.rv`;
63944
64042
  case 42:
63945
- return `${scope_name}.ruid`;
64043
+ return "has css modules";
63946
64044
  case 43:
63947
- return `${scope_name}.hu`;
64045
+ return `${scope_name}.ruid`;
63948
64046
  case 44:
63949
- return `${scope_name}.hk`;
64047
+ return `${scope_name}.hu`;
63950
64048
  case 45:
63951
- return `${scope_name}.x`;
64049
+ return `${scope_name}.hk`;
63952
64050
  case 46:
63953
- return `${scope_name}.x (no default handler)`;
64051
+ return `${scope_name}.x`;
63954
64052
  case 47:
63955
- return `${scope_name}.x (only after)`;
64053
+ return `${scope_name}.x (no default handler)`;
63956
64054
  case 48:
63957
- return `${scope_name}.x (only before)`;
64055
+ return `${scope_name}.x (only after)`;
63958
64056
  case 49:
63959
- return "global chunk callback";
64057
+ return `${scope_name}.x (only before)`;
63960
64058
  case 50:
63961
- return `${scope_name}.X`;
64059
+ return "global chunk callback";
63962
64060
  case 51:
63963
- return `${scope_name}.x (chunk dependencies)`;
64061
+ return `${scope_name}.X`;
63964
64062
  case 52:
63965
- return `${scope_name}.O`;
64063
+ return `${scope_name}.x (chunk dependencies)`;
63966
64064
  case 53:
63967
- return `${scope_name}.C`;
64065
+ return `${scope_name}.O`;
63968
64066
  case 54:
63969
- return `${scope_name}.i`;
64067
+ return `${scope_name}.C`;
63970
64068
  case 55:
63971
- return `${scope_name}.g`;
64069
+ return `${scope_name}.i`;
63972
64070
  case 56:
63973
- return `${scope_name}.S`;
64071
+ return `${scope_name}.g`;
63974
64072
  case 57:
63975
- return `${scope_name}.I`;
64073
+ return `${scope_name}.S`;
63976
64074
  case 58:
63977
- return `${scope_name}.R`;
64075
+ return `${scope_name}.I`;
63978
64076
  case 59:
63979
- return `${scope_name}.hmrF`;
64077
+ return `${scope_name}.R`;
63980
64078
  case 60:
63981
- return `${scope_name}.hmrM`;
64079
+ return `${scope_name}.hmrF`;
63982
64080
  case 61:
63983
- return `${scope_name}.hmrC`;
64081
+ return `${scope_name}.hmrM`;
63984
64082
  case 62:
63985
- return `${scope_name}.hmrD`;
64083
+ return `${scope_name}.hmrC`;
63986
64084
  case 63:
63987
- return `${scope_name}.hmrI`;
64085
+ return `${scope_name}.hmrD`;
63988
64086
  case 64:
63989
- return `${scope_name}.hmrS`;
64087
+ return `${scope_name}.hmrI`;
63990
64088
  case 65:
63991
- return `${scope_name}.amdD`;
64089
+ return `${scope_name}.hmrS`;
63992
64090
  case 66:
63993
- return `${scope_name}.amdO`;
64091
+ return `${scope_name}.amdD`;
63994
64092
  case 67:
63995
- return `${scope_name}.System`;
64093
+ return `${scope_name}.amdO`;
63996
64094
  case 68:
63997
- return `${scope_name}.o`;
64095
+ return `${scope_name}.System`;
63998
64096
  case 69:
63999
- return `${scope_name}.y`;
64097
+ return `${scope_name}.o`;
64000
64098
  case 70:
64001
- return `${scope_name}.b`;
64099
+ return `${scope_name}.y`;
64002
64100
  case 71:
64003
- return `${scope_name}.U`;
64101
+ return `${scope_name}.b`;
64004
64102
  case 72:
64005
- return `${scope_name}.a`;
64103
+ return `${scope_name}.U`;
64006
64104
  case 73:
64007
- return `${scope_name}.aE`;
64105
+ return `${scope_name}.a`;
64008
64106
  case 74:
64009
- return `${scope_name}.z`;
64107
+ return `${scope_name}.aE`;
64010
64108
  case 75:
64109
+ return `${scope_name}.z`;
64110
+ case 76:
64011
64111
  return `${scope_name}.zS`;
64012
64112
  default:
64013
64113
  return '';
@@ -64809,7 +64909,7 @@ class MultiStats {
64809
64909
  return obj;
64810
64910
  });
64811
64911
  if (childOptions.version) {
64812
- obj.rspackVersion = "2.0.6";
64912
+ obj.rspackVersion = "2.0.7";
64813
64913
  obj.version = "5.75.0";
64814
64914
  }
64815
64915
  if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join('');
@@ -65686,7 +65786,7 @@ function nodeConsole({ colors, appendOnly, stream }) {
65686
65786
  }
65687
65787
  };
65688
65788
  }
65689
- const CachedInputFileSystem = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.21.3/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js");
65789
+ const CachedInputFileSystem = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.22.1/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js");
65690
65790
  var CachedInputFileSystem_default = /*#__PURE__*/ __webpack_require__.n(CachedInputFileSystem);
65691
65791
  class NodeEnvironmentPlugin {
65692
65792
  options;
@@ -66515,7 +66615,7 @@ const SIMPLE_EXTRACTORS = {
66515
66615
  },
66516
66616
  version: (object)=>{
66517
66617
  object.version = "5.75.0";
66518
- object.rspackVersion = "2.0.6";
66618
+ object.rspackVersion = "2.0.7";
66519
66619
  },
66520
66620
  env: (object, _compilation, _context, { _env })=>{
66521
66621
  object.env = _env;
@@ -69020,6 +69120,10 @@ function isNodeWatchFileSystem(fs) {
69020
69120
  return 'watch' in fs;
69021
69121
  }
69022
69122
  var Watching_process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
69123
+ function foldWatchDelta(pending, added, removed) {
69124
+ for (const path of added)if (!pending.removed.delete(path)) pending.added.add(path);
69125
+ for (const path of removed)if (!pending.added.delete(path)) pending.removed.add(path);
69126
+ }
69023
69127
  class Watching {
69024
69128
  watcher;
69025
69129
  pausedWatcher;
@@ -69041,6 +69145,7 @@ class Watching {
69041
69145
  #closed;
69042
69146
  #collectedChangedFiles;
69043
69147
  #collectedRemovedFiles;
69148
+ #pendingWatchDeps;
69044
69149
  suspended;
69045
69150
  constructor(compiler, watchOptions, handler){
69046
69151
  this.callbacks = [];
@@ -69201,6 +69306,25 @@ class Watching {
69201
69306
  this.compiler.compile(onCompiled);
69202
69307
  });
69203
69308
  }
69309
+ #accumulateWatchDeps(compilation) {
69310
+ const pending = this.#pendingWatchDeps ??= {
69311
+ file: {
69312
+ added: new Set(),
69313
+ removed: new Set()
69314
+ },
69315
+ context: {
69316
+ added: new Set(),
69317
+ removed: new Set()
69318
+ },
69319
+ missing: {
69320
+ added: new Set(),
69321
+ removed: new Set()
69322
+ }
69323
+ };
69324
+ foldWatchDelta(pending.file, compilation.__internal__addedFileDependencies, compilation.__internal__removedFileDependencies);
69325
+ foldWatchDelta(pending.context, compilation.__internal__addedContextDependencies, compilation.__internal__removedContextDependencies);
69326
+ foldWatchDelta(pending.missing, compilation.__internal__addedMissingDependencies, compilation.__internal__removedMissingDependencies);
69327
+ }
69204
69328
  _done(error, compilation) {
69205
69329
  this.running = false;
69206
69330
  let stats;
@@ -69213,7 +69337,11 @@ class Watching {
69213
69337
  if (error) return handleError(error);
69214
69338
  if (!compilation) throw new Error('compilation is required if no error');
69215
69339
  stats = new Stats(compilation);
69216
- if (this.invalid && !this.suspended && !this.blocked && !(this.isBlocked() && (this.blocked = true))) return void this.#go();
69340
+ if (this.invalid && !this.suspended && !this.blocked && !(this.isBlocked() && (this.blocked = true))) {
69341
+ if (compilation) this.#accumulateWatchDeps(compilation);
69342
+ this.#go();
69343
+ return;
69344
+ }
69217
69345
  const startTime = this.startTime;
69218
69346
  this.startTime = void 0;
69219
69347
  compilation.startTime = startTime;
@@ -69225,21 +69353,24 @@ class Watching {
69225
69353
  this.handler(null, stats);
69226
69354
  Watching_process.nextTick(()=>{
69227
69355
  if (!this.#closed) {
69356
+ this.#accumulateWatchDeps(compilation);
69357
+ const pending = this.#pendingWatchDeps;
69358
+ this.#pendingWatchDeps = void 0;
69228
69359
  const fileDependencies = new Set([
69229
69360
  ...compilation.fileDependencies
69230
69361
  ]);
69231
- fileDependencies.added = new Set(compilation.__internal__addedFileDependencies);
69232
- fileDependencies.removed = new Set(compilation.__internal__removedFileDependencies);
69362
+ fileDependencies.added = pending.file.added;
69363
+ fileDependencies.removed = pending.file.removed;
69233
69364
  const contextDependencies = new Set([
69234
69365
  ...compilation.contextDependencies
69235
69366
  ]);
69236
- contextDependencies.added = new Set(compilation.__internal__addedContextDependencies);
69237
- contextDependencies.removed = new Set(compilation.__internal__removedContextDependencies);
69367
+ contextDependencies.added = pending.context.added;
69368
+ contextDependencies.removed = pending.context.removed;
69238
69369
  const missingDependencies = new Set([
69239
69370
  ...compilation.missingDependencies
69240
69371
  ]);
69241
- missingDependencies.added = new Set(compilation.__internal__addedMissingDependencies);
69242
- missingDependencies.removed = new Set(compilation.__internal__removedMissingDependencies);
69372
+ missingDependencies.added = pending.missing.added;
69373
+ missingDependencies.removed = pending.missing.removed;
69243
69374
  this.watch(fileDependencies, contextDependencies, missingDependencies);
69244
69375
  }
69245
69376
  });
@@ -69764,7 +69895,7 @@ class Compiler {
69764
69895
  this.#rawOptions = getRawOptions(options, this);
69765
69896
  this.#rawOptions.__references = Object.fromEntries(this.#ruleSet.builtinReferences.entries());
69766
69897
  this.#rawOptions.__virtual_files = VirtualModulesPlugin.__internal__take_virtual_files(this);
69767
- const instanceBinding = __webpack_require__("@rspack/binding?1a47");
69898
+ const instanceBinding = __webpack_require__("@rspack/binding?637b");
69768
69899
  this.#registers = this.#createHooksRegisters();
69769
69900
  const inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
69770
69901
  try {
@@ -70583,6 +70714,7 @@ class ModuleFederationManifestPlugin extends RspackBuiltinPlugin {
70583
70714
  }
70584
70715
  }
70585
70716
  const SHARE_ENTRY_ASSET = 'collect-shared-entries.json';
70717
+ const READ_COLLECTED_SHARED_ENTRY_STAGE = 101;
70586
70718
  class CollectSharedEntryPlugin extends RspackBuiltinPlugin {
70587
70719
  name = external_rspack_wasi_browser_js_BuiltinPluginName.CollectSharedEntryPlugin;
70588
70720
  sharedOptions;
@@ -70601,17 +70733,16 @@ class CollectSharedEntryPlugin extends RspackBuiltinPlugin {
70601
70733
  }
70602
70734
  apply(compiler) {
70603
70735
  super.apply(compiler);
70604
- compiler.hooks.thisCompilation.tap('Collect shared entry', (compilation)=>{
70605
- compilation.hooks.processAssets.tap({
70606
- name: 'CollectSharedEntry',
70607
- stage: compiler.rspack.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE
70608
- }, ()=>{
70609
- compilation.getAssets().forEach((asset)=>{
70610
- if (asset.name === SHARE_ENTRY_ASSET) this._collectedEntries = JSON.parse(asset.source.source().toString());
70611
- compilation.deleteAsset(asset.name);
70612
- });
70613
- });
70614
- });
70736
+ const readCollectedEntries = (compilation)=>{
70737
+ const asset = compilation.getAsset(SHARE_ENTRY_ASSET);
70738
+ if (!asset) return;
70739
+ this._collectedEntries = JSON.parse(asset.source.source().toString());
70740
+ compilation.deleteAsset(asset.name);
70741
+ };
70742
+ compiler.hooks.finishMake.tap({
70743
+ name: 'CollectSharedEntry',
70744
+ stage: READ_COLLECTED_SHARED_ENTRY_STAGE
70745
+ }, readCollectedEntries);
70615
70746
  }
70616
70747
  raw() {
70617
70748
  const consumeShareOptions = createConsumeShareOptions(this.sharedOptions);
@@ -70720,6 +70851,7 @@ class SharedUsedExportsOptimizerPlugin extends RspackBuiltinPlugin {
70720
70851
  }
70721
70852
  const VIRTUAL_ENTRY = './virtual-entry.js';
70722
70853
  const VIRTUAL_ENTRY_NAME = 'virtual-entry';
70854
+ const BUILD_SHARED_FALLBACK_STAGE = 102;
70723
70855
  const filterPlugin = (plugin, excludedPlugins = [])=>{
70724
70856
  if (!plugin) return true;
70725
70857
  const pluginName = plugin.name || plugin.constructor?.name;
@@ -70778,6 +70910,13 @@ class VirtualEntryPlugin {
70778
70910
  }
70779
70911
  }
70780
70912
  const resolveOutputDir = (outputDir, shareName)=>shareName ? (0, path_browserify.join)(outputDir, encodeName(shareName)) : outputDir;
70913
+ const getShareRequests = (shareRequestsMap, shareName)=>Array.from(new Map((shareRequestsMap[shareName]?.requests || []).map(([request, version])=>[
70914
+ version,
70915
+ [
70916
+ request,
70917
+ version
70918
+ ]
70919
+ ])).values());
70781
70920
  class IndependentSharedPlugin {
70782
70921
  mfName;
70783
70922
  shared;
@@ -70790,9 +70929,10 @@ class IndependentSharedPlugin {
70790
70929
  buildAssets = {};
70791
70930
  injectTreeShakingUsedExports;
70792
70931
  treeShakingSharedExcludePlugins;
70932
+ onBuildAssets;
70793
70933
  name = 'IndependentSharedPlugin';
70794
70934
  constructor(options){
70795
- const { outputDir, plugins, treeShaking, shared, name, manifest, injectTreeShakingUsedExports, library, treeShakingSharedExcludePlugins } = options;
70935
+ const { outputDir, plugins, treeShaking, shared, name, manifest, injectTreeShakingUsedExports, library, treeShakingSharedExcludePlugins, onBuildAssets } = options;
70796
70936
  this.shared = shared;
70797
70937
  this.mfName = name;
70798
70938
  this.outputDir = outputDir || 'independent-packages';
@@ -70802,6 +70942,7 @@ class IndependentSharedPlugin {
70802
70942
  this.injectTreeShakingUsedExports = injectTreeShakingUsedExports ?? true;
70803
70943
  this.library = library;
70804
70944
  this.treeShakingSharedExcludePlugins = treeShakingSharedExcludePlugins || [];
70945
+ this.onBuildAssets = onBuildAssets;
70805
70946
  this.sharedOptions = parseOptions(shared, (item, key)=>{
70806
70947
  if ('string' != typeof item) throw new Error(`Unexpected array in shared configuration for key "${key}"`);
70807
70948
  const config = item !== key && isRequiredVersion(item) ? {
@@ -70815,16 +70956,19 @@ class IndependentSharedPlugin {
70815
70956
  }
70816
70957
  apply(compiler) {
70817
70958
  const { manifest } = this;
70818
- let runCount = 0;
70819
- compiler.hooks.beforeRun.tapPromise('IndependentSharedPlugin', async ()=>{
70820
- if (runCount) return;
70821
- await this.createIndependentCompilers(compiler);
70822
- runCount++;
70959
+ const collectSharedEntryPlugin = new CollectSharedEntryPlugin({
70960
+ sharedOptions: this.sharedOptions,
70961
+ shareScope: 'default'
70823
70962
  });
70824
- compiler.hooks.watchRun.tapPromise('IndependentSharedPlugin', async ()=>{
70825
- if (runCount) return;
70826
- await this.createIndependentCompilers(compiler);
70827
- runCount++;
70963
+ collectSharedEntryPlugin.apply(compiler);
70964
+ compiler.hooks.finishMake.tapPromise({
70965
+ name: 'IndependentSharedPlugin',
70966
+ stage: BUILD_SHARED_FALLBACK_STAGE
70967
+ }, async ()=>{
70968
+ const shareRequestsMap = collectSharedEntryPlugin.getData();
70969
+ this.prepareBuildAssets(shareRequestsMap);
70970
+ await this.createIndependentCompilers(compiler, shareRequestsMap);
70971
+ this.onBuildAssets?.(this.buildAssets);
70828
70972
  });
70829
70973
  if (manifest) compiler.hooks.compilation.tap('IndependentSharedPlugin', (compilation)=>{
70830
70974
  compilation.hooks.processAssets.tap({
@@ -70854,16 +70998,44 @@ class IndependentSharedPlugin {
70854
70998
  });
70855
70999
  });
70856
71000
  }
70857
- async createIndependentCompilers(parentCompiler) {
70858
- const { sharedOptions, buildAssets, outputDir } = this;
71001
+ prepareBuildAssets(shareRequestsMap) {
71002
+ const { sharedOptions, outputDir, mfName, treeShaking, library } = this;
71003
+ const buildAssets = {};
71004
+ sharedOptions.forEach(([shareName, shareConfig])=>{
71005
+ if (!shareConfig.treeShaking || false === shareConfig.import) return;
71006
+ const sharedConfig = sharedOptions.find(([name])=>name === shareName)?.[1];
71007
+ const shareRequests = getShareRequests(shareRequestsMap, shareName);
71008
+ shareRequests.forEach(([request, version])=>{
71009
+ const sharedContainerPlugin = new SharedContainerPlugin({
71010
+ mfName: `${mfName}_${treeShaking ? 't' : 'f'}`,
71011
+ library,
71012
+ shareName,
71013
+ version,
71014
+ request,
71015
+ independentShareFileName: sharedConfig?.treeShaking?.filename
71016
+ });
71017
+ const [shareFileName, globalName, sharedVersion] = sharedContainerPlugin.getData();
71018
+ if ('string' == typeof shareFileName) {
71019
+ buildAssets[shareName] ||= [];
71020
+ buildAssets[shareName].push([
71021
+ (0, path_browserify.join)(resolveOutputDir(outputDir, shareName), shareFileName),
71022
+ sharedVersion,
71023
+ globalName
71024
+ ]);
71025
+ }
71026
+ });
71027
+ });
71028
+ this.buildAssets = buildAssets;
71029
+ }
71030
+ async createIndependentCompilers(parentCompiler, shareRequestsMap) {
71031
+ const { sharedOptions } = this;
70859
71032
  console.log('Start building shared fallback resources ...');
70860
- const shareRequestsMap = await this.createIndependentCompiler(parentCompiler);
70861
71033
  await Promise.all(sharedOptions.map(async ([shareName, shareConfig])=>{
70862
71034
  if (!shareConfig.treeShaking || false === shareConfig.import) return;
70863
- const shareRequests = shareRequestsMap[shareName].requests;
71035
+ const shareRequests = getShareRequests(shareRequestsMap, shareName);
70864
71036
  await Promise.all(shareRequests.map(async ([request, version])=>{
70865
71037
  const sharedConfig = sharedOptions.find(([name])=>name === shareName)?.[1];
70866
- const [shareFileName, globalName, sharedVersion] = await this.createIndependentCompiler(parentCompiler, {
71038
+ await this.createIndependentCompiler(parentCompiler, {
70867
71039
  shareRequestsMap,
70868
71040
  currentShare: {
70869
71041
  shareName,
@@ -70872,32 +71044,20 @@ class IndependentSharedPlugin {
70872
71044
  independentShareFileName: sharedConfig?.treeShaking?.filename
70873
71045
  }
70874
71046
  });
70875
- if ('string' == typeof shareFileName) {
70876
- buildAssets[shareName] ||= [];
70877
- buildAssets[shareName].push([
70878
- (0, path_browserify.join)(resolveOutputDir(outputDir, shareName), shareFileName),
70879
- sharedVersion,
70880
- globalName
70881
- ]);
70882
- }
70883
71047
  }));
70884
71048
  }));
70885
71049
  console.log('All shared fallback have been compiled successfully!');
70886
71050
  }
70887
71051
  async createIndependentCompiler(parentCompiler, extraOptions) {
70888
71052
  const { mfName, plugins, outputDir, sharedOptions, treeShaking, library, treeShakingSharedExcludePlugins } = this;
70889
- const outputDirWithShareName = resolveOutputDir(outputDir, extraOptions?.currentShare?.shareName || '');
71053
+ const outputDirWithShareName = resolveOutputDir(outputDir, extraOptions.currentShare.shareName);
70890
71054
  const parentConfig = parentCompiler.options;
70891
71055
  const finalPlugins = [];
70892
71056
  const rspack = parentCompiler.rspack;
70893
- let extraPlugin;
70894
- extraPlugin = extraOptions ? new SharedContainerPlugin({
71057
+ const extraPlugin = new SharedContainerPlugin({
70895
71058
  mfName: `${mfName}_${treeShaking ? 't' : 'f'}`,
70896
71059
  library,
70897
71060
  ...extraOptions.currentShare
70898
- }) : new CollectSharedEntryPlugin({
70899
- sharedOptions,
70900
- shareScope: 'default'
70901
71061
  });
70902
71062
  (parentConfig.plugins || []).forEach((plugin)=>{
70903
71063
  if (void 0 !== plugin && 'string' != typeof plugin && filterPlugin(plugin, treeShakingSharedExcludePlugins)) finalPlugins.push(plugin);
@@ -70907,9 +71067,9 @@ class IndependentSharedPlugin {
70907
71067
  });
70908
71068
  finalPlugins.push(extraPlugin);
70909
71069
  finalPlugins.push(new ConsumeSharedPlugin({
70910
- consumes: sharedOptions.filter(([key, options])=>extraOptions?.currentShare.shareName !== (options.shareKey || key)).map(([key, options])=>({
71070
+ consumes: sharedOptions.filter(([key, options])=>extraOptions.currentShare.shareName !== (options.shareKey || key)).map(([key, options])=>({
70911
71071
  [key]: {
70912
- import: extraOptions ? false : options.import,
71072
+ import: false,
70913
71073
  shareKey: options.shareKey || key,
70914
71074
  shareScope: options.shareScope,
70915
71075
  requiredVersion: options.requiredVersion,
@@ -70922,10 +71082,11 @@ class IndependentSharedPlugin {
70922
71082
  enhanced: true
70923
71083
  }));
70924
71084
  if (treeShaking) finalPlugins.push(new SharedUsedExportsOptimizerPlugin(sharedOptions, this.injectTreeShakingUsedExports));
70925
- finalPlugins.push(new VirtualEntryPlugin(sharedOptions, !extraOptions));
71085
+ finalPlugins.push(new VirtualEntryPlugin(sharedOptions, false));
70926
71086
  const fullOutputDir = (0, path_browserify.resolve)(parentCompiler.outputPath, outputDirWithShareName);
70927
71087
  const compilerConfig = {
70928
71088
  ...parentConfig,
71089
+ name: parentConfig.name || 'mf-shared-compiler',
70929
71090
  module: {
70930
71091
  ...parentConfig.module,
70931
71092
  rules: [
@@ -70946,7 +71107,7 @@ class IndependentSharedPlugin {
70946
71107
  entry: VirtualEntryPlugin.entry,
70947
71108
  output: {
70948
71109
  path: fullOutputDir,
70949
- clean: true,
71110
+ clean: false,
70950
71111
  publicPath: parentConfig.output?.publicPath || 'auto'
70951
71112
  },
70952
71113
  plugins: finalPlugins,
@@ -70959,16 +71120,15 @@ class IndependentSharedPlugin {
70959
71120
  compiler.inputFileSystem = parentCompiler.inputFileSystem;
70960
71121
  compiler.outputFileSystem = parentCompiler.outputFileSystem;
70961
71122
  compiler.intermediateFileSystem = parentCompiler.intermediateFileSystem;
70962
- const { currentShare } = extraOptions || {};
71123
+ const { currentShare } = extraOptions;
70963
71124
  return new Promise((resolve, reject)=>{
70964
71125
  compiler.run((err, stats)=>{
70965
71126
  if (err || stats?.hasErrors()) {
70966
- const target = currentShare ? currentShare.shareName : 'Collect deps';
70967
- console.error(`${target} Compile failed:`, err || stats.toJson().errors.map((e)=>e.message).join('\n'));
70968
- reject(err || new Error(`${target} Compile failed`));
71127
+ console.error(`${currentShare.shareName} Compile failed:`, err || stats.toJson().errors.map((e)=>e.message).join('\n'));
71128
+ reject(err || new Error(`${currentShare.shareName} Compile failed`));
70969
71129
  return;
70970
71130
  }
70971
- if (currentShare) console.log(`${currentShare.shareName} Compile success`);
71131
+ console.log(`${currentShare.shareName} Compile success`);
70972
71132
  resolve(extraPlugin.getData());
70973
71133
  });
70974
71134
  });
@@ -70978,13 +71138,15 @@ class TreeShakingSharedPlugin {
70978
71138
  mfConfig;
70979
71139
  outputDir;
70980
71140
  secondary;
71141
+ onBuildAssets;
70981
71142
  _independentSharePlugin;
70982
71143
  name = 'TreeShakingSharedPlugin';
70983
71144
  constructor(options){
70984
- const { mfConfig, secondary } = options;
71145
+ const { mfConfig, secondary, onBuildAssets } = options;
70985
71146
  this.mfConfig = mfConfig;
70986
71147
  this.outputDir = mfConfig.treeShakingSharedDir || 'independent-packages';
70987
71148
  this.secondary = Boolean(secondary);
71149
+ this.onBuildAssets = onBuildAssets;
70988
71150
  }
70989
71151
  apply(compiler) {
70990
71152
  const { mfConfig, outputDir, secondary } = this;
@@ -71005,7 +71167,8 @@ class TreeShakingSharedPlugin {
71005
71167
  treeShaking: secondary,
71006
71168
  library,
71007
71169
  manifest: mfConfig.manifest,
71008
- treeShakingSharedExcludePlugins: mfConfig.treeShakingSharedExcludePlugins
71170
+ treeShakingSharedExcludePlugins: mfConfig.treeShakingSharedExcludePlugins,
71171
+ onBuildAssets: this.onBuildAssets
71009
71172
  });
71010
71173
  this._independentSharePlugin.apply(compiler);
71011
71174
  }
@@ -71015,6 +71178,7 @@ class TreeShakingSharedPlugin {
71015
71178
  }
71016
71179
  }
71017
71180
  const ModuleFederationRuntimePlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.ModuleFederationRuntimePlugin, (options = {})=>options);
71181
+ const MF_RUNTIME_LOADER = '@module-federation/runtime/rspack.js';
71018
71182
  class ModuleFederationPlugin {
71019
71183
  _options;
71020
71184
  _treeShakingSharedPlugin;
@@ -71031,10 +71195,20 @@ class ModuleFederationPlugin {
71031
71195
  };
71032
71196
  const sharedOptions = getSharedOptions(this._options);
71033
71197
  const treeShakingEntries = sharedOptions.filter(([, config])=>config.treeShaking);
71198
+ const runtimeVirtualPath = treeShakingEntries.length > 0 ? getRuntimeVirtualPath(this._options, compiler) : void 0;
71199
+ const runtimeVirtualPlugin = runtimeVirtualPath ? new rspack.experiments.VirtualModulesPlugin({
71200
+ [runtimeVirtualPath]: getDefaultEntryRuntimeSource(paths, this._options, compiler)
71201
+ }) : void 0;
71202
+ runtimeVirtualPlugin?.apply(compiler);
71203
+ const updateRuntimeShareFallbacks = (buildAssets)=>{
71204
+ if (!runtimeVirtualPath || !runtimeVirtualPlugin) return;
71205
+ runtimeVirtualPlugin.writeModule(runtimeVirtualPath, getDefaultEntryRuntimeSource(paths, this._options, compiler, buildAssets));
71206
+ };
71034
71207
  if (treeShakingEntries.length > 0) {
71035
71208
  this._treeShakingSharedPlugin = new TreeShakingSharedPlugin({
71036
71209
  mfConfig: this._options,
71037
- secondary: false
71210
+ secondary: false,
71211
+ onBuildAssets: updateRuntimeShareFallbacks
71038
71212
  });
71039
71213
  this._treeShakingSharedPlugin.apply(compiler);
71040
71214
  }
@@ -71049,7 +71223,7 @@ class ModuleFederationPlugin {
71049
71223
  }, ()=>{
71050
71224
  if (runtimePluginApplied) return;
71051
71225
  runtimePluginApplied = true;
71052
- const entryRuntime = getDefaultEntryRuntime(paths, this._options, compiler, this._treeShakingSharedPlugin?.buildAssets);
71226
+ const entryRuntime = runtimeVirtualPath ? getDefaultEntryRuntimeRequest(runtimeVirtualPath) : getDefaultEntryRuntime(paths, this._options, compiler);
71053
71227
  new ModuleFederationRuntimePlugin({
71054
71228
  entryRuntime,
71055
71229
  experiments: runtimeExperiments
@@ -71061,7 +71235,7 @@ class ModuleFederationPlugin {
71061
71235
  }, ()=>{
71062
71236
  if (runtimePluginApplied) return;
71063
71237
  runtimePluginApplied = true;
71064
- const entryRuntime = getDefaultEntryRuntime(paths, this._options, compiler, this._treeShakingSharedPlugin?.buildAssets || {});
71238
+ const entryRuntime = runtimeVirtualPath ? getDefaultEntryRuntimeRequest(runtimeVirtualPath) : getDefaultEntryRuntime(paths, this._options, compiler);
71065
71239
  new ModuleFederationRuntimePlugin({
71066
71240
  entryRuntime,
71067
71241
  experiments: runtimeExperiments
@@ -71168,12 +71342,20 @@ function getPaths(options, compiler) {
71168
71342
  runtime: '@module-federation/runtime'
71169
71343
  };
71170
71344
  }
71171
- function getDefaultEntryRuntime(paths, options, compiler, treeShakingShareFallbacks) {
71345
+ function getRuntimeVirtualPath(options, compiler) {
71346
+ const name = String(options.name ?? compiler.options.output.uniqueName ?? 'default').replace(/[^\w.-]/g, '_');
71347
+ return (0, path_browserify.resolve)(compiler.context, `node_modules/.rspack-mf-runtime/${name}.js`);
71348
+ }
71349
+ function getDefaultEntryRuntimeRequest(resource) {
71350
+ return `${MF_RUNTIME_LOADER}!=!${resource}`;
71351
+ }
71352
+ function getDefaultEntryRuntimeSource(paths, options, compiler, treeShakingShareFallbacks) {
71172
71353
  const runtimePlugins = getRuntimePlugins(options);
71173
71354
  const remoteInfos = getRemoteInfos(options);
71174
71355
  const runtimePluginImports = [];
71175
71356
  const runtimePluginVars = [];
71176
71357
  const libraryType = options.library?.type || 'var';
71358
+ const shouldInitializePublicPath = getSharedOptions(options).some(([, config])=>config.treeShaking);
71177
71359
  for(let i = 0; i < runtimePlugins.length; i++){
71178
71360
  const runtimePluginVar = `__module_federation_runtime_plugin_${i}__`;
71179
71361
  const pluginSpec = runtimePlugins[i];
@@ -71186,6 +71368,7 @@ function getDefaultEntryRuntime(paths, options, compiler, treeShakingShareFallba
71186
71368
  const content = [
71187
71369
  `import __module_federation_bundler_runtime__ from ${JSON.stringify(paths.bundlerRuntime)}`,
71188
71370
  ...runtimePluginImports,
71371
+ shouldInitializePublicPath ? getPublicPathRuntimeSource(compiler) : void 0,
71189
71372
  `const __module_federation_runtime_plugins__ = [${runtimePluginVars.join(', ')}].filter(({ plugin }) => plugin).map(({ plugin, params }) => plugin(params))`,
71190
71373
  `const __module_federation_remote_infos__ = ${JSON.stringify(remoteInfos)}`,
71191
71374
  `const __module_federation_container_name__ = ${JSON.stringify(options.name ?? compiler.options.output.uniqueName)}`,
@@ -71194,7 +71377,15 @@ function getDefaultEntryRuntime(paths, options, compiler, treeShakingShareFallba
71194
71377
  `const __module_federation_library_type__ = ${JSON.stringify(libraryType)}`,
71195
71378
  'if((__webpack_require__.initializeSharingData||__webpack_require__.initializeExposesData)&&__webpack_require__.federation){var _ref,_ref1,_ref2,_ref3,_ref4;var __webpack_require___remotesLoadingData,__webpack_require___remotesLoadingData1,__webpack_require___initializeSharingData,__webpack_require___consumesLoadingData,__webpack_require___consumesLoadingData1,__webpack_require___initializeExposesData,__webpack_require___consumesLoadingData2;const override=(obj,key,value)=>{if(!obj)return;if(obj[key])obj[key]=value};const merge=(obj,key,fn)=>{const value=fn();if(Array.isArray(value)){var _obj,_key,_;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=[];obj[key].push(...value)}else if(typeof value==="object"&&value!==null){var _obj1,_key1,_1;(_1=(_obj1=obj)[_key1=key])!==null&&_1!==void 0?_1:_obj1[_key1]={};Object.assign(obj[key],value)}};const early=(obj,key,initial)=>{var _obj,_key,_;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=initial()};const remotesLoadingChunkMapping=(_ref=(__webpack_require___remotesLoadingData=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData===void 0?void 0:__webpack_require___remotesLoadingData.chunkMapping)!==null&&_ref!==void 0?_ref:{};const remotesLoadingModuleIdToRemoteDataMapping=(_ref1=(__webpack_require___remotesLoadingData1=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData1===void 0?void 0:__webpack_require___remotesLoadingData1.moduleIdToRemoteDataMapping)!==null&&_ref1!==void 0?_ref1:{};const initializeSharingScopeToInitDataMapping=(_ref2=(__webpack_require___initializeSharingData=__webpack_require__.initializeSharingData)===null||__webpack_require___initializeSharingData===void 0?void 0:__webpack_require___initializeSharingData.scopeToSharingDataMapping)!==null&&_ref2!==void 0?_ref2:{};const consumesLoadingChunkMapping=(_ref3=(__webpack_require___consumesLoadingData=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData===void 0?void 0:__webpack_require___consumesLoadingData.chunkMapping)!==null&&_ref3!==void 0?_ref3:{};const consumesLoadingModuleToConsumeDataMapping=(_ref4=(__webpack_require___consumesLoadingData1=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData1===void 0?void 0:__webpack_require___consumesLoadingData1.moduleIdToConsumeDataMapping)!==null&&_ref4!==void 0?_ref4:{};const consumesLoadinginstalledModules={};const initializeSharingInitPromises=[];const initializeSharingInitTokens={};const containerShareScope=(__webpack_require___initializeExposesData=__webpack_require__.initializeExposesData)===null||__webpack_require___initializeExposesData===void 0?void 0:__webpack_require___initializeExposesData.shareScope;for(const key in __module_federation_bundler_runtime__){__webpack_require__.federation[key]=__module_federation_bundler_runtime__[key]}early(__webpack_require__.federation,"libraryType",()=>__module_federation_library_type__);early(__webpack_require__.federation,"sharedFallback",()=>__module_federation_share_fallbacks__);const sharedFallback=__webpack_require__.federation.sharedFallback;early(__webpack_require__.federation,"consumesLoadingModuleToHandlerMapping",()=>{const consumesLoadingModuleToHandlerMapping={};for(let[moduleId,data]of Object.entries(consumesLoadingModuleToConsumeDataMapping)){var __webpack_require___federation_bundlerRuntime;consumesLoadingModuleToHandlerMapping[moduleId]={getter:sharedFallback?(__webpack_require___federation_bundlerRuntime=__webpack_require__.federation.bundlerRuntime)===null||__webpack_require___federation_bundlerRuntime===void 0?void 0:__webpack_require___federation_bundlerRuntime.getSharedFallbackGetter({shareKey:data.shareKey,factory:data.fallback,webpackRequire:__webpack_require__,libraryType:__webpack_require__.federation.libraryType}):data.fallback,treeShakingGetter:sharedFallback?data.fallback:undefined,shareInfo:{shareConfig:{fixedDependencies:false,requiredVersion:data.requiredVersion,strictVersion:data.strictVersion,singleton:data.singleton,eager:data.eager},scope:[data.shareScope]},shareKey:data.shareKey,treeShaking:__webpack_require__.federation.sharedFallback?{get:data.fallback,mode:data.treeShakingMode}:undefined}}return consumesLoadingModuleToHandlerMapping});early(__webpack_require__.federation,"initOptions",()=>({}));early(__webpack_require__.federation.initOptions,"name",()=>__module_federation_container_name__);early(__webpack_require__.federation.initOptions,"shareStrategy",()=>__module_federation_share_strategy__);early(__webpack_require__.federation.initOptions,"shared",()=>{const shared={};for(let[scope,stages]of Object.entries(initializeSharingScopeToInitDataMapping)){for(let stage of stages){if(typeof stage==="object"&&stage!==null){const{name,version,factory,eager,singleton,requiredVersion,strictVersion,treeShakingMode}=stage;const shareConfig={};const isValidValue=function(val){return typeof val!=="undefined"};if(isValidValue(singleton)){shareConfig.singleton=singleton}if(isValidValue(requiredVersion)){shareConfig.requiredVersion=requiredVersion}if(isValidValue(eager)){shareConfig.eager=eager}if(isValidValue(strictVersion)){shareConfig.strictVersion=strictVersion}const options={version,scope:[scope],shareConfig,get:factory,treeShaking:treeShakingMode?{mode:treeShakingMode}:undefined};if(shared[name]){shared[name].push(options)}else{shared[name]=[options]}}}}return shared});merge(__webpack_require__.federation.initOptions,"remotes",()=>Object.values(__module_federation_remote_infos__).flat().filter(remote=>remote.externalType==="script"));merge(__webpack_require__.federation.initOptions,"plugins",()=>__module_federation_runtime_plugins__);early(__webpack_require__.federation,"bundlerRuntimeOptions",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions,"remotes",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"chunkMapping",()=>remotesLoadingChunkMapping);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"remoteInfos",()=>__module_federation_remote_infos__);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"idToExternalAndNameMapping",()=>{const remotesLoadingIdToExternalAndNameMappingMapping={};for(let[moduleId,data]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){remotesLoadingIdToExternalAndNameMappingMapping[moduleId]=[data.shareScope,data.name,data.externalModuleId,data.remoteName]}return remotesLoadingIdToExternalAndNameMappingMapping});early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"webpackRequire",()=>__webpack_require__);merge(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"idToRemoteMap",()=>{const idToRemoteMap={};for(let[id,remoteData]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){const info=__module_federation_remote_infos__[remoteData.remoteName];if(info)idToRemoteMap[id]=info}return idToRemoteMap});override(__webpack_require__,"S",__webpack_require__.federation.bundlerRuntime.S);if(__webpack_require__.federation.attachShareScopeMap){__webpack_require__.federation.attachShareScopeMap(__webpack_require__)}override(__webpack_require__.f,"remotes",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.remotes({chunkId,promises,chunkMapping:remotesLoadingChunkMapping,idToExternalAndNameMapping:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:__webpack_require__}));override(__webpack_require__.f,"consumes",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.consumes({chunkId,promises,chunkMapping:consumesLoadingChunkMapping,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping,installedModules:consumesLoadinginstalledModules,webpackRequire:__webpack_require__}));override(__webpack_require__,"I",(name,initScope)=>__webpack_require__.federation.bundlerRuntime.I({shareScopeName:name,initScope,initPromises:initializeSharingInitPromises,initTokens:initializeSharingInitTokens,webpackRequire:__webpack_require__}));override(__webpack_require__,"initContainer",(shareScope,initScope,remoteEntryInitOptions)=>__webpack_require__.federation.bundlerRuntime.initContainerEntry({shareScope,initScope,remoteEntryInitOptions,shareScopeKey:containerShareScope,webpackRequire:__webpack_require__}));override(__webpack_require__,"getContainer",(module,getScope)=>{var moduleMap=__webpack_require__.initializeExposesData.moduleMap;__webpack_require__.R=getScope;getScope=Object.prototype.hasOwnProperty.call(moduleMap,module)?moduleMap[module]():Promise.resolve().then(()=>{throw new Error(\'Module "\'+module+\'" does not exist in container.\')});__webpack_require__.R=undefined;return getScope});__webpack_require__.federation.instance=__webpack_require__.federation.bundlerRuntime.init({webpackRequire:__webpack_require__});if((__webpack_require___consumesLoadingData2=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData2===void 0?void 0:__webpack_require___consumesLoadingData2.initialConsumes){__webpack_require__.federation.bundlerRuntime.installInitialConsumes({webpackRequire:__webpack_require__,installedModules:consumesLoadinginstalledModules,initialConsumes:__webpack_require__.consumesLoadingData.initialConsumes,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping})}}'
71196
71379
  ].join(';');
71197
- return `@module-federation/runtime/rspack.js!=!data:text/javascript,${encodeURIComponent(content)}`;
71380
+ return content;
71381
+ }
71382
+ function getPublicPathRuntimeSource(compiler) {
71383
+ const publicPath = compiler.options.output.publicPath;
71384
+ if ('string' != typeof publicPath || 'auto' === publicPath) return;
71385
+ return `if (typeof __webpack_require__.p === "undefined") __webpack_require__.p = ${JSON.stringify(publicPath)}`;
71386
+ }
71387
+ function getDefaultEntryRuntime(paths, options, compiler, treeShakingShareFallbacks) {
71388
+ return `${MF_RUNTIME_LOADER}!=!data:text/javascript,${encodeURIComponent(getDefaultEntryRuntimeSource(paths, options, compiler, treeShakingShareFallbacks))}`;
71198
71389
  }
71199
71390
  class ContainerPlugin extends RspackBuiltinPlugin {
71200
71391
  name = external_rspack_wasi_browser_js_BuiltinPluginName.ContainerPlugin;
@@ -71354,7 +71545,7 @@ function transformSync(source, options) {
71354
71545
  const _options = JSON.stringify(options || {});
71355
71546
  return rspack_wasi_browser.transformSync(source, _options);
71356
71547
  }
71357
- const exports_rspackVersion = "2.0.6";
71548
+ const exports_rspackVersion = "2.0.7";
71358
71549
  const exports_version = "5.75.0";
71359
71550
  const exports_WebpackError = Error;
71360
71551
  const exports_config = {
@@ -71445,6 +71636,9 @@ const exports_experiments = {
71445
71636
  CssChunkingPlugin: CssChunkingPlugin,
71446
71637
  createNativePlugin: createNativePlugin,
71447
71638
  VirtualModulesPlugin: VirtualModulesPlugin,
71639
+ ids: {
71640
+ SyncModuleIdsPlugin: SyncModuleIdsPlugin
71641
+ },
71448
71642
  rsc: rsc
71449
71643
  };
71450
71644
  const src_fn = Object.assign(rspack_rspack, exports_namespaceObject);
@@ -71620,4 +71814,4 @@ const builtinMemFs = {
71620
71814
  volume: fs_0.volume,
71621
71815
  memfs: fs_0.memfs
71622
71816
  };
71623
- export { AsyncDependenciesBlock, BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin, CaseSensitivePlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ConcatenatedModule, ContextModule, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, DefaultRuntimeGlobals as RuntimeGlobals, DefinePlugin, Dependency, DllPlugin, DllReferencePlugin, DynamicEntryPlugin, EntryDependency, EntryPlugin, EnvironmentPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, ExternalModule, ExternalsPlugin, HotModuleReplacementPlugin, HtmlRspackPlugin, IgnorePlugin, LightningCssMinimizerRspackPlugin, LoaderOptionsPlugin, LoaderTargetPlugin, Module, ModuleFilenameHelpers_namespaceObject as ModuleFilenameHelpers, ModuleGraphConnection_ModuleGraphConnection as ModuleGraphConnection, MultiCompiler, MultiStats, NoEmitOnErrorsPlugin, NormalModule, NormalModuleReplacementPlugin, ProgressPlugin, ProvidePlugin, RspackOptionsApply, RspackOptionsApply as WebpackOptionsApply, RuntimeModule, RuntimePlugin, SourceMapDevToolPlugin, Stats, SubresourceIntegrityPlugin, SwcJsMinimizerRspackPlugin, Template, ValidationError, builtinMemFs, container, electron, exports_WebpackError as WebpackError, exports_config as config, exports_experiments as experiments, exports_library as library, exports_node as node, exports_rspackVersion as rspackVersion, exports_version as version, exports_wasm as wasm, ids, javascript, lazyCompilationMiddleware, lib_EntryOptionPlugin as EntryOptionPlugin, optimize, sharing, src_rspack_0 as "module.exports", src_rspack_0 as rspack, statsFactoryUtils_StatsErrorCode as StatsErrorCode, util, web, webpack_sources_lib as sources, webworker };
71817
+ export { AsyncDependenciesBlock, BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin, CaseSensitivePlugin, CircularCheckRspackPlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ConcatenatedModule, ContextModule, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, DefaultRuntimeGlobals as RuntimeGlobals, DefinePlugin, Dependency, DllPlugin, DllReferencePlugin, DynamicEntryPlugin, EntryDependency, EntryPlugin, EnvironmentPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, ExternalModule, ExternalsPlugin, HotModuleReplacementPlugin, HtmlRspackPlugin, IgnorePlugin, LightningCssMinimizerRspackPlugin, LoaderOptionsPlugin, LoaderTargetPlugin, Module, ModuleFilenameHelpers_namespaceObject as ModuleFilenameHelpers, ModuleGraphConnection_ModuleGraphConnection as ModuleGraphConnection, MultiCompiler, MultiStats, NoEmitOnErrorsPlugin, NormalModule, NormalModuleReplacementPlugin, ProgressPlugin, ProvidePlugin, RspackOptionsApply, RspackOptionsApply as WebpackOptionsApply, RuntimeModule, RuntimePlugin, SourceMapDevToolPlugin, Stats, SubresourceIntegrityPlugin, SwcJsMinimizerRspackPlugin, Template, ValidationError, builtinMemFs, container, electron, exports_WebpackError as WebpackError, exports_config as config, exports_experiments as experiments, exports_library as library, exports_node as node, exports_rspackVersion as rspackVersion, exports_version as version, exports_wasm as wasm, ids, javascript, lazyCompilationMiddleware, lib_EntryOptionPlugin as EntryOptionPlugin, optimize, sharing, src_rspack_0 as "module.exports", src_rspack_0 as rspack, statsFactoryUtils_StatsErrorCode as StatsErrorCode, util, web, webpack_sources_lib as sources, webworker };