@rspack/core 1.0.0-alpha.2 → 1.0.0-alpha.3

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 (134) hide show
  1. package/dist/ChunkGraph.d.ts +1 -1
  2. package/dist/Compilation.d.ts +9 -9
  3. package/dist/Compilation.js +25 -21
  4. package/dist/Compiler.d.ts +6 -6
  5. package/dist/Compiler.js +5 -6
  6. package/dist/ContextModuleFactory.d.ts +1 -1
  7. package/dist/FileSystem.d.ts +2 -2
  8. package/dist/Module.d.ts +4 -3
  9. package/dist/Module.js +1 -0
  10. package/dist/MultiCompiler.d.ts +3 -3
  11. package/dist/MultiStats.d.ts +2 -2
  12. package/dist/MultiWatching.d.ts +2 -2
  13. package/dist/NormalModule.d.ts +1 -1
  14. package/dist/NormalModuleFactory.d.ts +1 -1
  15. package/dist/Resolver.d.ts +19 -0
  16. package/dist/Resolver.js +39 -0
  17. package/dist/ResolverFactory.d.ts +9 -47
  18. package/dist/ResolverFactory.js +49 -120
  19. package/dist/RspackError.d.ts +1 -1
  20. package/dist/RuntimeGlobals.d.ts +1 -1
  21. package/dist/Stats.d.ts +2 -2
  22. package/dist/Watching.d.ts +3 -3
  23. package/dist/builtin-loader/swc/index.d.ts +0 -2
  24. package/dist/builtin-loader/swc/index.js +1 -3
  25. package/dist/builtin-loader/swc/pluginImport.d.ts +17 -1
  26. package/dist/builtin-loader/swc/react.d.ts +11 -1
  27. package/dist/builtin-plugin/APIPlugin.d.ts +3 -3
  28. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +3 -3
  29. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +3 -3
  30. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +3 -3
  31. package/dist/builtin-plugin/BannerPlugin.d.ts +25 -4
  32. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +4 -4
  33. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +3 -3
  34. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +3 -3
  35. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +4 -4
  36. package/dist/builtin-plugin/CssModulesPlugin.d.ts +3 -3
  37. package/dist/builtin-plugin/DataUriPlugin.d.ts +3 -3
  38. package/dist/builtin-plugin/DefinePlugin.d.ts +10 -4
  39. package/dist/builtin-plugin/DefinePlugin.js +42 -8
  40. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +3 -3
  41. package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +3 -3
  42. package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +5 -5
  43. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +3 -3
  44. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +3 -3
  45. package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +2 -2
  46. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +3 -3
  47. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +3 -3
  48. package/dist/builtin-plugin/EntryPlugin.d.ts +5 -5
  49. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +4 -4
  50. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +5 -5
  51. package/dist/builtin-plugin/ExternalsPlugin.d.ts +22 -6
  52. package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +3 -3
  53. package/dist/builtin-plugin/FileUriPlugin.d.ts +3 -3
  54. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +3 -3
  55. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +3 -3
  56. package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +2 -2
  57. package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +19 -4
  58. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +4 -4
  59. package/dist/builtin-plugin/IgnorePlugin.d.ts +4 -4
  60. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +3 -3
  61. package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +2 -2
  62. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +4 -4
  63. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +3 -3
  64. package/dist/builtin-plugin/LightningCssMiminizerRspackPlugin.d.ts +4 -4
  65. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +4 -4
  66. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +3 -3
  67. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +3 -3
  68. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +3 -3
  69. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +3 -3
  70. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +3 -3
  71. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +3 -3
  72. package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +3 -3
  73. package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +3 -3
  74. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +3 -3
  75. package/dist/builtin-plugin/ProgressPlugin.d.ts +4 -4
  76. package/dist/builtin-plugin/ProvidePlugin.d.ts +3 -3
  77. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +3 -3
  78. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +3 -3
  79. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +4 -4
  80. package/dist/builtin-plugin/RuntimePlugin.d.ts +3 -3
  81. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +3 -3
  82. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +9 -4
  83. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +4 -4
  84. package/dist/builtin-plugin/SplitChunksPlugin.d.ts +3 -3
  85. package/dist/builtin-plugin/SwcCssMinimizerPlugin.d.ts +3 -3
  86. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +4 -4
  87. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +3 -3
  88. package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +3 -3
  89. package/dist/builtin-plugin/WorkerPlugin.d.ts +3 -3
  90. package/dist/builtin-plugin/base.d.ts +6 -6
  91. package/dist/builtin-plugin/base.js +3 -3
  92. package/dist/builtin-plugin/css-extract/index.d.ts +1 -1
  93. package/dist/builtin-plugin/css-extract/loader.js +13 -3
  94. package/dist/builtin-plugin/css-extract/utils.d.ts +1 -1
  95. package/dist/builtin-plugin/index.d.ts +1 -7
  96. package/dist/builtin-plugin/index.js +3 -17
  97. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +11 -17
  98. package/dist/builtin-plugin/lazy-compilation/plugin.d.ts +2 -2
  99. package/dist/config/adapter.d.ts +5 -4
  100. package/dist/config/adapter.js +3 -2
  101. package/dist/config/adapterRuleUse.d.ts +7 -7
  102. package/dist/config/defaults.d.ts +1 -1
  103. package/dist/config/zod.d.ts +382 -382
  104. package/dist/config/zod.js +2 -3
  105. package/dist/container/ContainerPlugin.d.ts +3 -3
  106. package/dist/container/ContainerReferencePlugin.d.ts +4 -4
  107. package/dist/container/ModuleFederationPlugin.d.ts +2 -2
  108. package/dist/container/ModuleFederationPluginV1.d.ts +5 -5
  109. package/dist/container/ModuleFederationRuntimePlugin.d.ts +3 -3
  110. package/dist/container/default.runtime.js +1 -1
  111. package/dist/lib/EntryOptionPlugin.d.ts +2 -2
  112. package/dist/lib/NormalModuleReplacementPlugin.d.ts +2 -2
  113. package/dist/loader-runner/index.d.ts +2 -2
  114. package/dist/loader-runner/index.js +33 -46
  115. package/dist/loader-runner/loadLoader.js +1 -1
  116. package/dist/node/NodeTemplatePlugin.d.ts +1 -1
  117. package/dist/node/NodeWatchFileSystem.d.ts +1 -1
  118. package/dist/rspack.d.ts +3 -3
  119. package/dist/rspackOptionsApply.d.ts +1 -1
  120. package/dist/rspackOptionsApply.js +1 -19
  121. package/dist/sharing/ConsumeSharedPlugin.d.ts +2 -2
  122. package/dist/sharing/ProvideSharedPlugin.d.ts +2 -2
  123. package/dist/sharing/SharePlugin.d.ts +1 -1
  124. package/dist/sharing/ShareRuntimePlugin.d.ts +2 -2
  125. package/dist/stats/StatsFactory.d.ts +2 -2
  126. package/dist/stats/statsFactoryUtils.d.ts +1 -1
  127. package/dist/util/SplitChunkSize.d.ts +1 -1
  128. package/dist/util/bindingVersionCheck.js +1 -1
  129. package/dist/util/comparators.d.ts +1 -1
  130. package/dist/util/fs.d.ts +1 -1
  131. package/dist/util/index.d.ts +1 -1
  132. package/dist/util/index.js +4 -2
  133. package/dist/util/validate.d.ts +1 -1
  134. package/package.json +5 -35
package/dist/Stats.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Compilation } from "./Compilation";
2
- import { StatsOptions, StatsValue } from "./config";
1
+ import type { Compilation } from "./Compilation";
2
+ import type { StatsOptions, StatsValue } from "./config";
3
3
  import type { StatsCompilation } from "./stats/statsFactoryUtils";
4
4
  export type { StatsAsset, StatsChunk, StatsCompilation, StatsError, StatsModule, StatsWarnings } from "./stats/statsFactoryUtils";
5
5
  export declare class Stats {
@@ -1,8 +1,8 @@
1
- import { Callback } from "@rspack/lite-tapable";
1
+ import type { Callback } from "@rspack/lite-tapable";
2
2
  import type { Compiler } from ".";
3
3
  import { Stats } from ".";
4
- import { WatchOptions } from "./config";
5
- import { Watcher } from "./util/fs";
4
+ import type { WatchOptions } from "./config";
5
+ import type { Watcher } from "./util/fs";
6
6
  export declare class Watching {
7
7
  #private;
8
8
  watcher?: Watcher;
@@ -1,5 +1,3 @@
1
1
  export { resolvePluginImport } from "./pluginImport";
2
2
  export type { PluginImportOptions } from "./pluginImport";
3
- export type { ReactOptions } from "./react";
4
- export { resolveReact } from "./react";
5
3
  export type { SwcLoaderEnvConfig, SwcLoaderEsParserConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderOptions, SwcLoaderParserConfig, SwcLoaderTransformConfig, SwcLoaderTsParserConfig } from "./types";
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveReact = exports.resolvePluginImport = void 0;
3
+ exports.resolvePluginImport = void 0;
4
4
  var pluginImport_1 = require("./pluginImport");
5
5
  Object.defineProperty(exports, "resolvePluginImport", { enumerable: true, get: function () { return pluginImport_1.resolvePluginImport; } });
6
- var react_1 = require("./react");
7
- Object.defineProperty(exports, "resolveReact", { enumerable: true, get: function () { return react_1.resolveReact; } });
@@ -1,4 +1,20 @@
1
- import type { RawPluginImportConfig } from "@rspack/binding";
1
+ type RawStyleConfig = {
2
+ styleLibraryDirectory?: string;
3
+ custom?: string;
4
+ css?: string;
5
+ bool?: boolean;
6
+ };
7
+ type RawPluginImportConfig = {
8
+ libraryName: string;
9
+ libraryDirectory?: string;
10
+ customName?: string;
11
+ customStyleName?: string;
12
+ style?: RawStyleConfig;
13
+ camelToDashComponentName?: boolean;
14
+ transformToDefaultImport?: boolean;
15
+ ignoreEsComponent?: Array<string>;
16
+ ignoreStyleComponent?: Array<string>;
17
+ };
2
18
  type PluginImportConfig = {
3
19
  libraryName: string;
4
20
  libraryDirectory?: string;
@@ -1,4 +1,14 @@
1
- import type { RawReactOptions } from "@rspack/binding";
1
+ type RawReactOptions = {
2
+ runtime?: "automatic" | "classic";
3
+ importSource?: string;
4
+ pragma?: string;
5
+ pragmaFrag?: string;
6
+ throwIfNamespace?: boolean;
7
+ development?: boolean;
8
+ useBuiltins?: boolean;
9
+ useSpread?: boolean;
10
+ refresh?: boolean;
11
+ };
2
12
  declare function resolveReact(react: ReactOptions): RawReactOptions;
3
13
  type ReactOptions = RawReactOptions | undefined;
4
14
  export { resolveReact };
@@ -2,9 +2,9 @@ import { BuiltinPluginName } from "@rspack/binding";
2
2
  export declare const APIPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
- _options: void;
6
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "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
- raw(): import("@rspack/binding").BuiltinPlugin;
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;
7
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
10
10
  };
@@ -2,9 +2,9 @@ import { BuiltinPluginName } from "@rspack/binding";
2
2
  export declare const ArrayPushCallbackChunkFormatPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
- _options: void;
6
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "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
- raw(): import("@rspack/binding").BuiltinPlugin;
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;
7
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
10
10
  };
@@ -2,9 +2,9 @@ import { BuiltinPluginName } from "@rspack/binding";
2
2
  export declare const AssetModulesPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
- _options: void;
6
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "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
- raw(): import("@rspack/binding").BuiltinPlugin;
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;
7
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
10
10
  };
@@ -2,9 +2,9 @@ import { BuiltinPluginName } from "@rspack/binding";
2
2
  export declare const AsyncWebAssemblyModulesPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
- _options: void;
6
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "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
- raw(): import("@rspack/binding").BuiltinPlugin;
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;
7
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
10
10
  };
@@ -1,4 +1,4 @@
1
- import { BuiltinPluginName, JsChunk, RawBannerPluginOptions } from "@rspack/binding";
1
+ import { BuiltinPluginName, type JsChunk } from "@rspack/binding";
2
2
  import { z } from "../../compiled/zod";
3
3
  declare const rule: z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>;
4
4
  export type Rule = z.infer<typeof rule>;
@@ -182,9 +182,30 @@ export declare const BannerPlugin: {
182
182
  test?: string | RegExp | (string | RegExp)[] | undefined;
183
183
  }): {
184
184
  name: BuiltinPluginName;
185
- _options: RawBannerPluginOptions;
186
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
187
- raw(): import("@rspack/binding").BuiltinPlugin;
185
+ _args: [args: string | ((args_0: {
186
+ hash: string;
187
+ chunk: JsChunk;
188
+ filename: string;
189
+ }, ...args_1: unknown[]) => string) | {
190
+ banner: (string | ((args_0: {
191
+ hash: string;
192
+ chunk: JsChunk;
193
+ filename: string;
194
+ }, ...args_1: unknown[]) => string)) & (string | ((args_0: {
195
+ hash: string;
196
+ chunk: JsChunk;
197
+ filename: string;
198
+ }, ...args_1: unknown[]) => string) | undefined);
199
+ entryOnly?: boolean | undefined;
200
+ exclude?: string | RegExp | (string | RegExp)[] | undefined;
201
+ include?: string | RegExp | (string | RegExp)[] | undefined;
202
+ raw?: boolean | undefined;
203
+ footer?: boolean | undefined;
204
+ stage?: number | undefined;
205
+ test?: string | RegExp | (string | RegExp)[] | undefined;
206
+ }];
207
+ 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;
208
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
188
209
  apply(compiler: import("../Compiler").Compiler): void;
189
210
  };
190
211
  };
@@ -1,4 +1,4 @@
1
- import { BuiltinPluginName, RawBundlerInfoPluginOptions } from "@rspack/binding";
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
2
  export type BundleInfoOptions = {
3
3
  version?: string;
4
4
  bundler?: string;
@@ -7,9 +7,9 @@ export type BundleInfoOptions = {
7
7
  export declare const BundlerInfoRspackPlugin: {
8
8
  new (options: BundleInfoOptions): {
9
9
  name: BuiltinPluginName;
10
- _options: RawBundlerInfoPluginOptions;
11
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "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
- raw(): import("@rspack/binding").BuiltinPlugin;
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;
12
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
13
13
  apply(compiler: import("../Compiler").Compiler): void;
14
14
  };
15
15
  };
@@ -2,9 +2,9 @@ import { BuiltinPluginName } from "@rspack/binding";
2
2
  export declare const ChunkPrefetchPreloadPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
- _options: void;
6
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "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
- raw(): import("@rspack/binding").BuiltinPlugin;
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;
7
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
10
10
  };
@@ -2,9 +2,9 @@ import { BuiltinPluginName } from "@rspack/binding";
2
2
  export declare const CommonJsChunkFormatPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
- _options: void;
6
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "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
- raw(): import("@rspack/binding").BuiltinPlugin;
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;
7
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
10
10
  };
@@ -1,4 +1,4 @@
1
- import { BuiltinPluginName, RawCopyPattern, RawCopyRspackPluginOptions } from "@rspack/binding";
1
+ import { BuiltinPluginName, type RawCopyPattern } from "@rspack/binding";
2
2
  export type CopyRspackPluginOptions = {
3
3
  patterns: (string | ({
4
4
  from: string;
@@ -7,9 +7,9 @@ export type CopyRspackPluginOptions = {
7
7
  export declare const CopyRspackPlugin: {
8
8
  new (copy: CopyRspackPluginOptions): {
9
9
  name: BuiltinPluginName;
10
- _options: RawCopyRspackPluginOptions;
11
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "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
- raw(): import("@rspack/binding").BuiltinPlugin;
10
+ _args: [copy: CopyRspackPluginOptions];
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;
12
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
13
13
  apply(compiler: import("../Compiler").Compiler): void;
14
14
  };
15
15
  };
@@ -2,9 +2,9 @@ import { BuiltinPluginName } from "@rspack/binding";
2
2
  export declare const CssModulesPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
- _options: void;
6
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "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
- raw(): import("@rspack/binding").BuiltinPlugin;
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;
7
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
10
10
  };
@@ -2,9 +2,9 @@ import { BuiltinPluginName } from "@rspack/binding";
2
2
  export declare const DataUriPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
- _options: void;
6
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "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
- raw(): import("@rspack/binding").BuiltinPlugin;
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;
7
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
10
10
  };
@@ -1,11 +1,17 @@
1
1
  import { BuiltinPluginName } from "@rspack/binding";
2
- export type DefinePluginOptions = Record<string, string | boolean | undefined>;
2
+ export type DefinePluginOptions = Record<string, CodeValue>;
3
3
  export declare const DefinePlugin: {
4
4
  new (define: DefinePluginOptions): {
5
5
  name: BuiltinPluginName;
6
- _options: Record<string, string>;
7
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
8
- raw(): import("@rspack/binding").BuiltinPlugin;
6
+ _args: [define: DefinePluginOptions];
7
+ 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;
8
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("../Compiler").Compiler): void;
10
10
  };
11
11
  };
12
+ type CodeValue = RecursiveArrayOrRecord<CodeValuePrimitive>;
13
+ type CodeValuePrimitive = null | undefined | RegExp | Function | string | number | boolean | bigint | undefined;
14
+ type RecursiveArrayOrRecord<T> = {
15
+ [index: string]: RecursiveArrayOrRecord<T>;
16
+ } | Array<RecursiveArrayOrRecord<T>> | T;
17
+ export {};
@@ -3,12 +3,46 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DefinePlugin = void 0;
4
4
  const binding_1 = require("@rspack/binding");
5
5
  const base_1 = require("./base");
6
- exports.DefinePlugin = (0, base_1.create)(binding_1.BuiltinPluginName.DefinePlugin, (define) => {
7
- const entries = Object.entries(define).map(([key, value]) => {
8
- if (typeof value !== "string") {
9
- value = value === undefined ? "undefined" : JSON.stringify(value);
10
- }
11
- return [key, value];
12
- });
13
- return Object.fromEntries(entries);
6
+ exports.DefinePlugin = (0, base_1.create)(binding_1.BuiltinPluginName.DefinePlugin, function (define) {
7
+ let supportsBigIntLiteral = this.options.output.environment?.bigIntLiteral ?? false;
8
+ return normalizeValue(define, supportsBigIntLiteral);
14
9
  }, "compilation");
10
+ const normalizeValue = (define, supportsBigIntLiteral) => {
11
+ const normalizePrimitive = (p) => {
12
+ if (p === undefined) {
13
+ return "undefined";
14
+ }
15
+ else if (Object.is(p, -0)) {
16
+ return "-0";
17
+ }
18
+ else if (p instanceof RegExp) {
19
+ return p.toString();
20
+ }
21
+ else if (typeof p === "function") {
22
+ return "(" + p.toString() + ")";
23
+ }
24
+ else if (typeof p === "bigint") {
25
+ return supportsBigIntLiteral ? `${p}n` : `BigInt("${p}")`;
26
+ }
27
+ else {
28
+ // assume `p` is a valid JSON value
29
+ return p;
30
+ }
31
+ };
32
+ const normalizeObject = (define) => {
33
+ if (Array.isArray(define)) {
34
+ return define.map(normalizeObject);
35
+ }
36
+ else if (define instanceof RegExp) {
37
+ return normalizePrimitive(define);
38
+ }
39
+ else if (define && typeof define === "object") {
40
+ let keys = Object.keys(define);
41
+ return Object.fromEntries(keys.map(k => [k, normalizeObject(define[k])]));
42
+ }
43
+ else {
44
+ return normalizePrimitive(define);
45
+ }
46
+ };
47
+ return normalizeObject(define);
48
+ };
@@ -2,9 +2,9 @@ import { BuiltinPluginName } from "@rspack/binding";
2
2
  export declare const DeterministicChunkIdsPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
- _options: void;
6
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "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
- raw(): import("@rspack/binding").BuiltinPlugin;
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;
7
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
10
10
  };
@@ -2,9 +2,9 @@ import { BuiltinPluginName } from "@rspack/binding";
2
2
  export declare const DeterministicModuleIdsPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
- _options: void;
6
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "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
- raw(): import("@rspack/binding").BuiltinPlugin;
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;
7
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
10
10
  };
@@ -1,11 +1,11 @@
1
- import { BuiltinPluginName, RawDynamicEntryPluginOptions } from "@rspack/binding";
2
- import { EntryDynamicNormalized } from "../config";
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ import type { EntryDynamicNormalized } from "../config";
3
3
  export declare const DynamicEntryPlugin: {
4
4
  new (context: string, entry: EntryDynamicNormalized): {
5
5
  name: BuiltinPluginName;
6
- _options: RawDynamicEntryPluginOptions;
7
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
8
- raw(): import("@rspack/binding").BuiltinPlugin;
6
+ _args: [context: string, entry: EntryDynamicNormalized];
7
+ 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;
8
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("../Compiler").Compiler): void;
10
10
  };
11
11
  };
@@ -2,9 +2,9 @@ import { BuiltinPluginName } from "@rspack/binding";
2
2
  export declare const ElectronTargetPlugin: {
3
3
  new (context?: string | undefined): {
4
4
  name: BuiltinPluginName;
5
- _options: string;
6
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "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
- raw(): import("@rspack/binding").BuiltinPlugin;
5
+ _args: [context?: string | undefined];
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;
7
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
10
10
  };
@@ -2,9 +2,9 @@ import { BuiltinPluginName } from "@rspack/binding";
2
2
  export declare const EnableChunkLoadingPlugin: {
3
3
  new (type: any): {
4
4
  name: BuiltinPluginName;
5
- _options: any;
6
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "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
- raw(): import("@rspack/binding").BuiltinPlugin;
5
+ _args: [type: any];
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;
7
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
10
10
  };
@@ -1,5 +1,5 @@
1
- import { BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
2
- import { Compiler, LibraryType } from "..";
1
+ import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
2
+ import type { Compiler, LibraryType } from "..";
3
3
  import { RspackBuiltinPlugin } from "./base";
4
4
  export declare class EnableLibraryPlugin extends RspackBuiltinPlugin {
5
5
  private type;
@@ -2,9 +2,9 @@ import { BuiltinPluginName } from "@rspack/binding";
2
2
  export declare const EnableWasmLoadingPlugin: {
3
3
  new (type: any): {
4
4
  name: BuiltinPluginName;
5
- _options: any;
6
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "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
- raw(): import("@rspack/binding").BuiltinPlugin;
5
+ _args: [type: any];
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;
7
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
10
10
  };
@@ -2,9 +2,9 @@ import { BuiltinPluginName } from "@rspack/binding";
2
2
  export declare const EnsureChunkConditionsPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
- _options: void;
6
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "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
- raw(): import("@rspack/binding").BuiltinPlugin;
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;
7
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
10
10
  };
@@ -1,5 +1,5 @@
1
- import { BuiltinPluginName, RawEntryOptions, RawEntryPluginOptions } from "@rspack/binding";
2
- import { ChunkLoading, EntryRuntime, FilenameTemplate, LibraryOptions, PublicPath } from "../config";
1
+ import { BuiltinPluginName, type RawEntryOptions } from "@rspack/binding";
2
+ import { type ChunkLoading, type EntryRuntime, type FilenameTemplate, type LibraryOptions, type PublicPath } from "../config";
3
3
  export type EntryOptions = {
4
4
  name?: string;
5
5
  runtime?: EntryRuntime;
@@ -14,9 +14,9 @@ export type EntryOptions = {
14
14
  export declare const EntryPlugin: {
15
15
  new (context: string, entry: string, options?: string | EntryOptions | undefined): {
16
16
  name: BuiltinPluginName;
17
- _options: RawEntryPluginOptions;
18
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
19
- raw(): import("@rspack/binding").BuiltinPlugin;
17
+ _args: [context: string, entry: string, options?: string | EntryOptions | undefined];
18
+ 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;
19
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
20
20
  apply(compiler: import("../Compiler").Compiler): void;
21
21
  };
22
22
  };
@@ -1,11 +1,11 @@
1
- import { BuiltinPluginName, RawEvalDevToolModulePluginOptions } from "@rspack/binding";
1
+ import { BuiltinPluginName, type RawEvalDevToolModulePluginOptions } from "@rspack/binding";
2
2
  export type { RawEvalDevToolModulePluginOptions as EvalDevToolModulePluginOptions };
3
3
  export declare const EvalDevToolModulePlugin: {
4
4
  new (options: RawEvalDevToolModulePluginOptions): {
5
5
  name: BuiltinPluginName;
6
- _options: RawEvalDevToolModulePluginOptions;
7
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
8
- raw(): import("@rspack/binding").BuiltinPlugin;
6
+ _args: [options: RawEvalDevToolModulePluginOptions];
7
+ 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;
8
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("../Compiler").Compiler): void;
10
10
  };
11
11
  };
@@ -1,11 +1,11 @@
1
- import { BuiltinPluginName, RawSourceMapDevToolPluginOptions } from "@rspack/binding";
2
- import { SourceMapDevToolPluginOptions } from "./SourceMapDevToolPlugin";
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ import type { SourceMapDevToolPluginOptions } from "./SourceMapDevToolPlugin";
3
3
  export declare const EvalSourceMapDevToolPlugin: {
4
4
  new (options: SourceMapDevToolPluginOptions): {
5
5
  name: BuiltinPluginName;
6
- _options: RawSourceMapDevToolPluginOptions;
7
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
8
- raw(): import("@rspack/binding").BuiltinPlugin;
6
+ _args: [options: SourceMapDevToolPluginOptions];
7
+ 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;
8
+ raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("../Compiler").Compiler): void;
10
10
  };
11
11
  };