@rspack/core 1.0.0-beta.0 → 1.0.0-beta.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.
Files changed (177) hide show
  1. package/dist/ChunkGroup.d.ts +1 -0
  2. package/dist/ChunkGroup.js +3 -0
  3. package/dist/Compilation.d.ts +19 -1
  4. package/dist/Compiler.d.ts +11 -10
  5. package/dist/Compiler.js +16 -16
  6. package/dist/ExecuteModulePlugin.d.ts +0 -1
  7. package/dist/ExecuteModulePlugin.js +0 -1
  8. package/dist/Module.d.ts +2 -2
  9. package/dist/Module.js +1 -1
  10. package/dist/MultiCompiler.js +1 -1
  11. package/dist/NormalModule.d.ts +1 -0
  12. package/dist/NormalModule.js +1 -0
  13. package/dist/Resolver.d.ts +1 -2
  14. package/dist/RspackError.js +1 -1
  15. package/dist/Stats.js +22 -2
  16. package/dist/Template.js +2 -2
  17. package/dist/builtin-loader/lightningcss/index.js +1 -1
  18. package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
  19. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
  20. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
  21. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
  22. package/dist/builtin-plugin/BannerPlugin.d.ts +31 -31
  23. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
  24. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
  25. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
  26. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
  27. package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
  28. package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
  29. package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
  30. package/dist/builtin-plugin/DefinePlugin.js +1 -1
  31. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
  32. package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
  33. package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
  34. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
  35. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +3 -3
  36. package/dist/builtin-plugin/EnableChunkLoadingPlugin.js +1 -1
  37. package/dist/builtin-plugin/EnableLibraryPlugin.js +1 -6
  38. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +3 -3
  39. package/dist/builtin-plugin/EnableWasmLoadingPlugin.js +1 -1
  40. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
  41. package/dist/builtin-plugin/EntryPlugin.d.ts +3 -2
  42. package/dist/builtin-plugin/EntryPlugin.js +1 -0
  43. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
  44. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
  45. package/dist/builtin-plugin/ExternalsPlugin.d.ts +5 -5
  46. package/dist/builtin-plugin/ExternalsPlugin.js +1 -1
  47. package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
  48. package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
  49. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
  50. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
  51. package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +9 -9
  52. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
  53. package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
  54. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
  55. package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +0 -1
  56. package/dist/builtin-plugin/JavascriptModulesPlugin.js +1 -1
  57. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
  58. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
  59. package/dist/builtin-plugin/LightningCssMiminizerRspackPlugin.d.ts +4 -11
  60. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
  61. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
  62. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
  63. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
  64. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
  65. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
  66. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
  67. package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -1
  68. package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -1
  69. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
  70. package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
  71. package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
  72. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
  73. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
  74. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
  75. package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
  76. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
  77. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
  78. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
  79. package/dist/builtin-plugin/SwcCssMinimizerPlugin.d.ts +1 -1
  80. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +2 -3
  81. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
  82. package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
  83. package/dist/builtin-plugin/base.d.ts +1 -1
  84. package/dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.js +3 -5
  85. package/dist/builtin-plugin/css-extract/hmr/normalizeUrl.js +7 -5
  86. package/dist/builtin-plugin/css-extract/loader.d.ts +8 -3
  87. package/dist/builtin-plugin/css-extract/loader.js +27 -22
  88. package/dist/builtin-plugin/lazy-compilation/backend.js +4 -4
  89. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
  90. package/dist/config/adapter.js +16 -2
  91. package/dist/config/adapterRuleUse.d.ts +2 -6
  92. package/dist/config/adapterRuleUse.js +10 -9
  93. package/dist/config/defaults.js +28 -42
  94. package/dist/config/normalization.d.ts +7 -3
  95. package/dist/config/normalization.js +7 -2
  96. package/dist/config/zod.d.ts +1634 -1093
  97. package/dist/config/zod.js +31 -2
  98. package/dist/container/ContainerReferencePlugin.d.ts +1 -1
  99. package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
  100. package/dist/container/default.runtime.js +1 -1
  101. package/dist/exports.d.ts +1 -1
  102. package/dist/lib/AbstractMethodError.d.ts +12 -3
  103. package/dist/lib/AbstractMethodError.js +29 -22
  104. package/dist/lib/Cache.d.ts +40 -46
  105. package/dist/lib/Cache.js +43 -78
  106. package/dist/lib/CacheFacade.d.ts +119 -143
  107. package/dist/lib/CacheFacade.js +123 -124
  108. package/dist/lib/Dependency.d.ts +23 -0
  109. package/dist/lib/Dependency.js +11 -0
  110. package/dist/lib/EntryOptionPlugin.d.ts +19 -2
  111. package/dist/lib/EntryOptionPlugin.js +22 -6
  112. package/dist/lib/EnvironmentPlugin.d.ts +17 -10
  113. package/dist/lib/EnvironmentPlugin.js +16 -17
  114. package/dist/lib/HookWebpackError.d.ts +27 -33
  115. package/dist/lib/HookWebpackError.js +33 -34
  116. package/dist/lib/IgnoreWarningsPlugin.d.ts +25 -0
  117. package/dist/lib/{ignoreWarningsPlugin.js → IgnoreWarningsPlugin.js} +17 -0
  118. package/dist/lib/LoaderOptionsPlugin.d.ts +18 -9
  119. package/dist/lib/LoaderOptionsPlugin.js +38 -14
  120. package/dist/lib/LoaderTargetPlugin.d.ts +17 -8
  121. package/dist/lib/LoaderTargetPlugin.js +17 -15
  122. package/dist/lib/ModuleFilenameHelpers.d.ts +10 -1
  123. package/dist/lib/ModuleFilenameHelpers.js +10 -1
  124. package/dist/lib/NormalModuleReplacementPlugin.d.ts +15 -5
  125. package/dist/lib/NormalModuleReplacementPlugin.js +15 -5
  126. package/dist/lib/WebpackError.d.ts +23 -22
  127. package/dist/lib/WebpackError.js +15 -35
  128. package/dist/lib/cache/MemoryCachePlugin.d.ts +5 -0
  129. package/dist/lib/cache/MemoryCachePlugin.js +40 -0
  130. package/dist/lib/cache/getLazyHashedEtag.d.ts +24 -24
  131. package/dist/lib/cache/getLazyHashedEtag.js +20 -23
  132. package/dist/lib/cache/mergeEtags.d.ts +15 -9
  133. package/dist/lib/cache/mergeEtags.js +18 -11
  134. package/dist/lib/formatLocation.d.ts +14 -9
  135. package/dist/lib/formatLocation.js +17 -15
  136. package/dist/loader-runner/index.js +6 -7
  137. package/dist/loader-runner/loadLoader.js +8 -11
  138. package/dist/logging/Logger.js +3 -3
  139. package/dist/logging/createConsoleLogger.d.ts +26 -6
  140. package/dist/logging/createConsoleLogger.js +21 -58
  141. package/dist/logging/runtime.d.ts +4 -10
  142. package/dist/logging/runtime.js +8 -23
  143. package/dist/logging/truncateArgs.d.ts +4 -4
  144. package/dist/logging/truncateArgs.js +5 -10
  145. package/dist/node/NodeEnvironmentPlugin.js +2 -2
  146. package/dist/node/NodeWatchFileSystem.js +6 -6
  147. package/dist/node/nodeConsole.d.ts +7 -21
  148. package/dist/node/nodeConsole.js +29 -36
  149. package/dist/rspackOptionsApply.d.ts +0 -1
  150. package/dist/rspackOptionsApply.js +10 -9
  151. package/dist/sharing/ProvideSharedPlugin.d.ts +20 -19
  152. package/dist/sharing/ProvideSharedPlugin.js +26 -17
  153. package/dist/sharing/SharePlugin.d.ts +3 -0
  154. package/dist/sharing/SharePlugin.js +4 -1
  155. package/dist/stats/DefaultStatsFactoryPlugin.js +187 -96
  156. package/dist/stats/DefaultStatsPresetPlugin.js +1 -2
  157. package/dist/stats/DefaultStatsPrinterPlugin.js +18 -19
  158. package/dist/stats/StatsFactory.d.ts +2 -1
  159. package/dist/stats/StatsFactory.js +2 -6
  160. package/dist/stats/statsFactoryUtils.d.ts +63 -23
  161. package/dist/util/SizeFormatHelpers.js +1 -1
  162. package/dist/util/bindingVersionCheck.js +3 -3
  163. package/dist/util/cleverMerge.js +3 -2
  164. package/dist/util/comparators.d.ts +2 -2
  165. package/dist/util/comparators.js +5 -4
  166. package/dist/util/createHash.js +1 -1
  167. package/dist/util/fs.js +2 -2
  168. package/dist/util/identifier.js +2 -2
  169. package/dist/util/index.js +1 -1
  170. package/dist/util/memoize.js +1 -4
  171. package/dist/util/smartGrouping.js +4 -6
  172. package/dist/util/webpack.d.ts +1 -1
  173. package/dist/util/webpack.js +2 -1
  174. package/module.d.ts +1 -1
  175. package/package.json +3 -3
  176. package/compiled/enhanced-resolve/index.js +0 -5566
  177. package/dist/lib/ignoreWarningsPlugin.d.ts +0 -7
@@ -6,6 +6,7 @@ export declare class ChunkGroup {
6
6
  protected constructor(inner: JsChunkGroup, compilation: JsCompilation);
7
7
  getFiles(): ReadonlyArray<string>;
8
8
  getParents(): ReadonlyArray<ChunkGroup>;
9
+ isInitial(): boolean;
9
10
  get chunks(): ReadonlyArray<Chunk>;
10
11
  get index(): Readonly<number | undefined>;
11
12
  get name(): Readonly<string | undefined>;
@@ -40,6 +40,9 @@ class ChunkGroup {
40
40
  return ChunkGroup.__from_binding(cg, __classPrivateFieldGet(this, _ChunkGroup_innerCompilation, "f"));
41
41
  });
42
42
  }
43
+ isInitial() {
44
+ return __classPrivateFieldGet(this, _ChunkGroup_inner, "f").isInitial;
45
+ }
43
46
  get chunks() {
44
47
  return __classPrivateFieldGet(this, _ChunkGroup_inner, "f").chunks.map(c => Chunk_1.Chunk.__from_binding(c, __classPrivateFieldGet(this, _ChunkGroup_innerCompilation, "f")));
45
48
  }
@@ -102,6 +102,24 @@ export interface KnownNormalizedStatsOptions {
102
102
  logging: false | "none" | "error" | "warn" | "info" | "log" | "verbose";
103
103
  loggingDebug: ((value: string) => boolean)[];
104
104
  loggingTrace: boolean;
105
+ chunkModules: boolean;
106
+ chunkRelations: boolean;
107
+ reasons: boolean;
108
+ moduleAssets: boolean;
109
+ nestedModules: boolean;
110
+ source: boolean;
111
+ usedExports: boolean;
112
+ providedExports: boolean;
113
+ optimizationBailout: boolean;
114
+ depth: boolean;
115
+ assets: boolean;
116
+ chunks: boolean;
117
+ errors: boolean;
118
+ errorsCount: boolean;
119
+ hash: boolean;
120
+ modules: boolean;
121
+ warnings: boolean;
122
+ warningsCount: boolean;
105
123
  }
106
124
  export type CreateStatsOptionsContext = KnownCreateStatsOptionsContext & Record<string, any>;
107
125
  export type NormalizedStatsOptions = KnownNormalizedStatsOptions & Omit<StatsOptions, keyof KnownNormalizedStatsOptions> & Record<string, any>;
@@ -201,7 +219,7 @@ export declare class Compilation {
201
219
  buildInfo: Record<string, unknown>;
202
220
  buildMeta: Record<string, unknown>;
203
221
  };
204
- getCache(name: string): import("./lib/CacheFacade");
222
+ getCache(name: string): import("./lib/CacheFacade").CacheFacade;
205
223
  createStatsOptions(optionsOrPreset: StatsValue | undefined, context?: CreateStatsOptionsContext): NormalizedStatsOptions;
206
224
  createStatsFactory(options: StatsOptions): StatsFactory;
207
225
  createStatsPrinter(options: StatsOptions): StatsPrinter;
@@ -10,22 +10,23 @@
10
10
  */
11
11
  import * as binding from "@rspack/binding";
12
12
  import * as liteTapable from "@rspack/lite-tapable";
13
- import type Watchpack from "../compiled/watchpack";
14
- import { Compilation, type CompilationParams } from "./Compilation";
13
+ import Cache from "./lib/Cache";
14
+ import CacheFacade from "./lib/CacheFacade";
15
+ import { Chunk } from "./Chunk";
16
+ import { Compilation } from "./Compilation";
15
17
  import { ContextModuleFactory } from "./ContextModuleFactory";
18
+ import { NormalModuleFactory } from "./NormalModuleFactory";
19
+ import { ResolverFactory } from "./ResolverFactory";
16
20
  import { RuleSetCompiler } from "./RuleSetCompiler";
17
21
  import { Stats } from "./Stats";
18
- import { type EntryNormalized, type OutputNormalized, type RspackOptionsNormalized, type RspackPluginInstance } from "./config";
22
+ import { Watching } from "./Watching";
19
23
  import { rspack } from "./index";
20
- import Cache = require("./lib/Cache");
21
- import CacheFacade = require("./lib/CacheFacade");
24
+ import { Logger } from "./logging/Logger";
25
+ import type Watchpack from "../compiled/watchpack";
22
26
  import type { Source } from "../compiled/webpack-sources";
23
- import { Chunk } from "./Chunk";
27
+ import type { CompilationParams } from "./Compilation";
24
28
  import type { FileSystemInfoEntry } from "./FileSystemInfo";
25
- import { NormalModuleFactory } from "./NormalModuleFactory";
26
- import { ResolverFactory } from "./ResolverFactory";
27
- import { Watching } from "./Watching";
28
- import { Logger } from "./logging/Logger";
29
+ import type { EntryNormalized, OutputNormalized, RspackOptionsNormalized, RspackPluginInstance } from "./config";
29
30
  import type { OutputFileSystem, WatchFileSystem } from "./util/fs";
30
31
  export interface AssetEmittedInfo {
31
32
  content: Buffer;
package/dist/Compiler.js CHANGED
@@ -50,29 +50,29 @@ exports.Compiler = void 0;
50
50
  */
51
51
  const binding = __importStar(require("@rspack/binding"));
52
52
  const liteTapable = __importStar(require("@rspack/lite-tapable"));
53
+ const ExecuteModulePlugin_1 = __importDefault(require("./ExecuteModulePlugin"));
54
+ const ConcurrentCompilationError_1 = __importDefault(require("./error/ConcurrentCompilationError"));
55
+ const Cache_1 = __importDefault(require("./lib/Cache"));
56
+ const CacheFacade_1 = __importDefault(require("./lib/CacheFacade"));
57
+ const RuntimeGlobals_1 = require("./RuntimeGlobals");
58
+ const builtin_plugin_1 = require("./builtin-plugin");
59
+ const Chunk_1 = require("./Chunk");
53
60
  const Compilation_1 = require("./Compilation");
54
61
  const ContextModuleFactory_1 = require("./ContextModuleFactory");
55
62
  const FileSystem_1 = require("./FileSystem");
56
- const RuleSetCompiler_1 = require("./RuleSetCompiler");
57
- const Stats_1 = require("./Stats");
58
- const config_1 = require("./config");
59
- const ConcurrentCompilationError_1 = __importDefault(require("./error/ConcurrentCompilationError"));
60
- const index_1 = require("./index");
61
- const Cache = require("./lib/Cache");
62
- const CacheFacade = require("./lib/CacheFacade");
63
- const Chunk_1 = require("./Chunk");
64
- const ExecuteModulePlugin_1 = __importDefault(require("./ExecuteModulePlugin"));
65
63
  const Module_1 = require("./Module");
66
64
  const NormalModuleFactory_1 = require("./NormalModuleFactory");
67
65
  const ResolverFactory_1 = require("./ResolverFactory");
68
- const RuntimeGlobals_1 = require("./RuntimeGlobals");
66
+ const RuleSetCompiler_1 = require("./RuleSetCompiler");
67
+ const Stats_1 = require("./Stats");
69
68
  const Watching_1 = require("./Watching");
70
- const builtin_plugin_1 = require("./builtin-plugin");
69
+ const config_1 = require("./config");
70
+ const index_1 = require("./index");
71
+ const util_1 = require("./util");
71
72
  const base_1 = require("./builtin-plugin/base");
72
73
  const defaults_1 = require("./config/defaults");
73
74
  const HookWebpackError_1 = require("./lib/HookWebpackError");
74
75
  const Logger_1 = require("./logging/Logger");
75
- const util_1 = require("./util");
76
76
  const assertNotNil_1 = require("./util/assertNotNil");
77
77
  const bindingVersionCheck_1 = require("./util/bindingVersionCheck");
78
78
  const createHash_1 = require("./util/createHash");
@@ -147,7 +147,7 @@ class Compiler {
147
147
  this.options = options;
148
148
  this.resolverFactory = new ResolverFactory_1.ResolverFactory();
149
149
  this.context = context;
150
- this.cache = new Cache();
150
+ this.cache = new Cache_1.default();
151
151
  this.compilerPath = "";
152
152
  this.running = false;
153
153
  this.idle = false;
@@ -189,7 +189,7 @@ class Compiler {
189
189
  * @returns the cache facade instance
190
190
  */
191
191
  getCache(name) {
192
- return new CacheFacade(this.cache, `${this.compilerPath}${name}`, this.options.output.hashFunction);
192
+ return new CacheFacade_1.default(this.cache, `${this.compilerPath}${name}`, this.options.output.hashFunction);
193
193
  }
194
194
  /**
195
195
  * @param name - name of the logger, or function called once to get the logger name
@@ -368,7 +368,7 @@ class Compiler {
368
368
  });
369
369
  }
370
370
  purgeInputFileSystem() {
371
- if (this.inputFileSystem && this.inputFileSystem.purge) {
371
+ if (this.inputFileSystem?.purge) {
372
372
  this.inputFileSystem.purge();
373
373
  }
374
374
  }
@@ -614,7 +614,7 @@ _Compiler_instance = new WeakMap(), _Compiler_initial = new WeakMap(), _Compiler
614
614
  throw cached.error;
615
615
  return cached.exports;
616
616
  }
617
- var execOptions = {
617
+ const execOptions = {
618
618
  id,
619
619
  module: {
620
620
  id,
@@ -1,5 +1,4 @@
1
1
  import type { Compiler } from "./Compiler";
2
2
  export default class ExecuteModulePlugin {
3
- constructor();
4
3
  apply(compiler: Compiler): void;
5
4
  }
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const node_vm_1 = __importDefault(require("node:vm"));
7
7
  const _1 = require(".");
8
8
  class ExecuteModulePlugin {
9
- constructor() { }
10
9
  apply(compiler) {
11
10
  compiler.hooks.compilation.tap("executeModule", compilation => {
12
11
  compilation.hooks.executeModule.tap("executeModule", (options, context) => {
package/dist/Module.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { JsCodegenerationResult, JsCodegenerationResults, JsCreateData, JsFactoryMeta, JsModule } from "@rspack/binding";
1
+ import type { JsCodegenerationResult, JsCreateData, JsFactoryMeta, JsModule } from "@rspack/binding";
2
2
  import type { Source } from "../compiled/webpack-sources";
3
3
  import type { Compilation } from "./Compilation";
4
4
  export type ResourceData = {
@@ -42,6 +42,7 @@ export declare class Module {
42
42
  userRequest?: Readonly<string>;
43
43
  rawRequest?: Readonly<string>;
44
44
  type: string;
45
+ layer: null | string;
45
46
  factoryMeta?: Readonly<JsFactoryMeta>;
46
47
  /**
47
48
  * Records the dynamically added fields for Module on the JavaScript side.
@@ -67,5 +68,4 @@ export declare class CodeGenerationResult {
67
68
  get(sourceType: string): string;
68
69
  }
69
70
  export declare class CodeGenerationResults {
70
- constructor(_result: JsCodegenerationResults);
71
71
  }
package/dist/Module.js CHANGED
@@ -23,6 +23,7 @@ class Module {
23
23
  _Module_originalSource.set(this, void 0);
24
24
  __classPrivateFieldSet(this, _Module_inner, module, "f");
25
25
  this.type = module.type;
26
+ this.layer = module.layer ?? null;
26
27
  this.context = module.context;
27
28
  this.resource = module.resource;
28
29
  this.request = module.request;
@@ -66,6 +67,5 @@ class CodeGenerationResult {
66
67
  exports.CodeGenerationResult = CodeGenerationResult;
67
68
  _CodeGenerationResult_inner = new WeakMap();
68
69
  class CodeGenerationResults {
69
- constructor(_result) { }
70
70
  }
71
71
  exports.CodeGenerationResults = CodeGenerationResults;
@@ -271,7 +271,7 @@ class MultiCompiler {
271
271
  }
272
272
  purgeInputFileSystem() {
273
273
  for (const compiler of this.compilers) {
274
- if (compiler.inputFileSystem && compiler.inputFileSystem.purge) {
274
+ if (compiler.inputFileSystem?.purge) {
275
275
  compiler.inputFileSystem.purge();
276
276
  }
277
277
  }
@@ -13,3 +13,4 @@ export declare class NormalModule {
13
13
  }>>;
14
14
  };
15
15
  }
16
+ export default NormalModule;
@@ -95,3 +95,4 @@ class NormalModule {
95
95
  }
96
96
  }
97
97
  exports.NormalModule = NormalModule;
98
+ exports.default = NormalModule;
@@ -1,7 +1,6 @@
1
1
  import type * as binding from "@rspack/binding";
2
2
  import { type Resolve } from "./config";
3
- interface ResolveContext {
4
- }
3
+ type ResolveContext = {};
5
4
  type ErrorWithDetail = Error & {
6
5
  details?: string;
7
6
  };
@@ -15,7 +15,7 @@ class NonErrorEmittedError extends Error {
15
15
  constructor(error) {
16
16
  super();
17
17
  this.name = "NonErrorEmittedError";
18
- this.message = "(Emitted value instead of an instance of Error) " + error;
18
+ this.message = `(Emitted value instead of an instance of Error) ${error}`;
19
19
  }
20
20
  }
21
21
  exports.NonErrorEmittedError = NonErrorEmittedError;
package/dist/Stats.js CHANGED
@@ -32,16 +32,17 @@ class Stats {
32
32
  return this.compilation.endTime;
33
33
  }
34
34
  hasErrors() {
35
- return __classPrivateFieldGet(this, _Stats_inner, "f").getErrors().length > 0;
35
+ return __classPrivateFieldGet(this, _Stats_inner, "f").hasErrors();
36
36
  }
37
37
  hasWarnings() {
38
- return __classPrivateFieldGet(this, _Stats_inner, "f").getWarnings().length > 0;
38
+ return __classPrivateFieldGet(this, _Stats_inner, "f").hasWarnings();
39
39
  }
40
40
  toJson(opts, forToString) {
41
41
  const options = this.compilation.createStatsOptions(opts, {
42
42
  forToString
43
43
  });
44
44
  const statsFactory = this.compilation.createStatsFactory(options);
45
+ const statsCompilationMap = new Map();
45
46
  // FIXME: This is a really ugly workaround for avoid panic for accessing previous compilation.
46
47
  // Modern.js dev server will detect whether the returned stats is available.
47
48
  // So this does not do harm to these frameworks.
@@ -50,6 +51,15 @@ class Stats {
50
51
  try {
51
52
  stats = statsFactory.create("compilation", this.compilation, {
52
53
  compilation: this.compilation,
54
+ getStatsCompilation: (compilation) => {
55
+ if (statsCompilationMap.has(compilation)) {
56
+ return statsCompilationMap.get(compilation);
57
+ }
58
+ const innerStats = __classPrivateFieldGet(this, _Stats_instances, "m", _Stats_getInnerByCompilation).call(this, compilation);
59
+ const innerStatsCompilation = innerStats.toJson(options);
60
+ statsCompilationMap.set(compilation, innerStatsCompilation);
61
+ return innerStatsCompilation;
62
+ },
53
63
  getInner: __classPrivateFieldGet(this, _Stats_instances, "m", _Stats_getInnerByCompilation).bind(this)
54
64
  });
55
65
  }
@@ -65,6 +75,7 @@ class Stats {
65
75
  });
66
76
  const statsFactory = this.compilation.createStatsFactory(options);
67
77
  const statsPrinter = this.compilation.createStatsPrinter(options);
78
+ const statsCompilationMap = new Map();
68
79
  // FIXME: This is a really ugly workaround for avoid panic for accessing previous compilation.
69
80
  // Modern.js dev server will detect whether the returned stats is available.
70
81
  // So this does not do harm to these frameworks.
@@ -73,6 +84,15 @@ class Stats {
73
84
  try {
74
85
  stats = statsFactory.create("compilation", this.compilation, {
75
86
  compilation: this.compilation,
87
+ getStatsCompilation: (compilation) => {
88
+ if (statsCompilationMap.has(compilation)) {
89
+ return statsCompilationMap.get(compilation);
90
+ }
91
+ const innerStats = __classPrivateFieldGet(this, _Stats_instances, "m", _Stats_getInnerByCompilation).call(this, compilation);
92
+ const innerStatsCompilation = innerStats.toJson(options);
93
+ statsCompilationMap.set(compilation, innerStatsCompilation);
94
+ return innerStatsCompilation;
95
+ },
76
96
  getInner: __classPrivateFieldGet(this, _Stats_instances, "m", _Stats_getInnerByCompilation).bind(this)
77
97
  });
78
98
  }
package/dist/Template.js CHANGED
@@ -156,7 +156,7 @@ class Template {
156
156
  if (!str)
157
157
  return "";
158
158
  const ind = str[0] === "\n" ? "" : prefix;
159
- return ind + str.replace(/\n([^\n])/g, "\n" + prefix + "$1");
159
+ return ind + str.replace(/\n([^\n])/g, `\n${prefix}$1`);
160
160
  }
161
161
  /**
162
162
  *
@@ -186,7 +186,7 @@ class Template {
186
186
  if (minId > moduleId)
187
187
  minId = moduleId;
188
188
  }
189
- if (minId < 16 + ("" + minId).length) {
189
+ if (minId < 16 + `${minId}`.length) {
190
190
  // add minId x ',' instead of 'Array(minId).concat(…)'
191
191
  minId = 0;
192
192
  }
@@ -141,7 +141,7 @@ function parseVersion(version) {
141
141
  .split("-")[0]
142
142
  .split(".")
143
143
  .map(v => Number.parseInt(v, 10));
144
- if (isNaN(major) || isNaN(minor) || isNaN(patch)) {
144
+ if (Number.isNaN(major) || Number.isNaN(minor) || Number.isNaN(patch)) {
145
145
  return null;
146
146
  }
147
147
  return (major << 16) | (minor << 8) | patch;
@@ -3,7 +3,7 @@ export declare const APIPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const ArrayPushCallbackChunkFormatPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const AssetModulesPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const AsyncWebAssemblyModulesPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -9,13 +9,13 @@ declare const bannerFunction: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
9
9
  chunk: z.ZodType<JsChunk, z.ZodTypeDef, JsChunk>;
10
10
  filename: z.ZodString;
11
11
  }, "strip", z.ZodTypeAny, {
12
+ filename: string;
12
13
  hash: string;
13
14
  chunk: JsChunk;
14
- filename: string;
15
15
  }, {
16
+ filename: string;
16
17
  hash: string;
17
18
  chunk: JsChunk;
18
- filename: string;
19
19
  }>], z.ZodUnknown>, z.ZodString>;
20
20
  export type BannerFunction = z.infer<typeof bannerFunction>;
21
21
  declare const bannerContent: z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodObject<{
@@ -23,13 +23,13 @@ declare const bannerContent: z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[
23
23
  chunk: z.ZodType<JsChunk, z.ZodTypeDef, JsChunk>;
24
24
  filename: z.ZodString;
25
25
  }, "strip", z.ZodTypeAny, {
26
+ filename: string;
26
27
  hash: string;
27
28
  chunk: JsChunk;
28
- filename: string;
29
29
  }, {
30
+ filename: string;
30
31
  hash: string;
31
32
  chunk: JsChunk;
32
- filename: string;
33
33
  }>], z.ZodUnknown>, z.ZodString>]>;
34
34
  export type BannerContent = z.infer<typeof bannerContent>;
35
35
  declare const bannerPluginOptions: z.ZodObject<{
@@ -38,13 +38,13 @@ declare const bannerPluginOptions: z.ZodObject<{
38
38
  chunk: z.ZodType<JsChunk, z.ZodTypeDef, JsChunk>;
39
39
  filename: z.ZodString;
40
40
  }, "strip", z.ZodTypeAny, {
41
+ filename: string;
41
42
  hash: string;
42
43
  chunk: JsChunk;
43
- filename: string;
44
44
  }, {
45
+ filename: string;
45
46
  hash: string;
46
47
  chunk: JsChunk;
47
- filename: string;
48
48
  }>], z.ZodUnknown>, z.ZodString>]>;
49
49
  entryOnly: z.ZodOptional<z.ZodBoolean>;
50
50
  exclude: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
@@ -55,30 +55,30 @@ declare const bannerPluginOptions: z.ZodObject<{
55
55
  test: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
56
56
  }, "strict", z.ZodTypeAny, {
57
57
  banner: string | ((args_0: {
58
+ filename: string;
58
59
  hash: string;
59
60
  chunk: JsChunk;
60
- filename: string;
61
61
  }, ...args_1: unknown[]) => string);
62
- test?: string | RegExp | (string | RegExp)[] | undefined;
62
+ entryOnly?: boolean | undefined;
63
63
  exclude?: string | RegExp | (string | RegExp)[] | undefined;
64
64
  include?: string | RegExp | (string | RegExp)[] | undefined;
65
- entryOnly?: boolean | undefined;
66
65
  raw?: boolean | undefined;
67
66
  footer?: boolean | undefined;
68
67
  stage?: number | undefined;
68
+ test?: string | RegExp | (string | RegExp)[] | undefined;
69
69
  }, {
70
70
  banner: string | ((args_0: {
71
+ filename: string;
71
72
  hash: string;
72
73
  chunk: JsChunk;
73
- filename: string;
74
74
  }, ...args_1: unknown[]) => string);
75
- test?: string | RegExp | (string | RegExp)[] | undefined;
75
+ entryOnly?: boolean | undefined;
76
76
  exclude?: string | RegExp | (string | RegExp)[] | undefined;
77
77
  include?: string | RegExp | (string | RegExp)[] | undefined;
78
- entryOnly?: boolean | undefined;
79
78
  raw?: boolean | undefined;
80
79
  footer?: boolean | undefined;
81
80
  stage?: number | undefined;
81
+ test?: string | RegExp | (string | RegExp)[] | undefined;
82
82
  }>;
83
83
  export type BannerPluginOptions = z.infer<typeof bannerPluginOptions>;
84
84
  declare const bannerPluginArgument: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodObject<{
@@ -86,26 +86,26 @@ declare const bannerPluginArgument: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodFu
86
86
  chunk: z.ZodType<JsChunk, z.ZodTypeDef, JsChunk>;
87
87
  filename: z.ZodString;
88
88
  }, "strip", z.ZodTypeAny, {
89
+ filename: string;
89
90
  hash: string;
90
91
  chunk: JsChunk;
91
- filename: string;
92
92
  }, {
93
+ filename: string;
93
94
  hash: string;
94
95
  chunk: JsChunk;
95
- filename: string;
96
96
  }>], z.ZodUnknown>, z.ZodString>]>, z.ZodObject<{
97
97
  banner: z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodObject<{
98
98
  hash: z.ZodString;
99
99
  chunk: z.ZodType<JsChunk, z.ZodTypeDef, JsChunk>;
100
100
  filename: z.ZodString;
101
101
  }, "strip", z.ZodTypeAny, {
102
+ filename: string;
102
103
  hash: string;
103
104
  chunk: JsChunk;
104
- filename: string;
105
105
  }, {
106
+ filename: string;
106
107
  hash: string;
107
108
  chunk: JsChunk;
108
- filename: string;
109
109
  }>], z.ZodUnknown>, z.ZodString>]>;
110
110
  entryOnly: z.ZodOptional<z.ZodBoolean>;
111
111
  exclude: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
@@ -116,71 +116,71 @@ declare const bannerPluginArgument: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodFu
116
116
  test: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
117
117
  }, "strict", z.ZodTypeAny, {
118
118
  banner: string | ((args_0: {
119
+ filename: string;
119
120
  hash: string;
120
121
  chunk: JsChunk;
121
- filename: string;
122
122
  }, ...args_1: unknown[]) => string);
123
- test?: string | RegExp | (string | RegExp)[] | undefined;
123
+ entryOnly?: boolean | undefined;
124
124
  exclude?: string | RegExp | (string | RegExp)[] | undefined;
125
125
  include?: string | RegExp | (string | RegExp)[] | undefined;
126
- entryOnly?: boolean | undefined;
127
126
  raw?: boolean | undefined;
128
127
  footer?: boolean | undefined;
129
128
  stage?: number | undefined;
129
+ test?: string | RegExp | (string | RegExp)[] | undefined;
130
130
  }, {
131
131
  banner: string | ((args_0: {
132
+ filename: string;
132
133
  hash: string;
133
134
  chunk: JsChunk;
134
- filename: string;
135
135
  }, ...args_1: unknown[]) => string);
136
- test?: string | RegExp | (string | RegExp)[] | undefined;
136
+ entryOnly?: boolean | undefined;
137
137
  exclude?: string | RegExp | (string | RegExp)[] | undefined;
138
138
  include?: string | RegExp | (string | RegExp)[] | undefined;
139
- entryOnly?: boolean | undefined;
140
139
  raw?: boolean | undefined;
141
140
  footer?: boolean | undefined;
142
141
  stage?: number | undefined;
142
+ test?: string | RegExp | (string | RegExp)[] | undefined;
143
143
  }>]>;
144
144
  export type BannerPluginArgument = z.infer<typeof bannerPluginArgument>;
145
145
  export declare const BannerPlugin: {
146
146
  new (args: string | ((args_0: {
147
+ filename: string;
147
148
  hash: string;
148
149
  chunk: JsChunk;
149
- filename: string;
150
150
  }, ...args_1: unknown[]) => string) | {
151
151
  banner: string | ((args_0: {
152
+ filename: string;
152
153
  hash: string;
153
154
  chunk: JsChunk;
154
- filename: string;
155
155
  }, ...args_1: unknown[]) => string);
156
- test?: string | RegExp | (string | RegExp)[] | undefined;
156
+ entryOnly?: boolean | undefined;
157
157
  exclude?: string | RegExp | (string | RegExp)[] | undefined;
158
158
  include?: string | RegExp | (string | RegExp)[] | undefined;
159
- entryOnly?: boolean | undefined;
160
159
  raw?: boolean | undefined;
161
160
  footer?: boolean | undefined;
162
161
  stage?: number | undefined;
162
+ test?: string | RegExp | (string | RegExp)[] | undefined;
163
163
  }): {
164
164
  name: BuiltinPluginName;
165
165
  _args: [args: string | ((args_0: {
166
+ filename: string;
166
167
  hash: string;
167
168
  chunk: JsChunk;
168
- filename: string;
169
169
  }, ...args_1: unknown[]) => string) | {
170
170
  banner: string | ((args_0: {
171
+ filename: string;
171
172
  hash: string;
172
173
  chunk: JsChunk;
173
- filename: string;
174
174
  }, ...args_1: unknown[]) => string);
175
- test?: string | RegExp | (string | RegExp)[] | undefined;
175
+ entryOnly?: boolean | undefined;
176
176
  exclude?: string | RegExp | (string | RegExp)[] | undefined;
177
177
  include?: string | RegExp | (string | RegExp)[] | undefined;
178
- entryOnly?: boolean | undefined;
179
178
  raw?: boolean | undefined;
180
179
  footer?: boolean | undefined;
181
180
  stage?: number | undefined;
181
+ test?: string | RegExp | (string | RegExp)[] | undefined;
182
182
  }];
183
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
183
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
184
184
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
185
185
  apply(compiler: import("../Compiler").Compiler): void;
186
186
  };
@@ -8,7 +8,7 @@ export declare const BundlerInfoRspackPlugin: {
8
8
  new (options: BundleInfoOptions): {
9
9
  name: BuiltinPluginName;
10
10
  _args: [options: BundleInfoOptions];
11
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
11
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
12
12
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
13
13
  apply(compiler: import("../Compiler").Compiler): void;
14
14
  };
@@ -3,7 +3,7 @@ export declare const ChunkPrefetchPreloadPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };