@rspack-debug/core 2.0.0-rc.0 → 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 +1 @@
1
- {"name":"connect-next","author":"TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)","version":"4.0.0","license":"MIT","types":"index.d.ts","type":"module"}
1
+ {"name":"connect-next","author":"TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)","version":"4.0.1","license":"MIT","types":"index.d.ts","type":"module"}
@@ -1,5 +1,6 @@
1
- import type { Dependency, JsModuleGraph, ModuleGraphConnection } from '@rspack/binding';
1
+ import type { Dependency, JsModuleGraph } from '@rspack/binding';
2
2
  import { ExportsInfo } from './ExportsInfo.js';
3
+ import type { ModuleGraphConnection } from './ModuleGraphConnection.js';
3
4
  import type { Module } from './Module.js';
4
5
  export default class ModuleGraph {
5
6
  #private;
@@ -0,0 +1,10 @@
1
+ import binding, { ModuleGraphConnection as BindingModuleGraphConnection } from '@rspack/binding';
2
+ type ModuleGraphConnectionConstructor = typeof BindingModuleGraphConnection & {
3
+ readonly TRANSITIVE_ONLY: typeof binding.TRANSITIVE_ONLY_SYMBOL;
4
+ readonly CIRCULAR_CONNECTION: typeof binding.CIRCULAR_CONNECTION_SYMBOL;
5
+ };
6
+ export interface ModuleGraphConnection extends BindingModuleGraphConnection {
7
+ }
8
+ export declare const ModuleGraphConnection: ModuleGraphConnectionConstructor;
9
+ export type ConnectionState = boolean | typeof ModuleGraphConnection.TRANSITIVE_ONLY | typeof ModuleGraphConnection.CIRCULAR_CONNECTION;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { type RawHashedModuleIdsPluginOptions } from '@rspack/binding';
2
+ export declare const HashedModuleIdsPlugin: {
3
+ new (options?: RawHashedModuleIdsPluginOptions | undefined): {
4
+ name: string;
5
+ _args: [options?: RawHashedModuleIdsPluginOptions | undefined];
6
+ affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
7
+ raw(compiler: import("../index.js").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("../index.js").Compiler): void;
9
+ };
10
+ };
@@ -1,9 +1,9 @@
1
- export declare const SideEffectsFlagPlugin: {
2
- new (): {
3
- name: string;
4
- _args: [];
5
- affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
6
- raw(compiler: import("../index.js").Compiler): import("@rspack/binding").BuiltinPlugin;
7
- apply(compiler: import("../index.js").Compiler): void;
8
- };
9
- };
1
+ import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
2
+ import { RspackBuiltinPlugin } from './base.js';
3
+ export declare class SideEffectsFlagPlugin extends RspackBuiltinPlugin {
4
+ private analyzeSideEffectsFree;
5
+ name: BuiltinPluginName;
6
+ affectedHooks: "compilation";
7
+ constructor(analyzeSideEffectsFree?: boolean);
8
+ raw(): BuiltinPlugin;
9
+ }
@@ -36,6 +36,7 @@ export * from './FetchCompileAsyncWasmPlugin.js';
36
36
  export * from './FileUriPlugin.js';
37
37
  export * from './FlagDependencyExportsPlugin.js';
38
38
  export * from './FlagDependencyUsagePlugin.js';
39
+ export * from './HashedModuleIdsPlugin.js';
39
40
  export * from './HotModuleReplacementPlugin.js';
40
41
  export * from './HttpExternalsRspackPlugin.js';
41
42
  export * from './HttpUriPlugin.js';
@@ -186,7 +186,7 @@ export interface LoaderContext<OptionsType = {}> {
186
186
  */
187
187
  request: string;
188
188
  /**
189
- * An array of all the loaders. It is writeable in the pitch phase.
189
+ * An array of all the loaders. It is writable in the pitch phase.
190
190
  * loaders = [{request: string, path: string, query: string, module: function}]
191
191
  *
192
192
  * In the example:
@@ -102,6 +102,7 @@ export interface ExperimentsNormalized {
102
102
  useInputFileSystem?: false | RegExp[];
103
103
  nativeWatcher?: boolean;
104
104
  deferImport?: boolean;
105
+ pureFunctions?: boolean;
105
106
  }
106
107
  export type IgnoreWarningsNormalized = ((warning: WebpackError, compilation: Compilation) => boolean)[];
107
108
  export type OptimizationRuntimeChunkNormalized = false | {
@@ -137,7 +138,7 @@ export interface RspackOptionsNormalized {
137
138
  incremental?: false | Incremental;
138
139
  watch?: Watch;
139
140
  watchOptions: WatchOptions;
140
- devServer?: DevServer;
141
+ devServer?: false | DevServer;
141
142
  ignoreWarnings?: IgnoreWarningsNormalized;
142
143
  performance?: Performance;
143
144
  amd?: Amd;
@@ -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.
@@ -807,7 +823,6 @@ export type JavascriptParserOptions = {
807
823
  dynamicImportFetchPriority?: 'low' | 'high' | 'auto';
808
824
  /**
809
825
  * Enable or disable evaluating import.meta. Set to 'preserve-unknown' to preserve unknown properties for runtime evaluation.
810
- * @default 'preserve-unknown'
811
826
  */
812
827
  importMeta?: boolean | 'preserve-unknown';
813
828
  /**
@@ -898,6 +913,11 @@ export type JavascriptParserOptions = {
898
913
  * @default false
899
914
  */
900
915
  importMetaResolve?: boolean;
916
+ /**
917
+ * Flag top-level exported functions as side-effect-free for pure-function-based tree shaking.
918
+ * @experimental
919
+ */
920
+ pureFunctions?: string[];
901
921
  };
902
922
  export type JsonParserOptions = {
903
923
  /**
@@ -1354,6 +1374,8 @@ export type MemoryCacheOptions = {
1354
1374
  */
1355
1375
  export type CacheOptions = boolean | MemoryCacheOptions | PersistentCacheOptions;
1356
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[];
1357
1379
  type ModuleFilterItemTypes = RegExp | string | ((name: string, module: any, type: any) => boolean);
1358
1380
  type ModuleFilterTypes = boolean | ModuleFilterItemTypes | ModuleFilterItemTypes[];
1359
1381
  export type StatsColorOptions = {
@@ -1638,7 +1660,7 @@ export type StatsOptions = {
1638
1660
  * Exclude the matching assets information.
1639
1661
  * @default false
1640
1662
  */
1641
- excludeAssets?: ModuleFilterTypes;
1663
+ excludeAssets?: AssetFilterTypes;
1642
1664
  /**
1643
1665
  * Specifies the sorting order for modules.
1644
1666
  * @default 'id'
@@ -1818,6 +1840,13 @@ type SharedOptimizationSplitChunksCacheGroup = {
1818
1840
  */
1819
1841
  minSize?: OptimizationSplitChunksSizes;
1820
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;
1821
1850
  /** Maximum size, in bytes, for a chunk to be generated. */
1822
1851
  maxSize?: OptimizationSplitChunksSizes;
1823
1852
  /** Maximum size, in bytes, for a async chunk to be generated. */
@@ -1900,8 +1929,10 @@ export type OptimizationSplitChunksOptions = {
1900
1929
  export type Optimization = {
1901
1930
  /**
1902
1931
  * Which algorithm to use when choosing module ids.
1932
+ * Setting to `false` disables the built-in algorithm, allowing a custom plugin
1933
+ * (e.g. HashedModuleIdsPlugin) to provide module ids instead.
1903
1934
  */
1904
- moduleIds?: 'named' | 'natural' | 'deterministic';
1935
+ moduleIds?: false | 'named' | 'natural' | 'deterministic' | 'hashed';
1905
1936
  /**
1906
1937
  * Which algorithm to use when choosing chunk ids.
1907
1938
  */
@@ -2199,6 +2230,11 @@ export type Experiments = {
2199
2230
  * @default false
2200
2231
  */
2201
2232
  deferImport?: boolean;
2233
+ /**
2234
+ * Enable pure-function-based side-effects analysis.
2235
+ * @default false
2236
+ */
2237
+ pureFunctions?: boolean;
2202
2238
  };
2203
2239
  export type Watch = boolean;
2204
2240
  /** Options for watch mode. */
@@ -2400,7 +2436,7 @@ export type RspackOptions = {
2400
2436
  /**
2401
2437
  * Configuration for the development server.
2402
2438
  */
2403
- devServer?: DevServer;
2439
+ devServer?: false | DevServer;
2404
2440
  /**
2405
2441
  * Options for module configuration.
2406
2442
  */
package/dist/exports.d.ts CHANGED
@@ -16,6 +16,7 @@ export { ExternalModule } from './ExternalModule.js';
16
16
  export type { ResolveData, ResourceDataWithData } from './Module.js';
17
17
  export { Module } from './Module.js';
18
18
  export type { default as ModuleGraph } from './ModuleGraph.js';
19
+ export { ModuleGraphConnection, type ConnectionState, } from './ModuleGraphConnection.js';
19
20
  export { MultiStats } from './MultiStats.js';
20
21
  export { NormalModule } from './NormalModule.js';
21
22
  export type { NormalModuleFactory } from './NormalModuleFactory.js';
@@ -76,6 +77,11 @@ interface Electron {
76
77
  ElectronTargetPlugin: typeof ElectronTargetPlugin;
77
78
  }
78
79
  export declare const electron: Electron;
80
+ import { HashedModuleIdsPlugin } from './builtin-plugin/index.js';
81
+ interface Ids {
82
+ HashedModuleIdsPlugin: typeof HashedModuleIdsPlugin;
83
+ }
84
+ export declare const ids: Ids;
79
85
  import { EnableLibraryPlugin } from './builtin-plugin/index.js';
80
86
  interface Library {
81
87
  EnableLibraryPlugin: typeof EnableLibraryPlugin;
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;
@@ -281,6 +281,7 @@ __webpack_require__.r(exports_namespaceObject), __webpack_require__.d(exports_na
281
281
  LoaderTargetPlugin: ()=>LoaderTargetPlugin,
282
282
  Module: ()=>binding_namespaceObject.Module,
283
283
  ModuleFilenameHelpers: ()=>ModuleFilenameHelpers_namespaceObject,
284
+ ModuleGraphConnection: ()=>ModuleGraphConnection,
284
285
  MultiCompiler: ()=>MultiCompiler,
285
286
  MultiStats: ()=>MultiStats,
286
287
  NoEmitOnErrorsPlugin: ()=>NoEmitOnErrorsPlugin,
@@ -305,6 +306,7 @@ __webpack_require__.r(exports_namespaceObject), __webpack_require__.d(exports_na
305
306
  container: ()=>container,
306
307
  electron: ()=>electron,
307
308
  experiments: ()=>exports_experiments,
309
+ ids: ()=>exports_ids,
308
310
  javascript: ()=>javascript,
309
311
  lazyCompilationMiddleware: ()=>lazyCompilationMiddleware,
310
312
  library: ()=>exports_library,
@@ -1830,10 +1832,26 @@ function createDiagnosticArray(adm) {
1830
1832
  });
1831
1833
  return adm[$proxy] = proxy, proxy;
1832
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
+ }
1833
1851
  let checkCompilation = (compilation)=>{
1834
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.');
1835
1853
  };
1836
- _computedKey = binding_default().COMPILATION_HOOKS_MAP_SYMBOL;
1854
+ _computedKey = _to_property_key(binding_default().COMPILATION_HOOKS_MAP_SYMBOL);
1837
1855
  class Compilation {
1838
1856
  #inner;
1839
1857
  #shutdown;
@@ -2349,7 +2367,7 @@ class EntryData {
2349
2367
  this.dependencies = binding.dependencies, this.includeDependencies = binding.includeDependencies, this.options = binding.options;
2350
2368
  }
2351
2369
  }
2352
- _computedKey1 = Symbol.iterator, _computedKey2 = Symbol.toStringTag;
2370
+ _computedKey1 = _to_property_key(Symbol.iterator), _computedKey2 = _to_property_key(Symbol.toStringTag);
2353
2371
  class Entries {
2354
2372
  #data;
2355
2373
  constructor(data){
@@ -2458,7 +2476,7 @@ let INTERNAL_PLUGIN_NAMES = Object.keys(binding_default().BuiltinPluginName), AP
2458
2476
  }), BundlerInfoRspackPlugin = base_create(binding_namespaceObject.BuiltinPluginName.BundlerInfoRspackPlugin, (options)=>({
2459
2477
  version: options.version || 'unknown',
2460
2478
  bundler: options.bundler || 'rspack',
2461
- force: options.force ?? !0
2479
+ force: options.force ?? !1
2462
2480
  })), CaseSensitivePlugin = base_create(binding_namespaceObject.BuiltinPluginName.CaseSensitivePlugin, ()=>{}, 'compilation'), ChunkPrefetchPreloadPlugin = base_create(binding_namespaceObject.BuiltinPluginName.ChunkPrefetchPreloadPlugin, ()=>{});
2463
2481
  class CircularDependencyRspackPlugin extends RspackBuiltinPlugin {
2464
2482
  name = binding_namespaceObject.BuiltinPluginName.CircularDependencyRspackPlugin;
@@ -2716,7 +2734,7 @@ function SplitChunksPlugin_toRawSplitChunksOptions(sc, compiler) {
2716
2734
  function getChunks(chunks) {
2717
2735
  return 'function' == typeof chunks ? (chunk)=>chunks(chunk) : chunks;
2718
2736
  }
2719
- 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;
2720
2738
  return {
2721
2739
  name: getName(name),
2722
2740
  chunks: getChunks(chunks),
@@ -2725,7 +2743,7 @@ function SplitChunksPlugin_toRawSplitChunksOptions(sc, compiler) {
2725
2743
  'unknown'
2726
2744
  ],
2727
2745
  cacheGroups: Object.entries(cacheGroups).filter(([_key, group])=>!1 !== group).map(([key, group])=>{
2728
- let { test, name, chunks, minSize, minSizeReduction, maxSize, maxAsyncSize, maxInitialSize, ...passThrough } = group;
2746
+ let { test, name, chunks, minSize, minSizeReduction, enforceSizeThreshold, maxSize, maxAsyncSize, maxInitialSize, ...passThrough } = group;
2729
2747
  return {
2730
2748
  key,
2731
2749
  test: 'function' == typeof test ? (ctx)=>{
@@ -2739,6 +2757,7 @@ function SplitChunksPlugin_toRawSplitChunksOptions(sc, compiler) {
2739
2757
  chunks: getChunks(chunks),
2740
2758
  minSize: JsSplitChunkSizes.__to_binding(minSize),
2741
2759
  minSizeReduction: JsSplitChunkSizes.__to_binding(minSizeReduction),
2760
+ enforceSizeThreshold: JsSplitChunkSizes.__to_binding(enforceSizeThreshold),
2742
2761
  maxSize: JsSplitChunkSizes.__to_binding(maxSize),
2743
2762
  maxAsyncSize: JsSplitChunkSizes.__to_binding(maxAsyncSize),
2744
2763
  maxInitialSize: JsSplitChunkSizes.__to_binding(maxInitialSize),
@@ -2751,6 +2770,7 @@ function SplitChunksPlugin_toRawSplitChunksOptions(sc, compiler) {
2751
2770
  },
2752
2771
  minSize: JsSplitChunkSizes.__to_binding(minSize),
2753
2772
  minSizeReduction: JsSplitChunkSizes.__to_binding(minSizeReduction),
2773
+ enforceSizeThreshold: JsSplitChunkSizes.__to_binding(enforceSizeThreshold),
2754
2774
  maxSize: JsSplitChunkSizes.__to_binding(maxSize),
2755
2775
  maxAsyncSize: JsSplitChunkSizes.__to_binding(maxAsyncSize),
2756
2776
  maxInitialSize: JsSplitChunkSizes.__to_binding(maxInitialSize),
@@ -4299,19 +4319,16 @@ function tryMatch(payload, condition) {
4299
4319
  return !1;
4300
4320
  }
4301
4321
  let getRawModuleRule = (rule, path, options, upperType)=>{
4302
- let funcUse;
4303
- if (rule.loader && (rule.use = [
4322
+ let funcUse, normalizedUse = rule.loader ? [
4304
4323
  {
4305
4324
  loader: rule.loader,
4306
4325
  options: rule.options
4307
4326
  }
4308
- ]), 'function' == typeof rule.use) {
4309
- let use = rule.use;
4310
- funcUse = (rawContext)=>createRawModuleRuleUses(use({
4311
- ...rawContext,
4312
- compiler: options.compiler
4313
- }) ?? [], `${path}.use`, options);
4314
- }
4327
+ ] : rule.use;
4328
+ 'function' == typeof normalizedUse && (funcUse = (rawContext)=>createRawModuleRuleUses(normalizedUse({
4329
+ ...rawContext,
4330
+ compiler: options.compiler
4331
+ }) ?? [], `${path}.use`, options));
4315
4332
  let rawModuleRule = {
4316
4333
  test: rule.test ? getRawRuleSetCondition(rule.test) : void 0,
4317
4334
  include: rule.include ? getRawRuleSetCondition(rule.include) : void 0,
@@ -4333,7 +4350,7 @@ let getRawModuleRule = (rule, path, options, upperType)=>{
4333
4350
  scheme: rule.scheme ? getRawRuleSetCondition(rule.scheme) : void 0,
4334
4351
  mimetype: rule.mimetype ? getRawRuleSetCondition(rule.mimetype) : void 0,
4335
4352
  sideEffects: rule.sideEffects,
4336
- use: 'function' == typeof rule.use ? funcUse : createRawModuleRuleUses(rule.use ?? [], `${path}.use`, options),
4353
+ use: 'function' == typeof normalizedUse ? funcUse : createRawModuleRuleUses(normalizedUse ?? [], `${path}.use`, options),
4337
4354
  type: rule.type,
4338
4355
  layer: rule.layer,
4339
4356
  parser: rule.parser ? getRawParserOptions(rule.parser, rule.type ?? upperType) : void 0,
@@ -4468,7 +4485,8 @@ function getRawJavascriptParserOptions(parser) {
4468
4485
  typeReexportsPresence: parser.typeReexportsPresence,
4469
4486
  jsx: parser.jsx,
4470
4487
  deferImport: parser.deferImport,
4471
- importMetaResolve: parser.importMetaResolve
4488
+ importMetaResolve: parser.importMetaResolve,
4489
+ pureFunctions: parser.pureFunctions
4472
4490
  };
4473
4491
  }
4474
4492
  function getRawCssParserOptions(parser) {
@@ -4666,6 +4684,9 @@ class FlagDependencyUsagePlugin extends RspackBuiltinPlugin {
4666
4684
  return createBuiltinPlugin(this.name, this.global);
4667
4685
  }
4668
4686
  }
4687
+ let HashedModuleIdsPlugin = base_create(binding_namespaceObject.BuiltinPluginName.HashedModuleIdsPlugin, (options)=>({
4688
+ ...options
4689
+ }), 'compilation');
4669
4690
  class HotModuleReplacementPlugin extends RspackBuiltinPlugin {
4670
4691
  name = binding_namespaceObject.BuiltinPluginName.HotModuleReplacementPlugin;
4671
4692
  raw(compiler) {
@@ -5176,7 +5197,18 @@ class RscServerPlugin extends RspackBuiltinPlugin {
5176
5197
  });
5177
5198
  }
5178
5199
  }
5179
- let SideEffectsFlagPlugin = base_create(binding_namespaceObject.BuiltinPluginName.SideEffectsFlagPlugin, ()=>{}, 'compilation'), SizeLimitsPlugin = base_create(binding_namespaceObject.BuiltinPluginName.SizeLimitsPlugin, (options)=>{
5200
+ class SideEffectsFlagPlugin extends RspackBuiltinPlugin {
5201
+ analyzeSideEffectsFree;
5202
+ name = binding_namespaceObject.BuiltinPluginName.SideEffectsFlagPlugin;
5203
+ affectedHooks = 'compilation';
5204
+ constructor(analyzeSideEffectsFree = !1){
5205
+ super(), this.analyzeSideEffectsFree = analyzeSideEffectsFree;
5206
+ }
5207
+ raw() {
5208
+ return createBuiltinPlugin(this.name, this.analyzeSideEffectsFree);
5209
+ }
5210
+ }
5211
+ let SizeLimitsPlugin = base_create(binding_namespaceObject.BuiltinPluginName.SizeLimitsPlugin, (options)=>{
5180
5212
  let hints = !1 === options.hints ? void 0 : options.hints;
5181
5213
  return {
5182
5214
  ...options,
@@ -5519,7 +5551,7 @@ let DYNAMIC_INFO = Symbol('cleverMerge dynamic info'), mergeCache = new WeakMap(
5519
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)=>{
5520
5552
  let firstObject = internalCaching ? cachedParseObject(first) : parseObject(first), { static: firstInfo, dynamic: firstDynamicInfo } = firstObject, secondObj = second;
5521
5553
  if (void 0 !== firstDynamicInfo) {
5522
- let { byProperty, fn } = firstDynamicInfo, fnInfo = fn[DYNAMIC_INFO];
5554
+ let { fn } = firstDynamicInfo, { byProperty } = firstDynamicInfo, fnInfo = fn[DYNAMIC_INFO];
5523
5555
  fnInfo && (secondObj = internalCaching ? cachedCleverMerge(fnInfo[1], second) : cleverMerge(fnInfo[1], second), fn = fnInfo[0]);
5524
5556
  let newFn = (...args)=>{
5525
5557
  let fnResult = fn(...args);
@@ -6551,7 +6583,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6551
6583
  targets: targetProperties.targets
6552
6584
  };
6553
6585
  }, applyExperimentsDefaults = (experiments)=>{
6554
- D(experiments, 'futureDefaults', !1), D(experiments, 'asyncWebAssembly', !0), D(experiments, 'deferImport', !1), D(experiments, 'buildHttp', void 0), experiments.buildHttp && 'object' == typeof experiments.buildHttp && D(experiments.buildHttp, 'upgrade', !1), D(experiments, 'useInputFileSystem', !1);
6586
+ D(experiments, 'futureDefaults', !1), D(experiments, 'asyncWebAssembly', !0), D(experiments, 'deferImport', !1), D(experiments, 'buildHttp', void 0), experiments.buildHttp && 'object' == typeof experiments.buildHttp && D(experiments.buildHttp, 'upgrade', !1), D(experiments, 'useInputFileSystem', !1), D(experiments, 'pureFunctions', !1);
6555
6587
  }, applyIncrementalDefaults = (options)=>{
6556
6588
  D(options, 'incremental', {}), 'object' == typeof options.incremental && (D(options.incremental, 'silent', !0), D(options.incremental, 'buildModuleGraph', !0), D(options.incremental, 'finishModules', !0), D(options.incremental, 'optimizeDependencies', !0), D(options.incremental, 'buildChunkGraph', !0), D(options.incremental, 'optimizeChunkModules', !0), D(options.incremental, 'moduleIds', !0), D(options.incremental, 'chunkIds', !0), D(options.incremental, 'modulesHashes', !0), D(options.incremental, 'modulesCodegen', !0), D(options.incremental, 'modulesRuntimeRequirements', !0), D(options.incremental, 'chunksRuntimeRequirements', !0), D(options.incremental, 'chunksHashes', !0), D(options.incremental, 'chunkAsset', !0), D(options.incremental, 'emitAssets', !0));
6557
6589
  }, applySnapshotDefaults = (_snapshot, _env)=>{}, applyCssGeneratorOptionsDefaults = (generatorOptions, { targetProperties })=>{
@@ -6835,7 +6867,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6835
6867
  return output.wasmLoading && enabledWasmLoadingTypes.add(output.wasmLoading), output.workerWasmLoading && enabledWasmLoadingTypes.add(output.workerWasmLoading), forEachEntry((desc)=>{
6836
6868
  desc.wasmLoading && enabledWasmLoadingTypes.add(desc.wasmLoading);
6837
6869
  }), Array.from(enabledWasmLoadingTypes);
6838
- }), D(output, 'bundlerInfo', {}), 'object' == typeof output.bundlerInfo && (D(output.bundlerInfo, 'version', "2.0.0-rc.0"), D(output.bundlerInfo, 'bundler', 'rspack'), D(output.bundlerInfo, 'force', !output.library));
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));
6839
6871
  }, applyExternalsPresetsDefaults = (externalsPresets, { targetProperties, buildHttp, outputModule })=>{
6840
6872
  let isUniversal = (key)=>!!(outputModule && targetProperties && null === targetProperties[key]);
6841
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')));
@@ -6863,7 +6895,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6863
6895
  "javascript",
6864
6896
  'css',
6865
6897
  'unknown'
6866
- ]), 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', '-');
6867
6899
  let { cacheGroups } = splitChunks;
6868
6900
  cacheGroups && (F(cacheGroups, 'default', ()=>({
6869
6901
  idHint: '',
@@ -8089,7 +8121,7 @@ class MultiStats {
8089
8121
  obj.children = this.stats.map((stat, idx)=>{
8090
8122
  let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
8091
8123
  return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
8092
- }), childOptions.version && (obj.rspackVersion = "2.0.0-rc.0", 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(''));
8093
8125
  let mapError = (j, obj)=>({
8094
8126
  ...obj,
8095
8127
  compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
@@ -8164,7 +8196,19 @@ let asyncLib_each = function(collection, iterator, originalCallback) {
8164
8196
  for (let watching of this.watchings)watching.resume();
8165
8197
  }
8166
8198
  };
8167
- 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);
8168
8212
  let util_ArrayQueue = class {
8169
8213
  _list;
8170
8214
  _listReversed;
@@ -9348,7 +9392,7 @@ let iterateConfig = (config, options, fn)=>{
9348
9392
  object.hash = context.getStatsCompilation(compilation).hash;
9349
9393
  },
9350
9394
  version: (object)=>{
9351
- object.version = "5.75.0", object.rspackVersion = "2.0.0-rc.0";
9395
+ object.version = "5.75.0", object.rspackVersion = "2.0.0-rc.2";
9352
9396
  },
9353
9397
  env: (object, _compilation, _context, { _env })=>{
9354
9398
  object.env = _env;
@@ -10610,7 +10654,7 @@ class RspackOptionsApply {
10610
10654
  moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate,
10611
10655
  namespace: options.output.devtoolNamespace
10612
10656
  }).apply(compiler);
10613
- new JavascriptModulesPlugin().apply(compiler), new URLPlugin().apply(compiler), new JsonModulesPlugin().apply(compiler), new AssetModulesPlugin().apply(compiler), options.experiments.asyncWebAssembly && new AsyncWebAssemblyModulesPlugin().apply(compiler), new CssModulesPlugin().apply(compiler), new lib_EntryOptionPlugin().apply(compiler), assertNotNill(options.context), compiler.hooks.entryOption.call(options.context, options.entry), new RuntimePlugin().apply(compiler), options.output.bundlerInfo && new BundlerInfoRspackPlugin(options.output.bundlerInfo).apply(compiler), new InferAsyncModulesPlugin().apply(compiler), new APIPlugin().apply(compiler), new DataUriPlugin().apply(compiler), new FileUriPlugin().apply(compiler), options.experiments.buildHttp && new HttpUriPlugin(options.experiments.buildHttp).apply(compiler), new EnsureChunkConditionsPlugin().apply(compiler), options.optimization.mergeDuplicateChunks && new MergeDuplicateChunksPlugin().apply(compiler), options.optimization.sideEffects && new SideEffectsFlagPlugin().apply(compiler), options.optimization.providedExports && new FlagDependencyExportsPlugin().apply(compiler), options.optimization.usedExports && new FlagDependencyUsagePlugin('global' === options.optimization.usedExports).apply(compiler), options.optimization.concatenateModules && new ModuleConcatenationPlugin().apply(compiler), options.optimization.inlineExports && new InlineExportsPlugin().apply(compiler), options.optimization.mangleExports && new MangleExportsPlugin('size' !== options.optimization.mangleExports).apply(compiler);
10657
+ new JavascriptModulesPlugin().apply(compiler), new URLPlugin().apply(compiler), new JsonModulesPlugin().apply(compiler), new AssetModulesPlugin().apply(compiler), options.experiments.asyncWebAssembly && new AsyncWebAssemblyModulesPlugin().apply(compiler), new CssModulesPlugin().apply(compiler), new lib_EntryOptionPlugin().apply(compiler), assertNotNill(options.context), compiler.hooks.entryOption.call(options.context, options.entry), new RuntimePlugin().apply(compiler), options.output.bundlerInfo && new BundlerInfoRspackPlugin(options.output.bundlerInfo).apply(compiler), new InferAsyncModulesPlugin().apply(compiler), new APIPlugin().apply(compiler), new DataUriPlugin().apply(compiler), new FileUriPlugin().apply(compiler), options.experiments.buildHttp && new HttpUriPlugin(options.experiments.buildHttp).apply(compiler), new EnsureChunkConditionsPlugin().apply(compiler), options.optimization.mergeDuplicateChunks && new MergeDuplicateChunksPlugin().apply(compiler), options.optimization.sideEffects && new SideEffectsFlagPlugin(options.experiments.pureFunctions).apply(compiler), options.optimization.providedExports && new FlagDependencyExportsPlugin().apply(compiler), options.optimization.usedExports && new FlagDependencyUsagePlugin('global' === options.optimization.usedExports).apply(compiler), options.optimization.concatenateModules && new ModuleConcatenationPlugin().apply(compiler), options.optimization.inlineExports && new InlineExportsPlugin().apply(compiler), options.optimization.mangleExports && new MangleExportsPlugin('size' !== options.optimization.mangleExports).apply(compiler);
10614
10658
  let enableLibSplitChunks = !1;
10615
10659
  if (options.output.enabledLibraryTypes && options.output.enabledLibraryTypes.length > 0) {
10616
10660
  let hasModernModule = options.output.enabledLibraryTypes.includes('modern-module'), hasNonModernModule = options.output.enabledLibraryTypes.some((t)=>'modern-module' !== t);
@@ -10628,6 +10672,9 @@ class RspackOptionsApply {
10628
10672
  case 'deterministic':
10629
10673
  new DeterministicModuleIdsPlugin().apply(compiler);
10630
10674
  break;
10675
+ case 'hashed':
10676
+ new HashedModuleIdsPlugin().apply(compiler);
10677
+ break;
10631
10678
  default:
10632
10679
  throw Error(`moduleIds: ${moduleIds} is not implemented`);
10633
10680
  }
@@ -11005,7 +11052,7 @@ class TraceHookPlugin {
11005
11052
  });
11006
11053
  }
11007
11054
  }
11008
- let CORE_VERSION = "2.0.0-rc.0", VFILES_BY_COMPILER = new WeakMap();
11055
+ let CORE_VERSION = "2.0.0-rc.2", VFILES_BY_COMPILER = new WeakMap();
11009
11056
  class VirtualModulesPlugin {
11010
11057
  #staticModules;
11011
11058
  #compiler;
@@ -11342,7 +11389,7 @@ class Compiler {
11342
11389
  electron: null
11343
11390
  }, this.#target = {}, this.__internal_browser_require = ()=>{
11344
11391
  throw Error('Cannot execute user defined code in browser without `BrowserRequirePlugin`');
11345
- }, 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, {
11346
11393
  writable: !1,
11347
11394
  configurable: !1,
11348
11395
  enumerable: !1,
@@ -11904,13 +11951,10 @@ Help:
11904
11951
  let value = Reflect.get(target, prop);
11905
11952
  return 'function' == typeof value ? value.bind(target) : value;
11906
11953
  },
11907
- 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)
11908
11955
  }));
11909
11956
  return queried.call(proxiedModules), {
11910
- assignments: Object.fromEntries(Array.from(assignments.entries()).map(([k, v])=>[
11911
- k,
11912
- String(v)
11913
- ]))
11957
+ assignments: Object.fromEntries(assignments.entries())
11914
11958
  };
11915
11959
  };
11916
11960
  }),
@@ -12336,6 +12380,17 @@ Object.defineProperty(binding_default().ConcatenatedModule.prototype, 'identifie
12336
12380
  return this._emitFile(filename, SourceAdapter.toBinding(source), assetInfo);
12337
12381
  }
12338
12382
  });
12383
+ let ModuleGraphConnection = binding_namespaceObject.ModuleGraphConnection;
12384
+ Object.defineProperties(ModuleGraphConnection, {
12385
+ TRANSITIVE_ONLY: {
12386
+ value: binding_default().TRANSITIVE_ONLY_SYMBOL,
12387
+ enumerable: !0
12388
+ },
12389
+ CIRCULAR_CONNECTION: {
12390
+ value: binding_default().CIRCULAR_CONNECTION_SYMBOL,
12391
+ enumerable: !0
12392
+ }
12393
+ });
12339
12394
  let asRegExp = (test)=>'string' == typeof test ? RegExp(`^${test.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')}`) : test, matchPart = (str, test)=>!test || (Array.isArray(test) ? test.map(asRegExp).some((regExp)=>regExp.test(str)) : asRegExp(test).test(str)), matchObject = (obj, str)=>!(obj.test && !matchPart(str, obj.test) || obj.include && !matchPart(str, obj.include) || obj.exclude && matchPart(str, obj.exclude)), FlagAllModulesAsUsedPlugin = base_create(binding_namespaceObject.BuiltinPluginName.FlagAllModulesAsUsedPlugin, (explanation)=>({
12340
12395
  explanation
12341
12396
  }));
@@ -13300,7 +13355,7 @@ async function transform(source, options) {
13300
13355
  let _options = JSON.stringify(options || {});
13301
13356
  return binding_default().transform(source, _options);
13302
13357
  }
13303
- let exports_rspackVersion = "2.0.0-rc.0", 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 = {
13304
13359
  getNormalizedRspackOptions: getNormalizedRspackOptions,
13305
13360
  applyRspackOptionsDefaults: applyRspackOptionsDefaults,
13306
13361
  getNormalizedWebpackOptions: getNormalizedRspackOptions,
@@ -13325,6 +13380,8 @@ let exports_rspackVersion = "2.0.0-rc.0", exports_version = "5.75.0", exports_We
13325
13380
  NodeEnvironmentPlugin: NodeEnvironmentPlugin
13326
13381
  }, electron = {
13327
13382
  ElectronTargetPlugin: ElectronTargetPlugin
13383
+ }, exports_ids = {
13384
+ HashedModuleIdsPlugin: HashedModuleIdsPlugin
13328
13385
  }, exports_library = {
13329
13386
  EnableLibraryPlugin: EnableLibraryPlugin
13330
13387
  }, exports_wasm = {
@@ -13533,4 +13590,4 @@ src_fn.rspack = src_fn, src_fn.webpack = src_fn;
13533
13590
  let src_rspack_0 = src_fn;
13534
13591
  var AsyncDependenciesBlock = binding_namespaceObject.AsyncDependenciesBlock, ConcatenatedModule = binding_namespaceObject.ConcatenatedModule, ContextModule = binding_namespaceObject.ContextModule, Dependency = binding_namespaceObject.Dependency, EntryDependency = binding_namespaceObject.EntryDependency, ExternalModule = binding_namespaceObject.ExternalModule, Module = binding_namespaceObject.Module, NormalModule = binding_namespaceObject.NormalModule;
13535
13592
  export default src_rspack_0;
13536
- export { AsyncDependenciesBlock, BannerPlugin, 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, MultiCompiler, MultiStats, NoEmitOnErrorsPlugin, NormalModule, NormalModuleReplacementPlugin, ProgressPlugin, ProvidePlugin, RspackOptionsApply, RspackOptionsApply as WebpackOptionsApply, RuntimeModule, RuntimePlugin, SourceMapDevToolPlugin, Stats, SubresourceIntegrityPlugin, SwcJsMinimizerRspackPlugin, Template, ValidationError, 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, index_js_namespaceObject as sources, 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, webworker };
13593
+ export { AsyncDependenciesBlock, BannerPlugin, 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, MultiCompiler, MultiStats, NoEmitOnErrorsPlugin, NormalModule, NormalModuleReplacementPlugin, ProgressPlugin, ProvidePlugin, RspackOptionsApply, RspackOptionsApply as WebpackOptionsApply, RuntimeModule, RuntimePlugin, SourceMapDevToolPlugin, Stats, SubresourceIntegrityPlugin, SwcJsMinimizerRspackPlugin, Template, ValidationError, container, electron, exports_WebpackError as WebpackError, exports_config as config, exports_experiments as experiments, exports_ids as ids, exports_library as library, exports_node as node, exports_rspackVersion as rspackVersion, exports_version as version, exports_wasm as wasm, index_js_namespaceObject as sources, 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, webworker };
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-debug/core",
3
- "version": "2.0.0-rc.0",
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,17 +37,17 @@
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.2",
43
+ "@rslib/core": "0.21.0",
44
44
  "@rspack/lite-tapable": "1.1.0",
45
45
  "@swc/types": "0.1.26",
46
- "@types/node": "^20.19.37",
46
+ "@types/node": "^20.19.39",
47
47
  "@types/watchpack": "^2.4.5",
48
48
  "browserslist-load-config": "^1.0.1",
49
49
  "browserslist-to-es-version": "^1.4.1",
50
- "connect-next": "^4.0.0",
50
+ "connect-next": "^4.0.1",
51
51
  "enhanced-resolve": "5.20.1",
52
52
  "http-proxy-middleware": "^3.0.5",
53
53
  "memfs": "4.53.0",
@@ -59,7 +59,7 @@
59
59
  "webpack-sources": "3.3.4"
60
60
  },
61
61
  "dependencies": {
62
- "@rspack/binding": "npm:@rspack-debug/binding@2.0.0-rc.0"
62
+ "@rspack/binding": "npm:@rspack-debug/binding@2.0.0-rc.2"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "@module-federation/runtime-tools": "^0.24.1 || ^2.0.0",