@rspack-canary/browser 1.4.12-canary-4f117639-20250801102630 → 1.4.12-canary-becf0a0e-20250808091433

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.
Files changed (77) hide show
  1. package/dist/Compilation.d.ts +2 -2
  2. package/dist/NativeWatchFileSystem.d.ts +2 -1
  3. package/dist/NormalModuleFactory.d.ts +2 -2
  4. package/dist/Resolver.d.ts +0 -6
  5. package/dist/ResolverFactory.d.ts +8 -5
  6. package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
  7. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
  8. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
  9. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
  10. package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
  11. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
  12. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
  13. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
  14. package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +1 -1
  15. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
  16. package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
  17. package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
  18. package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
  19. package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
  20. package/dist/builtin-plugin/DllEntryPlugin.d.ts +1 -1
  21. package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +1 -1
  22. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
  23. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
  24. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
  25. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
  26. package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
  27. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
  28. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
  29. package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
  30. package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
  31. package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +1 -1
  32. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
  33. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
  34. package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
  35. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
  36. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
  37. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
  38. package/dist/builtin-plugin/LibManifestPlugin.d.ts +1 -1
  39. package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +1 -1
  40. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
  41. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
  42. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
  43. package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +1 -1
  44. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
  45. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
  46. package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +1 -1
  47. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
  48. package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +1 -1
  49. package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
  50. package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
  51. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
  52. package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +1 -1
  53. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
  54. package/dist/builtin-plugin/RsdoctorPlugin.d.ts +1 -1
  55. package/dist/builtin-plugin/RslibPlugin.d.ts +1 -1
  56. package/dist/builtin-plugin/RstestPlugin.d.ts +1 -1
  57. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
  58. package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
  59. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
  60. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
  61. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
  62. package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +1 -1
  63. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
  64. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
  65. package/dist/builtin-plugin/base.d.ts +2 -2
  66. package/dist/builtin-plugin/html-plugin/plugin.d.ts +1 -1
  67. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
  68. package/dist/config/normalization.d.ts +1 -0
  69. package/dist/config/types.d.ts +9 -4
  70. package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
  71. package/dist/exports.d.ts +1 -1
  72. package/dist/index.mjs +135 -65
  73. package/dist/rspack.wasm32-wasi.wasm +0 -0
  74. package/dist/schema/config.d.ts +48 -47
  75. package/dist/schema/loaders.d.ts +5 -5
  76. package/dist/schema/plugins.d.ts +10 -10
  77. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -39735,7 +39735,7 @@ async function runLoaders(compiler, context) {
39735
39735
  resource: loaderContext.resource,
39736
39736
  mode: loaderContext.mode,
39737
39737
  sourceMap: loaderContext.sourceMap,
39738
- rootContext: loaderContext.context,
39738
+ rootContext: loaderContext.rootContext,
39739
39739
  loaderIndex: loaderContext.loaderIndex,
39740
39740
  loaders: loaderContext.loaders.map((item)=>{
39741
39741
  let options = item.options;
@@ -40173,19 +40173,21 @@ function getRawOutputEnvironment(environment = {}) {
40173
40173
  };
40174
40174
  }
40175
40175
  function getRawExtensionAlias(alias = {}) {
40176
- const entries = Object.entries(alias).map(([key, value])=>{
40177
- if (Array.isArray(value)) return [
40178
- key,
40179
- value
40180
- ];
40181
- return [
40182
- key,
40183
- [
40176
+ if ("object" == typeof alias && null !== alias) {
40177
+ const entries = Object.entries(alias).map(([key, value])=>{
40178
+ if (Array.isArray(value)) return [
40179
+ key,
40184
40180
  value
40185
- ]
40186
- ];
40187
- });
40188
- return Object.fromEntries(entries);
40181
+ ];
40182
+ return [
40183
+ key,
40184
+ [
40185
+ value
40186
+ ]
40187
+ ];
40188
+ });
40189
+ return Object.fromEntries(entries);
40190
+ }
40189
40191
  }
40190
40192
  function getRawAlias(alias = {}) {
40191
40193
  if ("object" == typeof alias && null !== alias && !Array.isArray(alias)) return Object.entries(alias).map(([key, value])=>({
@@ -40592,6 +40594,14 @@ function ExternalsPlugin_class_private_field_set(receiver, privateMap, value) {
40592
40594
  ExternalsPlugin_class_apply_descriptor_set(receiver, descriptor, value);
40593
40595
  return value;
40594
40596
  }
40597
+ function ExternalsPlugin_class_private_method_get(receiver, privateSet, fn) {
40598
+ if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance");
40599
+ return fn;
40600
+ }
40601
+ function ExternalsPlugin_class_private_method_init(obj, privateSet) {
40602
+ ExternalsPlugin_check_private_redeclaration(obj, privateSet);
40603
+ privateSet.add(obj);
40604
+ }
40595
40605
  function ExternalsPlugin_define_property(obj, key, value) {
40596
40606
  if (key in obj) Object.defineProperty(obj, key, {
40597
40607
  value: value,
@@ -40602,7 +40612,7 @@ function ExternalsPlugin_define_property(obj, key, value) {
40602
40612
  else obj[key] = value;
40603
40613
  return obj;
40604
40614
  }
40605
- var _resolveRequestCache = /*#__PURE__*/ new WeakMap(), _processResolveResult = /*#__PURE__*/ new WeakMap(), _getRawExternalItem = /*#__PURE__*/ new WeakMap();
40615
+ var _resolveRequestCache = /*#__PURE__*/ new WeakMap(), _processResolveResult = /*#__PURE__*/ new WeakMap(), _processRequest = /*#__PURE__*/ new WeakSet(), _getRawExternalItem = /*#__PURE__*/ new WeakMap();
40606
40616
  class ExternalsPlugin extends RspackBuiltinPlugin {
40607
40617
  raw() {
40608
40618
  const type = this.type;
@@ -40616,7 +40626,7 @@ class ExternalsPlugin extends RspackBuiltinPlugin {
40616
40626
  return createBuiltinPlugin(this.name, raw);
40617
40627
  }
40618
40628
  constructor(type, externals){
40619
- super(), ExternalsPlugin_define_property(this, "type", void 0), ExternalsPlugin_define_property(this, "externals", void 0), ExternalsPlugin_define_property(this, "name", void 0), ExternalsPlugin_class_private_field_init(this, _resolveRequestCache, {
40629
+ super(), ExternalsPlugin_class_private_method_init(this, _processRequest), ExternalsPlugin_define_property(this, "type", void 0), ExternalsPlugin_define_property(this, "externals", void 0), ExternalsPlugin_define_property(this, "name", void 0), ExternalsPlugin_class_private_field_init(this, _resolveRequestCache, {
40620
40630
  writable: true,
40621
40631
  value: void 0
40622
40632
  }), ExternalsPlugin_class_private_field_init(this, _processResolveResult, {
@@ -40647,7 +40657,7 @@ class ExternalsPlugin extends RspackBuiltinPlugin {
40647
40657
  issuer: data.contextInfo.issuer,
40648
40658
  issuerLayer: data.contextInfo.issuerLayer ?? null
40649
40659
  },
40650
- getResolve (options) {
40660
+ getResolve: (options)=>{
40651
40661
  const rawResolve = options ? getRawResolve(options) : void 0;
40652
40662
  const resolve = ctx.getResolve(rawResolve);
40653
40663
  return (context, request, callback)=>{
@@ -40656,7 +40666,7 @@ class ExternalsPlugin extends RspackBuiltinPlugin {
40656
40666
  if (error) promiseReject(error);
40657
40667
  else {
40658
40668
  const req = processResolveResult(text);
40659
- promiseResolve(null == req ? void 0 : req.path);
40669
+ promiseResolve(req ? ExternalsPlugin_class_private_method_get(this, _processRequest, processRequest).call(this, req) : void 0);
40660
40670
  }
40661
40671
  });
40662
40672
  });
@@ -40664,7 +40674,7 @@ class ExternalsPlugin extends RspackBuiltinPlugin {
40664
40674
  if (error) callback(error);
40665
40675
  else {
40666
40676
  const req = processResolveResult(text);
40667
- callback(null, (null == req ? void 0 : req.path) ?? false, req);
40677
+ callback(null, req ? ExternalsPlugin_class_private_method_get(this, _processRequest, processRequest).call(this, req) : false, req);
40668
40678
  }
40669
40679
  });
40670
40680
  };
@@ -40694,6 +40704,9 @@ class ExternalsPlugin extends RspackBuiltinPlugin {
40694
40704
  });
40695
40705
  }
40696
40706
  }
40707
+ function processRequest(req) {
40708
+ return `${req.path.replace(/#/g, "\u200b#")}${req.query.replace(/#/g, "\u200b#")}${req.fragment}`;
40709
+ }
40697
40710
  function getRawExternalItemValueFormFnResult(result) {
40698
40711
  return void 0 === result ? result : getRawExternalItemValue(result);
40699
40712
  }
@@ -46972,7 +46985,8 @@ const applyRspackOptionsDefaults = (options)=>{
46972
46985
  css: options.experiments.css,
46973
46986
  targetProperties,
46974
46987
  mode: options.mode,
46975
- uniqueName: options.output.uniqueName
46988
+ uniqueName: options.output.uniqueName,
46989
+ inlineConst: options.experiments.inlineConst
46976
46990
  });
46977
46991
  applyOutputDefaults(options.output, {
46978
46992
  context: options.context,
@@ -47034,6 +47048,7 @@ const applyExperimentsDefaults = (experiments, { production, development })=>{
47034
47048
  D(experiments, "asyncWebAssembly", experiments.futureDefaults);
47035
47049
  D(experiments, "css", experiments.futureDefaults ? true : void 0);
47036
47050
  D(experiments, "layers", false);
47051
+ if (false === experiments.topLevelAwait) console.warn("`experiments.topLevelAwait` config has been deprecated and will be removed in Rspack v2.0. Top-level await will be always enabled. Please remove this option from your Rspack configuration.");
47037
47052
  D(experiments, "topLevelAwait", true);
47038
47053
  D(experiments, "buildHttp", void 0);
47039
47054
  if (experiments.buildHttp && "object" == typeof experiments.buildHttp) D(experiments.buildHttp, "upgrade", false);
@@ -47063,19 +47078,20 @@ const applyExperimentsDefaults = (experiments, { production, development })=>{
47063
47078
  D(experiments, "inlineConst", false);
47064
47079
  D(experiments, "inlineEnum", false);
47065
47080
  D(experiments, "typeReexportsPresence", false);
47081
+ D(experiments, "lazyBarrel", false);
47066
47082
  };
47067
47083
  const applybundlerInfoDefaults = (rspackFuture, library)=>{
47068
47084
  if ("object" == typeof rspackFuture) {
47069
47085
  D(rspackFuture, "bundlerInfo", {});
47070
47086
  if ("object" == typeof rspackFuture.bundlerInfo) {
47071
- D(rspackFuture.bundlerInfo, "version", "1.4.12-canary-4f117639-20250801102630");
47087
+ D(rspackFuture.bundlerInfo, "version", "1.4.12-canary-becf0a0e-20250808091433");
47072
47088
  D(rspackFuture.bundlerInfo, "bundler", "rspack");
47073
47089
  D(rspackFuture.bundlerInfo, "force", !library);
47074
47090
  }
47075
47091
  }
47076
47092
  };
47077
47093
  const applySnapshotDefaults = (_snapshot, _env)=>{};
47078
- const applyJavascriptParserOptionsDefaults = (parserOptions)=>{
47094
+ const applyJavascriptParserOptionsDefaults = (parserOptions, { inlineConst })=>{
47079
47095
  D(parserOptions, "dynamicImportMode", "lazy");
47080
47096
  D(parserOptions, "dynamicImportPrefetch", false);
47081
47097
  D(parserOptions, "dynamicImportPreload", false);
@@ -47092,13 +47108,13 @@ const applyJavascriptParserOptionsDefaults = (parserOptions)=>{
47092
47108
  "..."
47093
47109
  ]);
47094
47110
  D(parserOptions, "importMeta", true);
47095
- D(parserOptions, "inlineConst", false);
47111
+ D(parserOptions, "inlineConst", inlineConst);
47096
47112
  D(parserOptions, "typeReexportsPresence", "no-tolerant");
47097
47113
  };
47098
47114
  const applyJsonGeneratorOptionsDefaults = (generatorOptions)=>{
47099
47115
  D(generatorOptions, "JSONParse", true);
47100
47116
  };
47101
- const applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName })=>{
47117
+ const applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName, inlineConst })=>{
47102
47118
  assertNotNill(module.parser);
47103
47119
  assertNotNill(module.generator);
47104
47120
  defaults_F(module.parser, ASSET_MODULE_TYPE, ()=>({}));
@@ -47107,7 +47123,9 @@ const applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties,
47107
47123
  if ("object" == typeof module.parser.asset.dataUrlCondition) D(module.parser.asset.dataUrlCondition, "maxSize", 8096);
47108
47124
  defaults_F(module.parser, "javascript", ()=>({}));
47109
47125
  assertNotNill(module.parser.javascript);
47110
- applyJavascriptParserOptionsDefaults(module.parser.javascript);
47126
+ applyJavascriptParserOptionsDefaults(module.parser.javascript, {
47127
+ inlineConst
47128
+ });
47111
47129
  defaults_F(module.parser, JSON_MODULE_TYPE, ()=>({}));
47112
47130
  assertNotNill(module.parser[JSON_MODULE_TYPE]);
47113
47131
  D(module.parser[JSON_MODULE_TYPE], "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER);
@@ -48825,7 +48843,7 @@ function Resolver_class_private_field_set(receiver, privateMap, value) {
48825
48843
  Resolver_class_apply_descriptor_set(receiver, descriptor, value);
48826
48844
  return value;
48827
48845
  }
48828
- var _binding = /*#__PURE__*/ new WeakMap(), _childCache = /*#__PURE__*/ new WeakMap();
48846
+ var _binding = /*#__PURE__*/ new WeakMap();
48829
48847
  class Resolver {
48830
48848
  resolveSync(context, path, request) {
48831
48849
  return Resolver_class_private_field_get(this, _binding).resolveSync(path, request) ?? false;
@@ -48837,29 +48855,11 @@ class Resolver {
48837
48855
  callback(error, req ? `${req.path.replace(/#/g, "\u200b#")}${req.query.replace(/#/g, "\u200b#")}${req.fragment}` : false, req);
48838
48856
  });
48839
48857
  }
48840
- withOptions(options) {
48841
- const cacheEntry = Resolver_class_private_field_get(this, _childCache).get(options);
48842
- if (void 0 !== cacheEntry) return cacheEntry;
48843
- const { dependencyCategory, resolveToContext, ...resolve } = options;
48844
- const rawResolve = getRawResolve(resolve);
48845
- const binding = Resolver_class_private_field_get(this, _binding).withOptions({
48846
- dependencyCategory,
48847
- resolveToContext,
48848
- ...rawResolve
48849
- });
48850
- const resolver = new Resolver(binding);
48851
- Resolver_class_private_field_get(this, _childCache).set(options, resolver);
48852
- return resolver;
48853
- }
48854
48858
  constructor(binding){
48855
48859
  Resolver_class_private_field_init(this, _binding, {
48856
48860
  writable: true,
48857
48861
  value: void 0
48858
48862
  });
48859
- Resolver_class_private_field_init(this, _childCache, {
48860
- writable: true,
48861
- value: new WeakMap()
48862
- });
48863
48863
  Resolver_class_private_field_set(this, _binding, binding);
48864
48864
  }
48865
48865
  }
@@ -48894,28 +48894,74 @@ function ResolverFactory_class_private_field_set(receiver, privateMap, value) {
48894
48894
  ResolverFactory_class_apply_descriptor_set(receiver, descriptor, value);
48895
48895
  return value;
48896
48896
  }
48897
- var ResolverFactory_binding = /*#__PURE__*/ new WeakMap();
48897
+ function ResolverFactory_class_private_method_get(receiver, privateSet, fn) {
48898
+ if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance");
48899
+ return fn;
48900
+ }
48901
+ function ResolverFactory_class_private_method_init(obj, privateSet) {
48902
+ ResolverFactory_check_private_redeclaration(obj, privateSet);
48903
+ privateSet.add(obj);
48904
+ }
48905
+ const EMPTY_RESOLVE_OPTIONS = {};
48906
+ var ResolverFactory_binding = /*#__PURE__*/ new WeakMap(), _cache = /*#__PURE__*/ new WeakMap(), _create = /*#__PURE__*/ new WeakSet();
48898
48907
  class ResolverFactory {
48899
48908
  static __to_binding(resolver_factory) {
48900
48909
  return ResolverFactory_class_private_field_get(resolver_factory, ResolverFactory_binding);
48901
48910
  }
48902
- get(type, resolveOptions) {
48903
- const { dependencyCategory, resolveToContext, ...resolve } = resolveOptions || {};
48904
- const binding = ResolverFactory_class_private_field_get(this, ResolverFactory_binding).get(type, {
48905
- ...getRawResolve(resolve),
48906
- dependencyCategory,
48907
- resolveToContext
48908
- });
48909
- return new Resolver(binding);
48910
- }
48911
- constructor(pnp){
48911
+ get(type, resolveOptions = EMPTY_RESOLVE_OPTIONS) {
48912
+ let typedCaches = ResolverFactory_class_private_field_get(this, _cache).get(type);
48913
+ if (!typedCaches) {
48914
+ typedCaches = {
48915
+ direct: new WeakMap(),
48916
+ stringified: new Map()
48917
+ };
48918
+ ResolverFactory_class_private_field_get(this, _cache).set(type, typedCaches);
48919
+ }
48920
+ const cachedResolver = typedCaches.direct.get(resolveOptions);
48921
+ if (cachedResolver) return cachedResolver;
48922
+ const ident = JSON.stringify(resolveOptions);
48923
+ const resolver = typedCaches.stringified.get(ident);
48924
+ if (resolver) {
48925
+ typedCaches.direct.set(resolveOptions, resolver);
48926
+ return resolver;
48927
+ }
48928
+ const newResolver = ResolverFactory_class_private_method_get(this, _create, ResolverFactory_create).call(this, type, resolveOptions);
48929
+ typedCaches.direct.set(resolveOptions, newResolver);
48930
+ typedCaches.stringified.set(ident, newResolver);
48931
+ return newResolver;
48932
+ }
48933
+ constructor(pnp, resolveOptions, loaderResolveOptions){
48934
+ ResolverFactory_class_private_method_init(this, _create);
48912
48935
  ResolverFactory_class_private_field_init(this, ResolverFactory_binding, {
48913
48936
  writable: true,
48914
48937
  value: void 0
48915
48938
  });
48916
- ResolverFactory_class_private_field_set(this, ResolverFactory_binding, new external_rspack_wasi_browser_js_["default"].JsResolverFactory(pnp));
48939
+ ResolverFactory_class_private_field_init(this, _cache, {
48940
+ writable: true,
48941
+ value: new Map()
48942
+ });
48943
+ ResolverFactory_class_private_field_set(this, ResolverFactory_binding, new external_rspack_wasi_browser_js_["default"].JsResolverFactory(pnp, getRawResolve(resolveOptions), getRawResolve(loaderResolveOptions)));
48917
48944
  }
48918
48945
  }
48946
+ function ResolverFactory_create(type, resolveOptionsWithDepType) {
48947
+ const { dependencyType, resolveToContext, ...resolve } = resolveOptionsWithDepType;
48948
+ const binding = ResolverFactory_class_private_field_get(this, ResolverFactory_binding).get(type, {
48949
+ ...getRawResolve(resolve),
48950
+ dependencyType,
48951
+ resolveToContext
48952
+ });
48953
+ const resolver = new Resolver(binding);
48954
+ const childCache = new WeakMap();
48955
+ resolver.withOptions = (options)=>{
48956
+ const cacheEntry = childCache.get(options);
48957
+ if (void 0 !== cacheEntry) return cacheEntry;
48958
+ const mergedOptions = cachedCleverMerge(resolveOptionsWithDepType, options);
48959
+ const newResolver = this.get(type, mergedOptions);
48960
+ childCache.set(options, newResolver);
48961
+ return newResolver;
48962
+ };
48963
+ return resolver;
48964
+ }
48919
48965
  function RuleSetCompiler_define_property(obj, key, value) {
48920
48966
  if (key in obj) Object.defineProperty(obj, key, {
48921
48967
  value: value,
@@ -50734,7 +50780,7 @@ class Compiler {
50734
50780
  this.running = false;
50735
50781
  this.idle = false;
50736
50782
  this.watchMode = false;
50737
- this.resolverFactory = new ResolverFactory(options.resolve.pnp ?? getPnpDefault());
50783
+ this.resolverFactory = new ResolverFactory(options.resolve.pnp ?? getPnpDefault(), options.resolve, options.resolveLoader);
50738
50784
  new JsLoaderRspackPlugin(this).apply(this);
50739
50785
  new ExecuteModulePlugin().apply(this);
50740
50786
  new TraceHookPlugin().apply(this);
@@ -50931,7 +50977,7 @@ class MultiStats {
50931
50977
  return obj;
50932
50978
  });
50933
50979
  if (childOptions.version) {
50934
- obj.rspackVersion = "1.4.12-canary-4f117639-20250801102630";
50980
+ obj.rspackVersion = "1.4.12-canary-becf0a0e-20250808091433";
50935
50981
  obj.version = "5.75.0";
50936
50982
  }
50937
50983
  if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
@@ -52241,7 +52287,7 @@ const SIMPLE_EXTRACTORS = {
52241
52287
  },
52242
52288
  version: (object)=>{
52243
52289
  object.version = "5.75.0";
52244
- object.rspackVersion = "1.4.12-canary-4f117639-20250801102630";
52290
+ object.rspackVersion = "1.4.12-canary-becf0a0e-20250808091433";
52245
52291
  },
52246
52292
  env: (object, _compilation, _context, { _env })=>{
52247
52293
  object.env = _env;
@@ -54462,9 +54508,8 @@ function NativeWatchFileSystem_class_private_field_set(receiver, privateMap, val
54462
54508
  const toJsWatcherIgnored = (ignored)=>{
54463
54509
  if (Array.isArray(ignored) || "string" == typeof ignored || ignored instanceof RegExp) return ignored;
54464
54510
  if ("function" == typeof ignored) throw new Error("NativeWatcher does not support using a function for the 'ignored' option");
54465
- if (ignored) throw new Error(`Invalid option for 'ignored': ${ignored}`);
54466
54511
  };
54467
- var NativeWatchFileSystem_inner = /*#__PURE__*/ new WeakMap();
54512
+ var NativeWatchFileSystem_inner = /*#__PURE__*/ new WeakMap(), _inputFileSystem = /*#__PURE__*/ new WeakMap();
54468
54513
  class NativeWatchFileSystem {
54469
54514
  watch(files, directories, missing, _startTime, options, callback, callbackUndelayed) {
54470
54515
  if ((!files.added || "function" != typeof files.added[Symbol.iterator]) && (!files.removed || "function" != typeof files.removed[Symbol.iterator])) throw new Error("Invalid arguments: 'files'");
@@ -54483,14 +54528,33 @@ class NativeWatchFileSystem {
54483
54528
  Array.from(missing.added),
54484
54529
  Array.from(missing.removed)
54485
54530
  ], (err, result)=>{
54486
- const { changedFiles, removedFiles } = result;
54531
+ var _class_private_field_get1;
54532
+ if (err) return void callback(err, new Map(), new Map(), new Set(), new Set());
54533
+ nativeWatcher.pause();
54534
+ const changedFiles = result.changedFiles;
54535
+ const removedFiles = result.removedFiles;
54536
+ if (null == (_class_private_field_get1 = NativeWatchFileSystem_class_private_field_get(this, _inputFileSystem)) ? void 0 : _class_private_field_get1.purge) {
54537
+ const fs = NativeWatchFileSystem_class_private_field_get(this, _inputFileSystem);
54538
+ for (const item of changedFiles){
54539
+ var _fs_purge;
54540
+ null == (_fs_purge = fs.purge) || _fs_purge.call(fs, item);
54541
+ }
54542
+ for (const item of removedFiles){
54543
+ var _fs_purge1;
54544
+ null == (_fs_purge1 = fs.purge) || _fs_purge1.call(fs, item);
54545
+ }
54546
+ }
54487
54547
  callback(err, new Map(), new Map(), new Set(changedFiles), new Set(removedFiles));
54488
54548
  }, (fileName)=>{
54489
54549
  callbackUndelayed(fileName, Date.now());
54490
54550
  });
54491
54551
  return {
54492
54552
  close: ()=>{
54493
- nativeWatcher.close();
54553
+ nativeWatcher.close().then(()=>{
54554
+ NativeWatchFileSystem_class_private_field_set(this, NativeWatchFileSystem_inner, void 0);
54555
+ }, (err)=>{
54556
+ console.error("Error closing native watcher:", err);
54557
+ });
54494
54558
  },
54495
54559
  pause: ()=>{
54496
54560
  nativeWatcher.pause();
@@ -54517,11 +54581,16 @@ class NativeWatchFileSystem {
54517
54581
  NativeWatchFileSystem_class_private_field_set(this, NativeWatchFileSystem_inner, nativeWatcher);
54518
54582
  return nativeWatcher;
54519
54583
  }
54520
- constructor(){
54584
+ constructor(inputFileSystem){
54521
54585
  NativeWatchFileSystem_class_private_field_init(this, NativeWatchFileSystem_inner, {
54522
54586
  writable: true,
54523
54587
  value: void 0
54524
54588
  });
54589
+ NativeWatchFileSystem_class_private_field_init(this, _inputFileSystem, {
54590
+ writable: true,
54591
+ value: void 0
54592
+ });
54593
+ NativeWatchFileSystem_class_private_field_set(this, _inputFileSystem, inputFileSystem);
54525
54594
  }
54526
54595
  }
54527
54596
  function NodeWatchFileSystem_define_property(obj, key, value) {
@@ -54818,7 +54887,7 @@ class NodeEnvironmentPlugin {
54818
54887
  compiler.inputFileSystem = inputFileSystem;
54819
54888
  compiler.outputFileSystem = browser_fs["default"];
54820
54889
  compiler.intermediateFileSystem = null;
54821
- if (compiler.options.experiments.nativeWatcher) compiler.watchFileSystem = new NativeWatchFileSystem();
54890
+ if (compiler.options.experiments.nativeWatcher) compiler.watchFileSystem = new NativeWatchFileSystem(inputFileSystem);
54822
54891
  else compiler.watchFileSystem = new NodeWatchFileSystem(inputFileSystem);
54823
54892
  compiler.hooks.beforeRun.tap("NodeEnvironmentPlugin", (compiler)=>{
54824
54893
  if (compiler.inputFileSystem === inputFileSystem) {
@@ -56213,6 +56282,7 @@ const getRspackOptionsSchema = memoize(()=>{
56213
56282
  inlineConst: schemas_boolean(),
56214
56283
  inlineEnum: schemas_boolean(),
56215
56284
  typeReexportsPresence: schemas_boolean(),
56285
+ lazyBarrel: schemas_boolean(),
56216
56286
  nativeWatcher: schemas_boolean()
56217
56287
  }).partial();
56218
56288
  const watch = schemas_boolean();
@@ -56828,7 +56898,7 @@ function transformSync(source, options) {
56828
56898
  const _options = JSON.stringify(options || {});
56829
56899
  return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
56830
56900
  }
56831
- const exports_rspackVersion = "1.4.12-canary-4f117639-20250801102630";
56901
+ const exports_rspackVersion = "1.4.12-canary-becf0a0e-20250808091433";
56832
56902
  const exports_version = "5.75.0";
56833
56903
  const exports_WebpackError = Error;
56834
56904
  const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
Binary file