@rspack-debug/core 1.4.0 → 1.4.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 (91) hide show
  1. package/README.md +1 -1
  2. package/compiled/tinypool/README.md +1 -1
  3. package/compiled/tinypool/dist/entry/worker.js +1 -0
  4. package/compiled/tinypool/dist/index.js +6 -2
  5. package/compiled/tinypool/package.json +1 -1
  6. package/dist/Chunk.d.ts +14 -34
  7. package/dist/ChunkGraph.d.ts +6 -21
  8. package/dist/Chunks.d.ts +0 -1
  9. package/dist/Compilation.d.ts +9 -8
  10. package/dist/Entrypoint.d.ts +2 -10
  11. package/dist/ErrorHelpers.d.ts +2 -0
  12. package/dist/RspackError.d.ts +1 -1
  13. package/dist/builtin-plugin/APIPlugin.d.ts +1 -2
  14. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -2
  15. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -2
  16. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -2
  17. package/dist/builtin-plugin/BannerPlugin.d.ts +3 -3
  18. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -2
  19. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -2
  20. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -2
  21. package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +1 -2
  22. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +2 -2
  23. package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
  24. package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -2
  25. package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -2
  26. package/dist/builtin-plugin/DefinePlugin.d.ts +1 -2
  27. package/dist/builtin-plugin/DllEntryPlugin.d.ts +1 -2
  28. package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +2 -2
  29. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -2
  30. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -2
  31. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -2
  32. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -2
  33. package/dist/builtin-plugin/EntryPlugin.d.ts +2 -2
  34. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +2 -2
  35. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +2 -2
  36. package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -2
  37. package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -2
  38. package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +1 -2
  39. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -2
  40. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -2
  41. package/dist/builtin-plugin/IgnorePlugin.d.ts +2 -2
  42. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -2
  43. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -2
  44. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -2
  45. package/dist/builtin-plugin/LibManifestPlugin.d.ts +1 -2
  46. package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +1 -2
  47. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -2
  48. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -2
  49. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -2
  50. package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +1 -2
  51. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -2
  52. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -2
  53. package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +1 -2
  54. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -2
  55. package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +2 -2
  56. package/dist/builtin-plugin/ProgressPlugin.d.ts +2 -2
  57. package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -2
  58. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -2
  59. package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +1 -2
  60. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -2
  61. package/dist/builtin-plugin/RsdoctorPlugin.d.ts +2 -2
  62. package/dist/builtin-plugin/RslibPlugin.d.ts +2 -2
  63. package/dist/builtin-plugin/RstestPlugin.d.ts +2 -2
  64. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +2 -2
  65. package/dist/builtin-plugin/RuntimePlugin.d.ts +2 -2
  66. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -2
  67. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -2
  68. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +2 -2
  69. package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +2 -2
  70. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -2
  71. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -2
  72. package/dist/builtin-plugin/base.d.ts +29 -5
  73. package/dist/builtin-plugin/html-plugin/plugin.d.ts +2 -2
  74. package/dist/builtin-plugin/index.d.ts +1 -1
  75. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -2
  76. package/dist/config/normalization.d.ts +5 -3
  77. package/dist/config/types.d.ts +24 -5
  78. package/dist/config/zod.d.ts +7 -6
  79. package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -2
  80. package/dist/exports.d.ts +3 -1
  81. package/dist/index.js +242 -377
  82. package/dist/lib/WebpackError.d.ts +2 -4
  83. package/dist/loader-runner/ModuleError.d.ts +7 -0
  84. package/dist/loader-runner/ModuleWarning.d.ts +7 -0
  85. package/dist/stats/StatsFactory.d.ts +2 -2
  86. package/dist/stats/statsFactoryUtils.d.ts +2 -2
  87. package/dist/trace/index.d.ts +7 -1
  88. package/dist/util/index.d.ts +0 -2
  89. package/dist/worker.js +11 -7
  90. package/package.json +5 -3
  91. package/dist/ChunkGroup.d.ts +0 -33
@@ -1,4 +1,4 @@
1
- import { BuiltinPluginName, type RawIgnorePluginOptions } from "@rspack/binding";
1
+ import { type RawIgnorePluginOptions } from "@rspack/binding";
2
2
  export type IgnorePluginOptions = {
3
3
  /** A RegExp to test the resource against. */
4
4
  resourceRegExp: NonNullable<RawIgnorePluginOptions["resourceRegExp"]>;
@@ -10,7 +10,7 @@ export type IgnorePluginOptions = {
10
10
  };
11
11
  export declare const IgnorePlugin: {
12
12
  new (options: IgnorePluginOptions): {
13
- name: BuiltinPluginName;
13
+ name: string;
14
14
  _args: [options: IgnorePluginOptions];
15
15
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
16
16
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,7 +1,6 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export declare const InferAsyncModulesPlugin: {
3
2
  new (): {
4
- name: BuiltinPluginName;
3
+ name: string;
5
4
  _args: [];
6
5
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
6
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,8 +1,7 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  import type { Compiler } from "../Compiler";
3
2
  export declare const JsLoaderRspackPlugin: {
4
3
  new (compiler: Compiler): {
5
- name: BuiltinPluginName;
4
+ name: string;
6
5
  _args: [compiler: Compiler];
7
6
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
8
7
  raw(compiler: Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,7 +1,6 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export declare const JsonModulesPlugin: {
3
2
  new (): {
4
- name: BuiltinPluginName;
3
+ name: string;
5
4
  _args: [];
6
5
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
6
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,4 +1,3 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export type LibManifestPluginOptions = {
3
2
  context?: string;
4
3
  entryOnly?: boolean;
@@ -9,7 +8,7 @@ export type LibManifestPluginOptions = {
9
8
  };
10
9
  export declare const LibManifestPlugin: {
11
10
  new (options: LibManifestPluginOptions): {
12
- name: BuiltinPluginName;
11
+ name: string;
13
12
  _args: [options: LibManifestPluginOptions];
14
13
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
15
14
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,4 +1,3 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  import { type Drafts, type FeatureOptions, type NonStandard, type PseudoClasses } from "../builtin-loader/lightningcss";
3
2
  import type { AssetConditions } from "../util/assetCondition";
4
3
  export type LightningCssMinimizerRspackPluginOptions = {
@@ -24,7 +23,7 @@ export type LightningCssMinimizerRspackPluginOptions = {
24
23
  };
25
24
  export declare const LightningCssMinimizerRspackPlugin: {
26
25
  new (options?: LightningCssMinimizerRspackPluginOptions | undefined): {
27
- name: BuiltinPluginName;
26
+ name: string;
28
27
  _args: [options?: LightningCssMinimizerRspackPluginOptions | undefined];
29
28
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
30
29
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,4 +1,3 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export type LimitChunkCountOptions = {
3
2
  chunkOverhead?: number;
4
3
  entryChunkMultiplicator?: number;
@@ -6,7 +5,7 @@ export type LimitChunkCountOptions = {
6
5
  };
7
6
  export declare const LimitChunkCountPlugin: {
8
7
  new (options: LimitChunkCountOptions): {
9
- name: BuiltinPluginName;
8
+ name: string;
10
9
  _args: [options: LimitChunkCountOptions];
11
10
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
12
11
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,7 +1,6 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export declare const MergeDuplicateChunksPlugin: {
3
2
  new (): {
4
- name: BuiltinPluginName;
3
+ name: string;
5
4
  _args: [];
6
5
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
6
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,7 +1,6 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export declare const ModuleChunkFormatPlugin: {
3
2
  new (): {
4
- name: BuiltinPluginName;
3
+ name: string;
5
4
  _args: [];
6
5
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
6
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,7 +1,6 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export declare const ModuleInfoHeaderPlugin: {
3
2
  new (verbose: any): {
4
- name: BuiltinPluginName;
3
+ name: string;
5
4
  _args: [verbose: any];
6
5
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
6
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,7 +1,6 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export declare const NamedChunkIdsPlugin: {
3
2
  new (): {
4
- name: BuiltinPluginName;
3
+ name: string;
5
4
  _args: [];
6
5
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
6
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,7 +1,6 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export declare const NamedModuleIdsPlugin: {
3
2
  new (): {
4
- name: BuiltinPluginName;
3
+ name: string;
5
4
  _args: [];
6
5
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
6
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,7 +1,6 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export declare const NoEmitOnErrorsPlugin: {
3
2
  new (): {
4
- name: BuiltinPluginName;
3
+ name: string;
5
4
  _args: [];
6
5
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
6
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,7 +1,6 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export declare const NodeTargetPlugin: {
3
2
  new (): {
4
- name: BuiltinPluginName;
3
+ name: string;
5
4
  _args: [];
6
5
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
6
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,7 +1,7 @@
1
- import { BuiltinPluginName, type RawOccurrenceChunkIdsPluginOptions } from "@rspack/binding";
1
+ import { type RawOccurrenceChunkIdsPluginOptions } from "@rspack/binding";
2
2
  export declare const OccurrenceChunkIdsPlugin: {
3
3
  new (options?: RawOccurrenceChunkIdsPluginOptions | undefined): {
4
- name: BuiltinPluginName;
4
+ name: string;
5
5
  _args: [options?: RawOccurrenceChunkIdsPluginOptions | undefined];
6
6
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
7
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,8 +1,8 @@
1
- import { BuiltinPluginName, type RawProgressPluginOptions } from "@rspack/binding";
1
+ import { type RawProgressPluginOptions } from "@rspack/binding";
2
2
  export type ProgressPluginArgument = Partial<Omit<RawProgressPluginOptions, "handler">> | ((percentage: number, msg: string, ...args: string[]) => void) | undefined;
3
3
  export declare const ProgressPlugin: {
4
4
  new (progress?: ProgressPluginArgument): {
5
- name: BuiltinPluginName;
5
+ name: string;
6
6
  _args: [progress?: ProgressPluginArgument];
7
7
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
8
8
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,8 +1,7 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export type ProvidePluginOptions = Record<string, string | string[]>;
3
2
  export declare const ProvidePlugin: {
4
3
  new (provide: ProvidePluginOptions): {
5
- name: BuiltinPluginName;
4
+ name: string;
6
5
  _args: [provide: ProvidePluginOptions];
7
6
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
8
7
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,7 +1,6 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export declare const RealContentHashPlugin: {
3
2
  new (): {
4
- name: BuiltinPluginName;
3
+ name: string;
5
4
  _args: [];
6
5
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
6
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,7 +1,6 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export declare const RemoveDuplicateModulesPlugin: {
3
2
  new (): {
4
- name: BuiltinPluginName;
3
+ name: string;
5
4
  _args: [];
6
5
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
6
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,7 +1,6 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export declare const RemoveEmptyChunksPlugin: {
3
2
  new (): {
4
- name: BuiltinPluginName;
3
+ name: string;
5
4
  _args: [];
6
5
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
6
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,4 +1,4 @@
1
- import { BuiltinPluginName, type JsRsdoctorAsset, type JsRsdoctorAssetPatch, type JsRsdoctorChunk, type JsRsdoctorChunkAssets, type JsRsdoctorChunkGraph, type JsRsdoctorChunkModules, type JsRsdoctorDependency, type JsRsdoctorEntrypoint, type JsRsdoctorEntrypointAssets, type JsRsdoctorExportInfo, type JsRsdoctorModule, type JsRsdoctorModuleGraph, type JsRsdoctorModuleGraphModule, type JsRsdoctorModuleIdsPatch, type JsRsdoctorModuleOriginalSource, type JsRsdoctorModuleSourcesPatch, type JsRsdoctorSideEffect, type JsRsdoctorSourcePosition, type JsRsdoctorSourceRange, type JsRsdoctorStatement, type JsRsdoctorVariable } from "@rspack/binding";
1
+ import { type JsRsdoctorAsset, type JsRsdoctorAssetPatch, type JsRsdoctorChunk, type JsRsdoctorChunkAssets, type JsRsdoctorChunkGraph, type JsRsdoctorChunkModules, type JsRsdoctorDependency, type JsRsdoctorEntrypoint, type JsRsdoctorEntrypointAssets, type JsRsdoctorExportInfo, type JsRsdoctorModule, type JsRsdoctorModuleGraph, type JsRsdoctorModuleGraphModule, type JsRsdoctorModuleIdsPatch, type JsRsdoctorModuleOriginalSource, type JsRsdoctorModuleSourcesPatch, type JsRsdoctorSideEffect, type JsRsdoctorSourcePosition, type JsRsdoctorSourceRange, type JsRsdoctorStatement, type JsRsdoctorVariable } from "@rspack/binding";
2
2
  import * as liteTapable from "@rspack/lite-tapable";
3
3
  import { type Compilation } from "../Compilation";
4
4
  import type { Compiler } from "../Compiler";
@@ -12,7 +12,7 @@ export type RsdoctorPluginOptions = {
12
12
  };
13
13
  declare const RsdoctorPluginImpl: {
14
14
  new (c?: RsdoctorPluginOptions | undefined): {
15
- name: BuiltinPluginName;
15
+ name: string;
16
16
  _args: [c?: RsdoctorPluginOptions | undefined];
17
17
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
18
18
  raw(compiler: Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,8 +1,8 @@
1
- import { BuiltinPluginName, type RawRslibPluginOptions } from "@rspack/binding";
1
+ import { type RawRslibPluginOptions } from "@rspack/binding";
2
2
  export type RslibPluginArgument = Partial<Omit<RawRslibPluginOptions, "handler">> | ((percentage: number, msg: string, ...args: string[]) => void) | undefined;
3
3
  export declare const RslibPlugin: {
4
4
  new (rslib: RawRslibPluginOptions): {
5
- name: BuiltinPluginName;
5
+ name: string;
6
6
  _args: [rslib: RawRslibPluginOptions];
7
7
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
8
8
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,8 +1,8 @@
1
- import { BuiltinPluginName, type RawRstestPluginOptions } from "@rspack/binding";
1
+ import { type RawRstestPluginOptions } from "@rspack/binding";
2
2
  export type RstestPluginArgument = Partial<Omit<RawRstestPluginOptions, "handler">> | ((percentage: number, msg: string, ...args: string[]) => void) | undefined;
3
3
  export declare const RstestPlugin: {
4
4
  new (rstest: RawRstestPluginOptions): {
5
- name: BuiltinPluginName;
5
+ name: string;
6
6
  _args: [rstest: RawRstestPluginOptions];
7
7
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
8
8
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,8 +1,8 @@
1
- import { BuiltinPluginName, type RawRuntimeChunkOptions } from "@rspack/binding";
1
+ import { type RawRuntimeChunkOptions } from "@rspack/binding";
2
2
  export type RuntimeChunkPluginOptions = RawRuntimeChunkOptions;
3
3
  export declare const RuntimeChunkPlugin: {
4
4
  new (options: RawRuntimeChunkOptions): {
5
- name: BuiltinPluginName;
5
+ name: string;
6
6
  _args: [options: RawRuntimeChunkOptions];
7
7
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
8
8
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,11 +1,11 @@
1
1
  import * as binding from "@rspack/binding";
2
2
  import * as liteTapable from "@rspack/lite-tapable";
3
- import { Chunk } from "../Chunk";
3
+ import type { Chunk } from "../Chunk";
4
4
  import { type Compilation } from "../Compilation";
5
5
  import type { CreatePartialRegisters } from "../taps/types";
6
6
  export declare const RuntimePluginImpl: {
7
7
  new (): {
8
- name: binding.BuiltinPluginName;
8
+ name: string;
9
9
  _args: [];
10
10
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
11
11
  raw(compiler: import("..").Compiler): binding.BuiltinPlugin;
@@ -1,7 +1,6 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export declare const SideEffectsFlagPlugin: {
3
2
  new (): {
4
- name: BuiltinPluginName;
3
+ name: string;
5
4
  _args: [];
6
5
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
6
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,4 +1,3 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export declare const SizeLimitsPlugin: {
3
2
  new (options: {
4
3
  assetFilter?: (assetFilename: string) => boolean;
@@ -6,7 +5,7 @@ export declare const SizeLimitsPlugin: {
6
5
  maxAssetSize?: number;
7
6
  maxEntrypointSize?: number;
8
7
  }): {
9
- name: BuiltinPluginName;
8
+ name: string;
10
9
  _args: [options: {
11
10
  assetFilter?: (assetFilename: string) => boolean;
12
11
  hints?: false | "warning" | "error";
@@ -1,8 +1,8 @@
1
- import { BuiltinPluginName, type SourceMapDevToolPluginOptions } from "@rspack/binding";
1
+ import { type SourceMapDevToolPluginOptions } from "@rspack/binding";
2
2
  export type { SourceMapDevToolPluginOptions };
3
3
  export declare const SourceMapDevToolPlugin: {
4
4
  new (options: SourceMapDevToolPluginOptions): {
5
- name: BuiltinPluginName;
5
+ name: string;
6
6
  _args: [options: SourceMapDevToolPluginOptions];
7
7
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
8
8
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,4 +1,4 @@
1
- import { BuiltinPluginName, type RawSubresourceIntegrityPluginOptions } from "@rspack/binding";
1
+ import { type RawSubresourceIntegrityPluginOptions } from "@rspack/binding";
2
2
  import type { Compiler } from "../Compiler";
3
3
  export type SubresourceIntegrityHashFunction = "sha256" | "sha384" | "sha512";
4
4
  export type SubresourceIntegrityPluginOptions = {
@@ -18,7 +18,7 @@ export type NativeSubresourceIntegrityPluginOptions = Omit<RawSubresourceIntegri
18
18
  */
19
19
  declare const NativeSubresourceIntegrityPlugin: {
20
20
  new (options: NativeSubresourceIntegrityPluginOptions): {
21
- name: BuiltinPluginName;
21
+ name: string;
22
22
  _args: [options: NativeSubresourceIntegrityPluginOptions];
23
23
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
24
24
  raw(compiler: Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,4 +1,3 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  import type { AssetConditions } from "../util/assetCondition";
3
2
  type ExtractCommentsCondition = boolean | RegExp;
4
3
  type ExtractCommentsBanner = string | boolean;
@@ -204,7 +203,7 @@ export interface TerserMangleOptions {
204
203
  export type TerserManglePropertiesOptions = {};
205
204
  export declare const SwcJsMinimizerRspackPlugin: {
206
205
  new (options?: SwcJsMinimizerRspackPluginOptions | undefined): {
207
- name: BuiltinPluginName;
206
+ name: string;
208
207
  _args: [options?: SwcJsMinimizerRspackPluginOptions | undefined];
209
208
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
210
209
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,7 +1,6 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  export declare const WarnCaseSensitiveModulesPlugin: {
3
2
  new (): {
4
- name: BuiltinPluginName;
3
+ name: string;
5
4
  _args: [];
6
5
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
6
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,17 +1,41 @@
1
- import type * as binding from "@rspack/binding";
1
+ import * as binding from "@rspack/binding";
2
2
  import type { Compiler, RspackPluginInstance } from "..";
3
3
  type AffectedHooks = keyof Compiler["hooks"];
4
4
  export declare function canInherentFromParent(affectedHooks?: AffectedHooks): boolean;
5
5
  export declare abstract class RspackBuiltinPlugin implements RspackPluginInstance {
6
6
  abstract raw(compiler: Compiler): binding.BuiltinPlugin | undefined;
7
- abstract name: binding.BuiltinPluginName;
7
+ abstract name: binding.BuiltinPluginName | CustomPluginName;
8
8
  affectedHooks?: AffectedHooks;
9
9
  apply(compiler: Compiler): void;
10
10
  }
11
- export declare function createBuiltinPlugin<R>(name: binding.BuiltinPluginName, options: R): binding.BuiltinPlugin;
12
- export declare function create<T extends any[], R>(name: binding.BuiltinPluginName, resolve: (this: Compiler, ...args: T) => R, affectedHooks?: AffectedHooks): {
11
+ export declare function createBuiltinPlugin<R>(name: binding.BuiltinPluginName | CustomPluginName, options: R): binding.BuiltinPlugin;
12
+ type CustomPluginName = string;
13
+ export declare function create<T extends any[], R>(name: binding.BuiltinPluginName | CustomPluginName, resolve: (this: Compiler, ...args: T) => R, affectedHooks?: AffectedHooks): {
13
14
  new (...args: T): {
14
- name: binding.BuiltinPluginName;
15
+ name: string;
16
+ _args: T;
17
+ affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
18
+ raw(compiler: Compiler): binding.BuiltinPlugin;
19
+ apply(compiler: Compiler): void;
20
+ };
21
+ };
22
+ /**
23
+ * Create a wrapper class for builtin plugin.
24
+ *
25
+ * @example
26
+ * ```js
27
+ * const MyPlugin = createNativePlugin("MyPlugin", (options) => {
28
+ * return options;
29
+ * });
30
+ *
31
+ * new MyPlugin({
32
+ * foo: "bar"
33
+ * }).apply(compiler);
34
+ * ```
35
+ */
36
+ export declare function createNativePlugin<T extends any[], R>(name: CustomPluginName, resolve: (this: Compiler, ...args: T) => R, affectedHooks?: AffectedHooks): {
37
+ new (...args: T): {
38
+ name: string;
15
39
  _args: T;
16
40
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
17
41
  raw(compiler: Compiler): binding.BuiltinPlugin;
@@ -1,11 +1,11 @@
1
- import { BuiltinPluginName, type JsHtmlPluginTag } from "@rspack/binding";
1
+ import { type JsHtmlPluginTag } from "@rspack/binding";
2
2
  import type { Compilation } from "../../Compilation";
3
3
  import type { Compiler } from "../../Compiler";
4
4
  import { type HtmlRspackPluginHooks } from "./hooks";
5
5
  import { type HtmlRspackPluginOptions } from "./options";
6
6
  declare const HtmlRspackPluginImpl: {
7
7
  new (c?: HtmlRspackPluginOptions | undefined): {
8
- name: BuiltinPluginName;
8
+ name: string;
9
9
  _args: [c?: HtmlRspackPluginOptions | undefined];
10
10
  affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
11
11
  raw(compiler: Compiler): import("@rspack/binding").BuiltinPlugin;
@@ -1,4 +1,4 @@
1
- export { RspackBuiltinPlugin } from "./base";
1
+ export { RspackBuiltinPlugin, createNativePlugin } from "./base";
2
2
  export * from "./APIPlugin";
3
3
  export * from "./ArrayPushCallbackChunkFormatPlugin";
4
4
  export * from "./AssetModulesPlugin";
@@ -1,4 +1,3 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
1
  import type { Module } from "../../Module";
3
2
  export declare const BuiltinLazyCompilationPlugin: {
4
3
  new (module: (args: {
@@ -9,7 +8,7 @@ export declare const BuiltinLazyCompilationPlugin: {
9
8
  data: string;
10
9
  client: string;
11
10
  }, cacheable: boolean, entries: boolean, imports: boolean, test?: RegExp | ((module: Module) => boolean) | undefined): {
12
- name: BuiltinPluginName;
11
+ name: string;
13
12
  _args: [module: (args: {
14
13
  module: string;
15
14
  path: string;
@@ -9,7 +9,8 @@
9
9
  */
10
10
  import type { Compilation } from "../Compilation";
11
11
  import type { HttpUriPluginOptions } from "../builtin-plugin";
12
- import type { Amd, AssetModuleFilename, Bail, CacheOptions, ChunkFilename, ChunkLoading, ChunkLoadingGlobal, Clean, Context, CrossOriginLoading, CssChunkFilename, CssFilename, Dependencies, DevServer, DevTool, DevtoolFallbackModuleFilenameTemplate, DevtoolModuleFilenameTemplate, DevtoolNamespace, EnabledLibraryTypes, EnabledWasmLoadingTypes, EntryDescription, Environment, Externals, ExternalsPresets, ExternalsType, Filename, GeneratorOptionsByModuleType, GlobalObject, HashDigest, HashDigestLength, HashFunction, HashSalt, HotUpdateChunkFilename, HotUpdateGlobal, HotUpdateMainFilename, Iife, ImportFunctionName, ImportMetaName, Incremental, InfrastructureLogging, JavascriptParserOptions, LazyCompilationOptions, LibraryOptions, Loader, Mode, Name, NoParseOption, Node, Optimization, OutputModule, ParserOptionsByModuleType, Path, Performance, Plugins, Profile, PublicPath, Resolve, RspackFutureOptions, RspackOptions, RuleSetRules, ScriptType, SnapshotOptions, SourceMapFilename, StatsValue, StrictModuleErrorHandling, Target, TrustedTypes, UniqueName, WasmLoading, Watch, WatchOptions, WebassemblyModuleFilename, WorkerPublicPath } from "./types";
12
+ import type WebpackError from "../lib/WebpackError";
13
+ import type { Amd, AssetModuleFilename, Bail, CacheOptions, ChunkFilename, ChunkLoading, ChunkLoadingGlobal, Clean, Context, CrossOriginLoading, CssChunkFilename, CssFilename, Dependencies, DevServer, DevTool, DevtoolFallbackModuleFilenameTemplate, DevtoolModuleFilenameTemplate, DevtoolNamespace, EnabledLibraryTypes, EnabledWasmLoadingTypes, EntryDescription, Environment, Externals, ExternalsPresets, ExternalsType, Filename, GeneratorOptionsByModuleType, GlobalObject, HashDigest, HashDigestLength, HashFunction, HashSalt, HotUpdateChunkFilename, HotUpdateGlobal, HotUpdateMainFilename, Iife, ImportFunctionName, ImportMetaName, Incremental, InfrastructureLogging, LazyCompilationOptions, LibraryOptions, Loader, Mode, Name, NoParseOption, Node, Optimization, OutputModule, ParserOptionsByModuleType, Path, Performance, Plugins, Profile, PublicPath, Resolve, RspackFutureOptions, RspackOptions, RuleSetRules, ScriptType, SnapshotOptions, SourceMapFilename, StatsValue, StrictModuleErrorHandling, Target, TrustedTypes, UniqueName, WasmLoading, Watch, WatchOptions, WebassemblyModuleFilename, WorkerPublicPath } from "./types";
13
14
  export declare const getNormalizedRspackOptions: (config: RspackOptions) => RspackOptionsNormalized;
14
15
  export type EntryDynamicNormalized = () => Promise<EntryStaticNormalized>;
15
16
  export type EntryNormalized = EntryDynamicNormalized | EntryStaticNormalized;
@@ -108,9 +109,10 @@ export interface ExperimentsNormalized {
108
109
  parallelLoader?: boolean;
109
110
  useInputFileSystem?: false | RegExp[];
110
111
  inlineConst?: boolean;
111
- typeReexportsPresence?: JavascriptParserOptions["typeReexportsPresence"];
112
+ inlineEnum?: boolean;
113
+ typeReexportsPresence?: boolean;
112
114
  }
113
- export type IgnoreWarningsNormalized = ((warning: Error, compilation: Compilation) => boolean)[];
115
+ export type IgnoreWarningsNormalized = ((warning: WebpackError, compilation: Compilation) => boolean)[];
114
116
  export type OptimizationRuntimeChunkNormalized = false | {
115
117
  name: string | ((entrypoint: {
116
118
  name: string;
@@ -6,6 +6,7 @@ import type { Module } from "../Module";
6
6
  import type ModuleGraph from "../ModuleGraph";
7
7
  import type { HttpUriPluginOptions } from "../builtin-plugin/HttpUriPlugin";
8
8
  import type { Chunk } from "../exports";
9
+ import type WebpackError from "../lib/WebpackError";
9
10
  import type { ResolveCallback } from "./adapterRuleUse";
10
11
  import type { DevServerOptions } from "./devServer";
11
12
  export type FilenameTemplate = string;
@@ -2037,15 +2038,20 @@ export type Experiments = {
2037
2038
  */
2038
2039
  useInputFileSystem?: UseInputFileSystem;
2039
2040
  /**
2040
- * Enable inline constants
2041
+ * Enable inline const feature
2041
2042
  * @default false
2042
2043
  */
2043
2044
  inlineConst?: boolean;
2044
2045
  /**
2045
- * Enable inline constants
2046
+ * Enable inline enum feature
2046
2047
  * @default false
2047
2048
  */
2048
- typeReexportsPresence?: JavascriptParserOptions["typeReexportsPresence"];
2049
+ inlineEnum?: boolean;
2050
+ /**
2051
+ * Enable type reexports presence feature
2052
+ * @default false
2053
+ */
2054
+ typeReexportsPresence?: boolean;
2049
2055
  };
2050
2056
  export type Watch = boolean;
2051
2057
  /** Options for watch mode. */
@@ -2082,9 +2088,22 @@ export interface DevServer extends DevServerOptions {
2082
2088
  }
2083
2089
  export type { Middleware as DevServerMiddleware } from "./devServer";
2084
2090
  /**
2085
- * An array of either regular expressions or functions that determine if a warning should be ignored.
2091
+ * Ignore specific warnings.
2086
2092
  */
2087
- export type IgnoreWarnings = (RegExp | ((error: Error, compilation: Compilation) => boolean))[];
2093
+ export type IgnoreWarnings = (RegExp | {
2094
+ /**
2095
+ * A RegExp to select the origin file for the warning.
2096
+ */
2097
+ file?: RegExp;
2098
+ /**
2099
+ * A RegExp to select the warning message.
2100
+ */
2101
+ message?: RegExp;
2102
+ /**
2103
+ * A RegExp to select the origin module for the warning.
2104
+ */
2105
+ module?: RegExp;
2106
+ } | ((warning: WebpackError, compilation: Compilation) => boolean))[];
2088
2107
  /**
2089
2108
  * Capture a "profile" of the application, including statistics and hints, which can then be dissected using the Analyze tool.
2090
2109
  * */