@rspack/core 1.2.0-beta.0 → 1.2.1

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 (86) hide show
  1. package/compiled/browserslist/index.js +28 -28
  2. package/compiled/graceful-fs/index.js +18 -18
  3. package/compiled/watchpack/index.js +34 -34
  4. package/compiled/webpack-sources/index.js +76 -76
  5. package/compiled/zod/index.js +30 -30
  6. package/dist/ChunkGraph.d.ts +1 -0
  7. package/dist/ChunkGroup.d.ts +2 -0
  8. package/dist/Compiler.d.ts +30 -2
  9. package/dist/ResolverFactory.d.ts +1 -1
  10. package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
  11. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
  12. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
  13. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
  14. package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
  15. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
  16. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
  17. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
  18. package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +1 -1
  19. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
  20. package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
  21. package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
  22. package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
  23. package/dist/builtin-plugin/DllEntryPlugin.d.ts +1 -1
  24. package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +1 -1
  25. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
  26. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
  27. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
  28. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
  29. package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
  30. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
  31. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
  32. package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
  33. package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
  34. package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +1 -1
  35. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
  36. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
  37. package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
  38. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
  39. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
  40. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
  41. package/dist/builtin-plugin/LibManifestPlugin.d.ts +1 -1
  42. package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +1 -1
  43. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
  44. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
  45. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
  46. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
  47. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
  48. package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +1 -1
  49. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
  50. package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +1 -1
  51. package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
  52. package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
  53. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
  54. package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +1 -1
  55. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
  56. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
  57. package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
  58. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
  59. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
  60. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
  61. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
  62. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
  63. package/dist/builtin-plugin/base.d.ts +1 -1
  64. package/dist/builtin-plugin/html-plugin/hooks.d.ts +30 -0
  65. package/dist/builtin-plugin/html-plugin/index.d.ts +2 -0
  66. package/dist/builtin-plugin/{HtmlRspackPlugin.d.ts → html-plugin/options.d.ts} +5 -47
  67. package/dist/builtin-plugin/html-plugin/plugin.d.ts +25 -0
  68. package/dist/builtin-plugin/html-plugin/taps.d.ts +2 -0
  69. package/dist/builtin-plugin/index.d.ts +1 -1
  70. package/dist/builtin-plugin/lazy-compilation/backend.d.ts +1 -1
  71. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
  72. package/dist/config/normalization.d.ts +3 -2
  73. package/dist/config/types.d.ts +32 -52
  74. package/dist/config/zod.d.ts +67 -62
  75. package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
  76. package/dist/exports.d.ts +2 -3
  77. package/dist/index.js +1941 -1670
  78. package/dist/stats/statsFactoryUtils.d.ts +9 -0
  79. package/dist/taps/compilation.d.ts +2 -0
  80. package/dist/taps/compiler.d.ts +2 -0
  81. package/dist/taps/contextModuleFactory.d.ts +2 -0
  82. package/dist/taps/index.d.ts +6 -0
  83. package/dist/taps/javascriptModules.d.ts +2 -0
  84. package/dist/taps/normalModuleFactory.d.ts +2 -0
  85. package/dist/taps/types.d.ts +11 -0
  86. package/package.json +9 -4
@@ -12,7 +12,7 @@ export declare const IgnorePlugin: {
12
12
  new (options: IgnorePluginOptions): {
13
13
  name: BuiltinPluginName;
14
14
  _args: [options: IgnorePluginOptions];
15
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
15
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
16
16
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
17
17
  apply(compiler: import("..").Compiler): void;
18
18
  };
@@ -3,7 +3,7 @@ export declare const InferAsyncModulesPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
6
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
7
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("..").Compiler): void;
9
9
  };
@@ -4,7 +4,7 @@ export declare const JsLoaderRspackPlugin: {
4
4
  new (compiler: Compiler): {
5
5
  name: BuiltinPluginName;
6
6
  _args: [compiler: Compiler];
7
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
8
8
  raw(compiler: Compiler): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: Compiler): void;
10
10
  };
@@ -3,7 +3,7 @@ export declare const JsonModulesPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
6
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
7
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("..").Compiler): void;
9
9
  };
@@ -11,7 +11,7 @@ export declare const LibManifestPlugin: {
11
11
  new (options: LibManifestPluginOptions): {
12
12
  name: BuiltinPluginName;
13
13
  _args: [options: LibManifestPluginOptions];
14
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
14
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
15
15
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
16
16
  apply(compiler: import("..").Compiler): void;
17
17
  };
@@ -26,7 +26,7 @@ export declare const LightningCssMinimizerRspackPlugin: {
26
26
  new (options?: LightningCssMinimizerRspackPluginOptions | undefined): {
27
27
  name: BuiltinPluginName;
28
28
  _args: [options?: LightningCssMinimizerRspackPluginOptions | undefined];
29
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
29
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
30
30
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
31
31
  apply(compiler: import("..").Compiler): void;
32
32
  };
@@ -8,7 +8,7 @@ export declare const LimitChunkCountPlugin: {
8
8
  new (options: LimitChunkCountOptions): {
9
9
  name: BuiltinPluginName;
10
10
  _args: [options: LimitChunkCountOptions];
11
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
11
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
12
12
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
13
13
  apply(compiler: import("..").Compiler): void;
14
14
  };
@@ -3,7 +3,7 @@ export declare const MergeDuplicateChunksPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
6
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
7
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("..").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const ModuleChunkFormatPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
6
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
7
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("..").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const NamedChunkIdsPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
6
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
7
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("..").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const NamedModuleIdsPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
6
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
7
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("..").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const NoEmitOnErrorsPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
6
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
7
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("..").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const NodeTargetPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
6
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
7
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("..").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const OccurrenceChunkIdsPlugin: {
3
3
  new (options?: RawOccurrenceChunkIdsPluginOptions | undefined): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [options?: RawOccurrenceChunkIdsPluginOptions | undefined];
6
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
6
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
7
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("..").Compiler): void;
9
9
  };
@@ -4,7 +4,7 @@ export declare const ProgressPlugin: {
4
4
  new (progress?: ProgressPluginArgument): {
5
5
  name: BuiltinPluginName;
6
6
  _args: [progress?: ProgressPluginArgument];
7
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
8
8
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("..").Compiler): void;
10
10
  };
@@ -4,7 +4,7 @@ export declare const ProvidePlugin: {
4
4
  new (provide: ProvidePluginOptions): {
5
5
  name: BuiltinPluginName;
6
6
  _args: [provide: ProvidePluginOptions];
7
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
8
8
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("..").Compiler): void;
10
10
  };
@@ -3,7 +3,7 @@ export declare const RealContentHashPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
6
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
7
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("..").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const RemoveDuplicateModulesPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
6
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
7
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("..").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const RemoveEmptyChunksPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
6
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
7
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("..").Compiler): void;
9
9
  };
@@ -4,7 +4,7 @@ export declare const RuntimeChunkPlugin: {
4
4
  new (options: RawRuntimeChunkOptions): {
5
5
  name: BuiltinPluginName;
6
6
  _args: [options: RawRuntimeChunkOptions];
7
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
8
8
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("..").Compiler): void;
10
10
  };
@@ -3,7 +3,7 @@ export declare const RuntimePlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
6
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
7
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("..").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const SideEffectsFlagPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
6
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
7
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("..").Compiler): void;
9
9
  };
@@ -13,7 +13,7 @@ export declare const SizeLimitsPlugin: {
13
13
  maxAssetSize?: number;
14
14
  maxEntrypointSize?: number;
15
15
  }];
16
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
16
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
17
17
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
18
18
  apply(compiler: import("..").Compiler): void;
19
19
  };
@@ -4,7 +4,7 @@ export declare const SourceMapDevToolPlugin: {
4
4
  new (options: RawSourceMapDevToolPluginOptions): {
5
5
  name: BuiltinPluginName;
6
6
  _args: [options: RawSourceMapDevToolPluginOptions];
7
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
8
8
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("..").Compiler): void;
10
10
  };
@@ -205,7 +205,7 @@ export declare const SwcJsMinimizerRspackPlugin: {
205
205
  new (options?: SwcJsMinimizerRspackPluginOptions | undefined): {
206
206
  name: BuiltinPluginName;
207
207
  _args: [options?: SwcJsMinimizerRspackPluginOptions | undefined];
208
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
208
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
209
209
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
210
210
  apply(compiler: import("..").Compiler): void;
211
211
  };
@@ -3,7 +3,7 @@ export declare const WarnCaseSensitiveModulesPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
6
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
7
7
  raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("..").Compiler): void;
9
9
  };
@@ -14,7 +14,7 @@ export declare function create<T extends any[], R>(name: binding.BuiltinPluginNa
14
14
  new (...args: T): {
15
15
  name: binding.BuiltinPluginName;
16
16
  _args: T;
17
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
17
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
18
18
  raw(compiler: Compiler): binding.BuiltinPlugin;
19
19
  apply(compiler: Compiler): void;
20
20
  };
@@ -0,0 +1,30 @@
1
+ import type { JsAfterEmitData, JsAfterTemplateExecutionData, JsAlterAssetTagGroupsData, JsAlterAssetTagsData, JsBeforeAssetTagGenerationData, JsBeforeEmitData } from "@rspack/binding";
2
+ import * as liteTapable from "@rspack/lite-tapable";
3
+ import { Compilation } from "../../Compilation";
4
+ import type { HtmlRspackPluginOptions } from "./options";
5
+ type ExtraPluginHookData = {
6
+ plugin: {
7
+ options: HtmlRspackPluginOptions;
8
+ };
9
+ };
10
+ export type HtmlRspackPluginHooks = {
11
+ beforeAssetTagGeneration: liteTapable.AsyncSeriesWaterfallHook<[
12
+ JsBeforeAssetTagGenerationData & ExtraPluginHookData
13
+ ]>;
14
+ alterAssetTags: liteTapable.AsyncSeriesWaterfallHook<[JsAlterAssetTagsData]>;
15
+ alterAssetTagGroups: liteTapable.AsyncSeriesWaterfallHook<[
16
+ JsAlterAssetTagGroupsData & ExtraPluginHookData
17
+ ]>;
18
+ afterTemplateExecution: liteTapable.AsyncSeriesWaterfallHook<[
19
+ JsAfterTemplateExecutionData & ExtraPluginHookData
20
+ ]>;
21
+ beforeEmit: liteTapable.AsyncSeriesWaterfallHook<[
22
+ JsBeforeEmitData & ExtraPluginHookData
23
+ ]>;
24
+ afterEmit: liteTapable.AsyncSeriesWaterfallHook<[
25
+ JsAfterEmitData & ExtraPluginHookData
26
+ ]>;
27
+ };
28
+ export declare const getPluginHooks: (compilation: Compilation) => HtmlRspackPluginHooks;
29
+ export declare const cleanPluginHooks: (compilation: Compilation) => void;
30
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./plugin";
2
+ export * from "./options";
@@ -1,7 +1,4 @@
1
- import { BuiltinPluginName, type JsAfterEmitData, type JsAfterTemplateExecutionData, type JsAlterAssetTagGroupsData, type JsAlterAssetTagsData, type JsBeforeAssetTagGenerationData, type JsBeforeEmitData, type JsHtmlPluginTag } from "@rspack/binding";
2
- import * as liteTapable from "@rspack/lite-tapable";
3
- import { Compilation } from "../Compilation";
4
- import type { Compiler } from "../Compiler";
1
+ import { Compilation } from "../../Compilation";
5
2
  export type TemplateRenderFunction = (params: Record<string, any>) => string | Promise<string>;
6
3
  export type TemplateParamFunction = (params: Record<string, any>) => Record<string, any> | Promise<Record<string, any>>;
7
4
  export type HtmlRspackPluginOptions = {
@@ -67,46 +64,7 @@ export type HtmlRspackPluginOptions = {
67
64
  /** Inject a base tag */
68
65
  hash?: boolean;
69
66
  };
70
- declare const HtmlRspackPluginImpl: {
71
- new (c?: HtmlRspackPluginOptions | undefined): {
72
- name: BuiltinPluginName;
73
- _args: [c?: HtmlRspackPluginOptions | undefined];
74
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
75
- raw(compiler: Compiler): import("@rspack/binding").BuiltinPlugin;
76
- apply(compiler: Compiler): void;
77
- };
78
- };
79
- type ExtraPluginHookData = {
80
- plugin: {
81
- options: HtmlRspackPluginOptions;
82
- };
83
- };
84
- export type HtmlRspackPluginHooks = {
85
- beforeAssetTagGeneration: liteTapable.AsyncSeriesWaterfallHook<[
86
- JsBeforeAssetTagGenerationData & ExtraPluginHookData
87
- ]>;
88
- alterAssetTags: liteTapable.AsyncSeriesWaterfallHook<[JsAlterAssetTagsData]>;
89
- alterAssetTagGroups: liteTapable.AsyncSeriesWaterfallHook<[
90
- JsAlterAssetTagGroupsData & ExtraPluginHookData
91
- ]>;
92
- afterTemplateExecution: liteTapable.AsyncSeriesWaterfallHook<[
93
- JsAfterTemplateExecutionData & ExtraPluginHookData
94
- ]>;
95
- beforeEmit: liteTapable.AsyncSeriesWaterfallHook<[
96
- JsBeforeEmitData & ExtraPluginHookData
97
- ]>;
98
- afterEmit: liteTapable.AsyncSeriesWaterfallHook<[
99
- JsAfterEmitData & ExtraPluginHookData
100
- ]>;
101
- };
102
- declare const HtmlRspackPlugin: typeof HtmlRspackPluginImpl & {
103
- /**
104
- * @deprecated Use `getCompilationHooks` instead.
105
- */
106
- getHooks: (compilation: Compilation) => HtmlRspackPluginHooks;
107
- getCompilationHooks: (compilation: Compilation) => HtmlRspackPluginHooks;
108
- getCompilationOptions: (compilation: Compilation) => HtmlRspackPluginOptions | void;
109
- createHtmlTagObject: (tagName: string, attributes?: Record<string, string | boolean>, innerHTML?: string | undefined) => JsHtmlPluginTag;
110
- version: number;
111
- };
112
- export { HtmlRspackPlugin };
67
+ export declare function validateHtmlPluginOptions(options: HtmlRspackPluginOptions): void;
68
+ export declare const getPluginOptions: (compilation: Compilation) => HtmlRspackPluginOptions | undefined;
69
+ export declare const setPluginOptions: (compilation: Compilation, options: HtmlRspackPluginOptions) => void;
70
+ export declare const cleanPluginOptions: (compilation: Compilation) => void;
@@ -0,0 +1,25 @@
1
+ import { BuiltinPluginName, type JsHtmlPluginTag } from "@rspack/binding";
2
+ import type { Compilation } from "../../Compilation";
3
+ import type { Compiler } from "../../Compiler";
4
+ import { type HtmlRspackPluginHooks } from "./hooks";
5
+ import { type HtmlRspackPluginOptions } from "./options";
6
+ declare const HtmlRspackPluginImpl: {
7
+ new (c?: HtmlRspackPluginOptions | undefined): {
8
+ name: BuiltinPluginName;
9
+ _args: [c?: HtmlRspackPluginOptions | undefined];
10
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
11
+ raw(compiler: Compiler): import("@rspack/binding").BuiltinPlugin;
12
+ apply(compiler: Compiler): void;
13
+ };
14
+ };
15
+ declare const HtmlRspackPlugin: typeof HtmlRspackPluginImpl & {
16
+ /**
17
+ * @deprecated Use `getCompilationHooks` instead.
18
+ */
19
+ getHooks: (compilation: Compilation) => HtmlRspackPluginHooks;
20
+ getCompilationHooks: (compilation: Compilation) => HtmlRspackPluginHooks;
21
+ getCompilationOptions: (compilation: Compilation) => HtmlRspackPluginOptions | void;
22
+ createHtmlTagObject: (tagName: string, attributes?: Record<string, string | boolean>, innerHTML?: string | undefined) => JsHtmlPluginTag;
23
+ version: number;
24
+ };
25
+ export { HtmlRspackPlugin };
@@ -0,0 +1,2 @@
1
+ import type { CreatePartialRegisters } from "../../taps/types";
2
+ export declare const createHtmlPluginHooksRegisters: CreatePartialRegisters<`HtmlPlugin`>;
@@ -28,7 +28,7 @@ export * from "./FileUriPlugin";
28
28
  export * from "./FlagDependencyExportsPlugin";
29
29
  export * from "./FlagDependencyUsagePlugin";
30
30
  export * from "./HotModuleReplacementPlugin";
31
- export * from "./HtmlRspackPlugin";
31
+ export * from "./html-plugin/index";
32
32
  export * from "./HttpExternalsRspackPlugin";
33
33
  export * from "./IgnorePlugin";
34
34
  export * from "./InferAsyncModulesPlugin";
@@ -4,7 +4,7 @@ import type { SecureContextOptions, TlsOptions } from "node:tls";
4
4
  import type { Compiler } from "../..";
5
5
  export interface LazyCompilationDefaultBackendOptions {
6
6
  /**
7
- * A custom client.
7
+ * A custom client script path.
8
8
  */
9
9
  client?: string;
10
10
  /**
@@ -17,7 +17,7 @@ export declare const BuiltinLazyCompilationPlugin: {
17
17
  data: string;
18
18
  client: string;
19
19
  }, cacheable: boolean, entries: boolean, imports: boolean, test?: RegExp | ((m: JsModule) => boolean) | undefined];
20
- affectedHooks: "done" | "make" | "environment" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
20
+ affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
21
21
  raw(compiler: import("../..").Compiler): import("@rspack/binding").BuiltinPlugin;
22
22
  apply(compiler: import("../..").Compiler): void;
23
23
  };
@@ -8,7 +8,7 @@
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
10
  import type { Compilation } from "../Compilation";
11
- import type { 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";
11
+ 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";
12
12
  export declare const getNormalizedRspackOptions: (config: RspackOptions) => RspackOptionsNormalized;
13
13
  export type EntryDynamicNormalized = () => Promise<EntryStaticNormalized>;
14
14
  export type EntryNormalized = EntryDynamicNormalized | EntryStaticNormalized;
@@ -100,6 +100,7 @@ export interface ExperimentsNormalized {
100
100
  css?: boolean;
101
101
  layers?: boolean;
102
102
  incremental?: false | Incremental;
103
+ parallelCodeSplitting?: boolean;
103
104
  futureDefaults?: boolean;
104
105
  rspackFuture?: RspackFutureOptions;
105
106
  }
@@ -139,6 +140,6 @@ export interface RspackOptionsNormalized {
139
140
  ignoreWarnings?: IgnoreWarningsNormalized;
140
141
  performance?: Performance;
141
142
  profile?: Profile;
142
- amd?: string;
143
+ amd?: Amd;
143
144
  bail?: Bail;
144
145
  }