@rspack/core 2.0.0-rc.1 → 2.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import { CIRCULAR_CONNECTION_SYMBOL, ModuleGraphConnection as BindingModuleGraphConnection, TRANSITIVE_ONLY_SYMBOL } from '@rspack/binding';
1
+ import binding, { ModuleGraphConnection as BindingModuleGraphConnection } from '@rspack/binding';
2
2
  type ModuleGraphConnectionConstructor = typeof BindingModuleGraphConnection & {
3
- readonly TRANSITIVE_ONLY: typeof TRANSITIVE_ONLY_SYMBOL;
4
- readonly CIRCULAR_CONNECTION: typeof CIRCULAR_CONNECTION_SYMBOL;
3
+ readonly TRANSITIVE_ONLY: typeof binding.TRANSITIVE_ONLY_SYMBOL;
4
+ readonly CIRCULAR_CONNECTION: typeof binding.CIRCULAR_CONNECTION_SYMBOL;
5
5
  };
6
6
  export interface ModuleGraphConnection extends BindingModuleGraphConnection {
7
7
  }
@@ -631,8 +631,30 @@ export type RuleSetLoaderWithOptions = {
631
631
  };
632
632
  export type RuleSetUseItem = RuleSetLoader | RuleSetLoaderWithOptions;
633
633
  export type RuleSetUse = RuleSetUseItem | RuleSetUseItem[] | ((data: RawFuncUseCtx) => RuleSetUseItem[]);
634
+ export type RuleSetRuleUseAndLoader = {
635
+ /** A loader name */
636
+ loader: RuleSetLoader;
637
+ /** A loader options */
638
+ options?: RuleSetLoaderOptions;
639
+ /** An array to pass the Loader package name and its options. */
640
+ use?: never;
641
+ } | {
642
+ /** A loader name */
643
+ loader?: never;
644
+ /** A loader options */
645
+ options?: never;
646
+ /** An array to pass the Loader package name and its options. */
647
+ use: RuleSetUse;
648
+ } | {
649
+ /** A loader name */
650
+ loader?: never;
651
+ /** A loader options */
652
+ options?: never;
653
+ /** An array to pass the Loader package name and its options. */
654
+ use?: never;
655
+ };
634
656
  /** Rule defines the conditions for matching a module and the behavior of handling those modules. */
635
- export type RuleSetRule = {
657
+ export type RuleSetRule = RuleSetRuleUseAndLoader & {
636
658
  /** Matches all modules that match this resource, and will match against Resource. */
637
659
  test?: RuleSetCondition;
638
660
  /** Excludes all modules that match this condition and will match against the absolute path of the resource */
@@ -663,12 +685,6 @@ export type RuleSetRule = {
663
685
  type?: string;
664
686
  /** Used to mark the layer of the matching module. */
665
687
  layer?: string;
666
- /** A loader name */
667
- loader?: RuleSetLoader;
668
- /** A loader options */
669
- options?: RuleSetLoaderOptions;
670
- /** An array to pass the Loader package name and its options. */
671
- use?: RuleSetUse;
672
688
  /**
673
689
  * Parser options for the specific modules that matched by the rule conditions
674
690
  * It will override the parser options in module.parser.
@@ -1358,6 +1374,8 @@ export type MemoryCacheOptions = {
1358
1374
  */
1359
1375
  export type CacheOptions = boolean | MemoryCacheOptions | PersistentCacheOptions;
1360
1376
  export type StatsPresets = 'normal' | 'none' | 'verbose' | 'errors-only' | 'errors-warnings' | 'minimal' | 'detailed' | 'summary';
1377
+ type AssetFilterItemTypes = RegExp | string | ((name: string, asset: any) => boolean);
1378
+ type AssetFilterTypes = boolean | AssetFilterItemTypes | AssetFilterItemTypes[];
1361
1379
  type ModuleFilterItemTypes = RegExp | string | ((name: string, module: any, type: any) => boolean);
1362
1380
  type ModuleFilterTypes = boolean | ModuleFilterItemTypes | ModuleFilterItemTypes[];
1363
1381
  export type StatsColorOptions = {
@@ -1642,7 +1660,7 @@ export type StatsOptions = {
1642
1660
  * Exclude the matching assets information.
1643
1661
  * @default false
1644
1662
  */
1645
- excludeAssets?: ModuleFilterTypes;
1663
+ excludeAssets?: AssetFilterTypes;
1646
1664
  /**
1647
1665
  * Specifies the sorting order for modules.
1648
1666
  * @default 'id'
@@ -1822,6 +1840,13 @@ type SharedOptimizationSplitChunksCacheGroup = {
1822
1840
  */
1823
1841
  minSize?: OptimizationSplitChunksSizes;
1824
1842
  minSizeReduction?: OptimizationSplitChunksSizes;
1843
+ /**
1844
+ * Size threshold at which splitting is enforced and other restrictions
1845
+ * (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.
1846
+ * The value is `50000` in production mode.
1847
+ * The value is `30000` in others mode.
1848
+ */
1849
+ enforceSizeThreshold?: OptimizationSplitChunksSizes;
1825
1850
  /** Maximum size, in bytes, for a chunk to be generated. */
1826
1851
  maxSize?: OptimizationSplitChunksSizes;
1827
1852
  /** Maximum size, in bytes, for a async chunk to be generated. */
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- let createMd4, createXxhash64, service_pool, loadLoader_url;
1
+ let _computedKey, _computedKey1, _computedKey2, createMd4, createXxhash64, service_pool, loadLoader_url, ArrayQueue_computedKey;
2
2
  import node_util, { inspect, promisify } from "node:util";
3
3
  import { createRequire, createRequire as __rspack_createRequire } from "node:module";
4
4
  import node_path, { isAbsolute, join, relative, resolve as external_node_path_resolve, sep } from "node:path";
@@ -6,7 +6,7 @@ import node_querystring from "node:querystring";
6
6
  import node_fs, { readFileSync } from "node:fs";
7
7
  let __rspack_createRequire_require = __rspack_createRequire(import.meta.url);
8
8
  import * as __rspack_external_node_util_1b29d436 from "node:util";
9
- var RuntimeGlobals, StatsErrorCode, _computedKey, _computedKey1, _computedKey2, ArrayQueue_computedKey, __webpack_modules__ = {}, __webpack_module_cache__ = {};
9
+ var RuntimeGlobals, key, StatsErrorCode, __webpack_modules__ = {}, __webpack_module_cache__ = {};
10
10
  function __webpack_require__(moduleId) {
11
11
  var cachedModule = __webpack_module_cache__[moduleId];
12
12
  if (void 0 !== cachedModule) return cachedModule.exports;
@@ -1832,10 +1832,26 @@ function createDiagnosticArray(adm) {
1832
1832
  });
1833
1833
  return adm[$proxy] = proxy, proxy;
1834
1834
  }
1835
+ function _to_property_key(arg) {
1836
+ var key = function(input, hint) {
1837
+ if ("object" !== _type_of(input) || null === input) return input;
1838
+ var prim = input[Symbol.toPrimitive];
1839
+ if (void 0 !== prim) {
1840
+ var res = prim.call(input, hint || "default");
1841
+ if ("object" !== _type_of(res)) return res;
1842
+ throw TypeError("@@toPrimitive must return a primitive value.");
1843
+ }
1844
+ return ("string" === hint ? String : Number)(input);
1845
+ }(arg, "string");
1846
+ return "symbol" === _type_of(key) ? key : String(key);
1847
+ }
1848
+ function _type_of(obj) {
1849
+ return obj && "u" > typeof Symbol && obj.constructor === Symbol ? "symbol" : typeof obj;
1850
+ }
1835
1851
  let checkCompilation = (compilation)=>{
1836
1852
  if (!(compilation instanceof Compilation)) throw TypeError('The \'compilation\' argument must be an instance of Compilation. This usually occurs when multiple versions of "@rspack/core" are used, or when the code in "@rspack/core" is executed multiple times.');
1837
1853
  };
1838
- _computedKey = binding_default().COMPILATION_HOOKS_MAP_SYMBOL;
1854
+ _computedKey = _to_property_key(binding_default().COMPILATION_HOOKS_MAP_SYMBOL);
1839
1855
  class Compilation {
1840
1856
  #inner;
1841
1857
  #shutdown;
@@ -2351,7 +2367,7 @@ class EntryData {
2351
2367
  this.dependencies = binding.dependencies, this.includeDependencies = binding.includeDependencies, this.options = binding.options;
2352
2368
  }
2353
2369
  }
2354
- _computedKey1 = Symbol.iterator, _computedKey2 = Symbol.toStringTag;
2370
+ _computedKey1 = _to_property_key(Symbol.iterator), _computedKey2 = _to_property_key(Symbol.toStringTag);
2355
2371
  class Entries {
2356
2372
  #data;
2357
2373
  constructor(data){
@@ -2718,7 +2734,7 @@ function SplitChunksPlugin_toRawSplitChunksOptions(sc, compiler) {
2718
2734
  function getChunks(chunks) {
2719
2735
  return 'function' == typeof chunks ? (chunk)=>chunks(chunk) : chunks;
2720
2736
  }
2721
- let { name, chunks, defaultSizeTypes, cacheGroups = {}, fallbackCacheGroup, minSize, minSizeReduction, maxSize, maxAsyncSize, maxInitialSize, ...passThrough } = sc;
2737
+ let { name, chunks, defaultSizeTypes, cacheGroups = {}, fallbackCacheGroup, minSize, minSizeReduction, enforceSizeThreshold, maxSize, maxAsyncSize, maxInitialSize, ...passThrough } = sc;
2722
2738
  return {
2723
2739
  name: getName(name),
2724
2740
  chunks: getChunks(chunks),
@@ -2727,7 +2743,7 @@ function SplitChunksPlugin_toRawSplitChunksOptions(sc, compiler) {
2727
2743
  'unknown'
2728
2744
  ],
2729
2745
  cacheGroups: Object.entries(cacheGroups).filter(([_key, group])=>!1 !== group).map(([key, group])=>{
2730
- let { test, name, chunks, minSize, minSizeReduction, maxSize, maxAsyncSize, maxInitialSize, ...passThrough } = group;
2746
+ let { test, name, chunks, minSize, minSizeReduction, enforceSizeThreshold, maxSize, maxAsyncSize, maxInitialSize, ...passThrough } = group;
2731
2747
  return {
2732
2748
  key,
2733
2749
  test: 'function' == typeof test ? (ctx)=>{
@@ -2741,6 +2757,7 @@ function SplitChunksPlugin_toRawSplitChunksOptions(sc, compiler) {
2741
2757
  chunks: getChunks(chunks),
2742
2758
  minSize: JsSplitChunkSizes.__to_binding(minSize),
2743
2759
  minSizeReduction: JsSplitChunkSizes.__to_binding(minSizeReduction),
2760
+ enforceSizeThreshold: JsSplitChunkSizes.__to_binding(enforceSizeThreshold),
2744
2761
  maxSize: JsSplitChunkSizes.__to_binding(maxSize),
2745
2762
  maxAsyncSize: JsSplitChunkSizes.__to_binding(maxAsyncSize),
2746
2763
  maxInitialSize: JsSplitChunkSizes.__to_binding(maxInitialSize),
@@ -2753,6 +2770,7 @@ function SplitChunksPlugin_toRawSplitChunksOptions(sc, compiler) {
2753
2770
  },
2754
2771
  minSize: JsSplitChunkSizes.__to_binding(minSize),
2755
2772
  minSizeReduction: JsSplitChunkSizes.__to_binding(minSizeReduction),
2773
+ enforceSizeThreshold: JsSplitChunkSizes.__to_binding(enforceSizeThreshold),
2756
2774
  maxSize: JsSplitChunkSizes.__to_binding(maxSize),
2757
2775
  maxAsyncSize: JsSplitChunkSizes.__to_binding(maxAsyncSize),
2758
2776
  maxInitialSize: JsSplitChunkSizes.__to_binding(maxInitialSize),
@@ -4301,19 +4319,16 @@ function tryMatch(payload, condition) {
4301
4319
  return !1;
4302
4320
  }
4303
4321
  let getRawModuleRule = (rule, path, options, upperType)=>{
4304
- let funcUse;
4305
- if (rule.loader && (rule.use = [
4322
+ let funcUse, normalizedUse = rule.loader ? [
4306
4323
  {
4307
4324
  loader: rule.loader,
4308
4325
  options: rule.options
4309
4326
  }
4310
- ]), 'function' == typeof rule.use) {
4311
- let use = rule.use;
4312
- funcUse = (rawContext)=>createRawModuleRuleUses(use({
4313
- ...rawContext,
4314
- compiler: options.compiler
4315
- }) ?? [], `${path}.use`, options);
4316
- }
4327
+ ] : rule.use;
4328
+ 'function' == typeof normalizedUse && (funcUse = (rawContext)=>createRawModuleRuleUses(normalizedUse({
4329
+ ...rawContext,
4330
+ compiler: options.compiler
4331
+ }) ?? [], `${path}.use`, options));
4317
4332
  let rawModuleRule = {
4318
4333
  test: rule.test ? getRawRuleSetCondition(rule.test) : void 0,
4319
4334
  include: rule.include ? getRawRuleSetCondition(rule.include) : void 0,
@@ -4335,7 +4350,7 @@ let getRawModuleRule = (rule, path, options, upperType)=>{
4335
4350
  scheme: rule.scheme ? getRawRuleSetCondition(rule.scheme) : void 0,
4336
4351
  mimetype: rule.mimetype ? getRawRuleSetCondition(rule.mimetype) : void 0,
4337
4352
  sideEffects: rule.sideEffects,
4338
- use: 'function' == typeof rule.use ? funcUse : createRawModuleRuleUses(rule.use ?? [], `${path}.use`, options),
4353
+ use: 'function' == typeof normalizedUse ? funcUse : createRawModuleRuleUses(normalizedUse ?? [], `${path}.use`, options),
4339
4354
  type: rule.type,
4340
4355
  layer: rule.layer,
4341
4356
  parser: rule.parser ? getRawParserOptions(rule.parser, rule.type ?? upperType) : void 0,
@@ -5536,7 +5551,7 @@ let DYNAMIC_INFO = Symbol('cleverMerge dynamic info'), mergeCache = new WeakMap(
5536
5551
  }, getValueType = (value)=>void 0 === value ? 0 : value === DELETE ? 4 : Array.isArray(value) ? -1 !== value.lastIndexOf('...') ? 2 : 1 : 'object' != typeof value || null === value || value.constructor && value.constructor !== Object ? 1 : 3, cleverMerge = (first, second)=>void 0 === second ? first : void 0 === first || 'object' != typeof second || null === second ? second : 'object' != typeof first || null === first ? first : _cleverMerge(first, second, !1), _cleverMerge = (first, second, internalCaching = !1)=>{
5537
5552
  let firstObject = internalCaching ? cachedParseObject(first) : parseObject(first), { static: firstInfo, dynamic: firstDynamicInfo } = firstObject, secondObj = second;
5538
5553
  if (void 0 !== firstDynamicInfo) {
5539
- let { byProperty, fn } = firstDynamicInfo, fnInfo = fn[DYNAMIC_INFO];
5554
+ let { fn } = firstDynamicInfo, { byProperty } = firstDynamicInfo, fnInfo = fn[DYNAMIC_INFO];
5540
5555
  fnInfo && (secondObj = internalCaching ? cachedCleverMerge(fnInfo[1], second) : cleverMerge(fnInfo[1], second), fn = fnInfo[0]);
5541
5556
  let newFn = (...args)=>{
5542
5557
  let fnResult = fn(...args);
@@ -6852,7 +6867,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6852
6867
  return output.wasmLoading && enabledWasmLoadingTypes.add(output.wasmLoading), output.workerWasmLoading && enabledWasmLoadingTypes.add(output.workerWasmLoading), forEachEntry((desc)=>{
6853
6868
  desc.wasmLoading && enabledWasmLoadingTypes.add(desc.wasmLoading);
6854
6869
  }), Array.from(enabledWasmLoadingTypes);
6855
- }), D(output, 'bundlerInfo', {}), 'object' == typeof output.bundlerInfo && (D(output.bundlerInfo, 'version', "2.0.0-rc.1"), D(output.bundlerInfo, 'bundler', 'rspack'), D(output.bundlerInfo, 'force', !1));
6870
+ }), D(output, 'bundlerInfo', {}), 'object' == typeof output.bundlerInfo && (D(output.bundlerInfo, 'version', "2.0.0-rc.2"), D(output.bundlerInfo, 'bundler', 'rspack'), D(output.bundlerInfo, 'force', !1));
6856
6871
  }, applyExternalsPresetsDefaults = (externalsPresets, { targetProperties, buildHttp, outputModule })=>{
6857
6872
  let isUniversal = (key)=>!!(outputModule && targetProperties && null === targetProperties[key]);
6858
6873
  D(externalsPresets, 'web', !buildHttp && targetProperties && (targetProperties.web || isUniversal('node'))), D(externalsPresets, 'node', targetProperties && (targetProperties.node || isUniversal('node'))), D(externalsPresets, 'electron', targetProperties && targetProperties.electron || isUniversal('electron')), D(externalsPresets, 'electronMain', targetProperties && !!targetProperties.electron && (targetProperties.electronMain || isUniversal('electronMain'))), D(externalsPresets, 'electronPreload', targetProperties && !!targetProperties.electron && (targetProperties.electronPreload || isUniversal('electronPreload'))), D(externalsPresets, 'electronRenderer', targetProperties && !!targetProperties.electron && (targetProperties.electronRenderer || isUniversal('electronRenderer'))), D(externalsPresets, 'nwjs', targetProperties && (targetProperties.nwjs || isUniversal('nwjs')));
@@ -6880,7 +6895,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6880
6895
  "javascript",
6881
6896
  'css',
6882
6897
  'unknown'
6883
- ]), D(splitChunks, 'hidePathInfo', production), D(splitChunks, 'chunks', 'async'), D(splitChunks, 'usedExports', !0 === optimization.usedExports), D(splitChunks, 'minChunks', 1), F(splitChunks, 'minSize', ()=>production ? 20000 : 10000), F(splitChunks, 'maxAsyncRequests', ()=>production ? 30 : 1 / 0), F(splitChunks, 'maxInitialRequests', ()=>production ? 30 : 1 / 0), D(splitChunks, 'automaticNameDelimiter', '-');
6898
+ ]), D(splitChunks, 'hidePathInfo', production), D(splitChunks, 'chunks', 'async'), D(splitChunks, 'usedExports', !0 === optimization.usedExports), D(splitChunks, 'minChunks', 1), F(splitChunks, 'minSize', ()=>production ? 20000 : 10000), F(splitChunks, 'enforceSizeThreshold', ()=>production ? 50000 : 30000), F(splitChunks, 'maxAsyncRequests', ()=>production ? 30 : 1 / 0), F(splitChunks, 'maxInitialRequests', ()=>production ? 30 : 1 / 0), D(splitChunks, 'automaticNameDelimiter', '-');
6884
6899
  let { cacheGroups } = splitChunks;
6885
6900
  cacheGroups && (F(cacheGroups, 'default', ()=>({
6886
6901
  idHint: '',
@@ -8106,7 +8121,7 @@ class MultiStats {
8106
8121
  obj.children = this.stats.map((stat, idx)=>{
8107
8122
  let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
8108
8123
  return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
8109
- }), childOptions.version && (obj.rspackVersion = "2.0.0-rc.1", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(''));
8124
+ }), childOptions.version && (obj.rspackVersion = "2.0.0-rc.2", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(''));
8110
8125
  let mapError = (j, obj)=>({
8111
8126
  ...obj,
8112
8127
  compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
@@ -8181,7 +8196,19 @@ let asyncLib_each = function(collection, iterator, originalCallback) {
8181
8196
  for (let watching of this.watchings)watching.resume();
8182
8197
  }
8183
8198
  };
8184
- ArrayQueue_computedKey = Symbol.iterator;
8199
+ function ArrayQueue_type_of(obj) {
8200
+ return obj && "u" > typeof Symbol && obj.constructor === Symbol ? "symbol" : typeof obj;
8201
+ }
8202
+ key = function(input, hint) {
8203
+ if ("object" !== ArrayQueue_type_of(input) || null === input) return input;
8204
+ var prim = input[Symbol.toPrimitive];
8205
+ if (void 0 !== prim) {
8206
+ var res = prim.call(input, hint || "default");
8207
+ if ("object" !== ArrayQueue_type_of(res)) return res;
8208
+ throw TypeError("@@toPrimitive must return a primitive value.");
8209
+ }
8210
+ return ("string" === hint ? String : Number)(input);
8211
+ }(Symbol.iterator, "string"), ArrayQueue_computedKey = "symbol" === ArrayQueue_type_of(key) ? key : String(key);
8185
8212
  let util_ArrayQueue = class {
8186
8213
  _list;
8187
8214
  _listReversed;
@@ -9365,7 +9392,7 @@ let iterateConfig = (config, options, fn)=>{
9365
9392
  object.hash = context.getStatsCompilation(compilation).hash;
9366
9393
  },
9367
9394
  version: (object)=>{
9368
- object.version = "5.75.0", object.rspackVersion = "2.0.0-rc.1";
9395
+ object.version = "5.75.0", object.rspackVersion = "2.0.0-rc.2";
9369
9396
  },
9370
9397
  env: (object, _compilation, _context, { _env })=>{
9371
9398
  object.env = _env;
@@ -11025,7 +11052,7 @@ class TraceHookPlugin {
11025
11052
  });
11026
11053
  }
11027
11054
  }
11028
- let CORE_VERSION = "2.0.0-rc.1", VFILES_BY_COMPILER = new WeakMap();
11055
+ let CORE_VERSION = "2.0.0-rc.2", VFILES_BY_COMPILER = new WeakMap();
11029
11056
  class VirtualModulesPlugin {
11030
11057
  #staticModules;
11031
11058
  #compiler;
@@ -11362,7 +11389,7 @@ class Compiler {
11362
11389
  electron: null
11363
11390
  }, this.#target = {}, this.__internal_browser_require = ()=>{
11364
11391
  throw Error('Cannot execute user defined code in browser without `BrowserRequirePlugin`');
11365
- }, this.resolverFactory = new ResolverFactory(options.resolve.pnp ?? getPnpDefault(), options.resolve, options.resolveLoader), new JsLoaderRspackPlugin(this).apply(this), new ExecuteModulePlugin().apply(this), new TraceHookPlugin().apply(this), Object.defineProperty(this, GET_COMPILER_ID, {
11392
+ }, this.resolverFactory = new ResolverFactory(options.resolve.pnp ?? getPnpDefault(), options.resolve, options.resolveLoader), new JsLoaderRspackPlugin(this).apply(this), new ExecuteModulePlugin().apply(this), 'on' === JavaScriptTracer.state && new TraceHookPlugin().apply(this), Object.defineProperty(this, GET_COMPILER_ID, {
11366
11393
  writable: !1,
11367
11394
  configurable: !1,
11368
11395
  enumerable: !1,
@@ -11924,13 +11951,10 @@ Help:
11924
11951
  let value = Reflect.get(target, prop);
11925
11952
  return 'function' == typeof value ? value.bind(target) : value;
11926
11953
  },
11927
- set: (_target, prop, value)=>'id' === prop && null !== value && (assignments.set(m.identifier, value), !0)
11954
+ set: (_target, prop, value)=>'id' === prop && ('string' == typeof value || 'number' == typeof value) && (assignments.set(m.identifier, value), !0)
11928
11955
  }));
11929
11956
  return queried.call(proxiedModules), {
11930
- assignments: Object.fromEntries(Array.from(assignments.entries()).map(([k, v])=>[
11931
- k,
11932
- String(v)
11933
- ]))
11957
+ assignments: Object.fromEntries(assignments.entries())
11934
11958
  };
11935
11959
  };
11936
11960
  }),
@@ -12359,11 +12383,11 @@ Object.defineProperty(binding_default().ConcatenatedModule.prototype, 'identifie
12359
12383
  let ModuleGraphConnection = binding_namespaceObject.ModuleGraphConnection;
12360
12384
  Object.defineProperties(ModuleGraphConnection, {
12361
12385
  TRANSITIVE_ONLY: {
12362
- value: binding_namespaceObject.TRANSITIVE_ONLY_SYMBOL,
12386
+ value: binding_default().TRANSITIVE_ONLY_SYMBOL,
12363
12387
  enumerable: !0
12364
12388
  },
12365
12389
  CIRCULAR_CONNECTION: {
12366
- value: binding_namespaceObject.CIRCULAR_CONNECTION_SYMBOL,
12390
+ value: binding_default().CIRCULAR_CONNECTION_SYMBOL,
12367
12391
  enumerable: !0
12368
12392
  }
12369
12393
  });
@@ -13331,7 +13355,7 @@ async function transform(source, options) {
13331
13355
  let _options = JSON.stringify(options || {});
13332
13356
  return binding_default().transform(source, _options);
13333
13357
  }
13334
- let exports_rspackVersion = "2.0.0-rc.1", exports_version = "5.75.0", exports_WebpackError = Error, exports_config = {
13358
+ let exports_rspackVersion = "2.0.0-rc.2", exports_version = "5.75.0", exports_WebpackError = Error, exports_config = {
13335
13359
  getNormalizedRspackOptions: getNormalizedRspackOptions,
13336
13360
  applyRspackOptionsDefaults: applyRspackOptionsDefaults,
13337
13361
  getNormalizedWebpackOptions: getNormalizedRspackOptions,
package/dist/worker.js CHANGED
@@ -114,7 +114,7 @@ let DYNAMIC_INFO = Symbol('cleverMerge dynamic info'), mergeCache = new WeakMap(
114
114
  }, getValueType = (value)=>void 0 === value ? 0 : value === DELETE ? 4 : Array.isArray(value) ? -1 !== value.lastIndexOf('...') ? 2 : 1 : 'object' != typeof value || null === value || value.constructor && value.constructor !== Object ? 1 : 3, cleverMerge = (first, second)=>void 0 === second ? first : void 0 === first || 'object' != typeof second || null === second ? second : 'object' != typeof first || null === first ? first : _cleverMerge(first, second, !1), _cleverMerge = (first, second, internalCaching = !1)=>{
115
115
  let firstObject = internalCaching ? cachedParseObject(first) : parseObject(first), { static: firstInfo, dynamic: firstDynamicInfo } = firstObject, secondObj = second;
116
116
  if (void 0 !== firstDynamicInfo) {
117
- let { byProperty, fn } = firstDynamicInfo, fnInfo = fn[DYNAMIC_INFO];
117
+ let { fn } = firstDynamicInfo, { byProperty } = firstDynamicInfo, fnInfo = fn[DYNAMIC_INFO];
118
118
  fnInfo && (secondObj = internalCaching ? cachedCleverMerge(fnInfo[1], second) : cleverMerge(fnInfo[1], second), fn = fnInfo[0]);
119
119
  let newFn = (...args)=>{
120
120
  let fnResult = fn(...args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/core",
3
- "version": "2.0.0-rc.1",
3
+ "version": "2.0.0-rc.2",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "Fast Rust-based bundler for the web with a modernized webpack API",
@@ -37,10 +37,10 @@
37
37
  "directory": "packages/rspack"
38
38
  },
39
39
  "devDependencies": {
40
- "@ast-grep/napi": "^0.42.0",
41
- "@napi-rs/wasm-runtime": "1.1.2",
40
+ "@ast-grep/napi": "^0.42.1",
41
+ "@napi-rs/wasm-runtime": "1.1.3",
42
42
  "@rsbuild/plugin-node-polyfill": "^1.4.4",
43
- "@rslib/core": "0.20.3",
43
+ "@rslib/core": "0.21.0",
44
44
  "@rspack/lite-tapable": "1.1.0",
45
45
  "@swc/types": "0.1.26",
46
46
  "@types/node": "^20.19.39",
@@ -59,7 +59,7 @@
59
59
  "webpack-sources": "3.3.4"
60
60
  },
61
61
  "dependencies": {
62
- "@rspack/binding": "2.0.0-rc.1"
62
+ "@rspack/binding": "2.0.0-rc.2"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "@module-federation/runtime-tools": "^0.24.1 || ^2.0.0",