@rspack/core 1.0.0-alpha.5 → 1.0.0-beta.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 (181) hide show
  1. package/compiled/zod/index.d.ts +138 -52
  2. package/compiled/zod/index.js +300 -103
  3. package/compiled/zod/package.json +1 -1
  4. package/compiled/zod-validation-error/index.js +6 -6
  5. package/dist/Compilation.d.ts +22 -4
  6. package/dist/Compilation.js +64 -49
  7. package/dist/Compiler.d.ts +11 -10
  8. package/dist/Compiler.js +42 -42
  9. package/dist/ErrorHelpers.js +2 -4
  10. package/dist/Module.d.ts +1 -0
  11. package/dist/Module.js +3 -6
  12. package/dist/ModuleTypeConstants.d.ts +45 -69
  13. package/dist/ModuleTypeConstants.js +24 -77
  14. package/dist/NormalModule.d.ts +1 -0
  15. package/dist/NormalModule.js +1 -0
  16. package/dist/Stats.js +4 -6
  17. package/dist/Template.d.ts +31 -147
  18. package/dist/Template.js +40 -236
  19. package/dist/builtin-loader/lightningcss/index.d.ts +89 -0
  20. package/dist/builtin-loader/lightningcss/index.js +175 -0
  21. package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
  22. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
  23. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
  24. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
  25. package/dist/builtin-plugin/BannerPlugin.d.ts +25 -49
  26. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
  27. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
  28. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
  29. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
  30. package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
  31. package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
  32. package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
  33. package/dist/builtin-plugin/DefinePlugin.js +9 -13
  34. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
  35. package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
  36. package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
  37. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
  38. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
  39. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
  40. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
  41. package/dist/builtin-plugin/EntryPlugin.d.ts +4 -3
  42. package/dist/builtin-plugin/EntryPlugin.js +1 -0
  43. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
  44. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
  45. package/dist/builtin-plugin/ExternalsPlugin.d.ts +29 -5
  46. package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
  47. package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
  48. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
  49. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
  50. package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +9 -9
  51. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
  52. package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
  53. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
  54. package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +2 -2
  55. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
  56. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
  57. package/dist/builtin-plugin/LightningCssMiminizerRspackPlugin.d.ts +1 -1
  58. package/dist/builtin-plugin/LightningCssMiminizerRspackPlugin.js +4 -1
  59. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
  60. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
  61. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
  62. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
  63. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
  64. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
  65. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
  66. package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -1
  67. package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -1
  68. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
  69. package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
  70. package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
  71. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
  72. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
  73. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
  74. package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
  75. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
  76. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
  77. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
  78. package/dist/builtin-plugin/SplitChunksPlugin.js +5 -15
  79. package/dist/builtin-plugin/SwcCssMinimizerPlugin.d.ts +1 -1
  80. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
  81. package/dist/builtin-plugin/SwcJsMinimizerPlugin.js +15 -23
  82. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
  83. package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
  84. package/dist/builtin-plugin/base.d.ts +1 -1
  85. package/dist/builtin-plugin/base.js +1 -3
  86. package/dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.d.ts +3 -3
  87. package/dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.js +17 -66
  88. package/dist/builtin-plugin/css-extract/hmr/normalizeUrl.d.ts +2 -0
  89. package/dist/builtin-plugin/css-extract/hmr/{normalize-url.js → normalizeUrl.js} +15 -24
  90. package/dist/builtin-plugin/css-extract/loader.d.ts +8 -3
  91. package/dist/builtin-plugin/css-extract/loader.js +28 -17
  92. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
  93. package/dist/config/adapter.d.ts +1 -1
  94. package/dist/config/adapter.js +39 -25
  95. package/dist/config/adapterRuleUse.d.ts +5 -5
  96. package/dist/config/adapterRuleUse.js +23 -1
  97. package/dist/config/browserslistTargetHandler.d.ts +17 -15
  98. package/dist/config/browserslistTargetHandler.js +27 -33
  99. package/dist/config/defaults.js +27 -31
  100. package/dist/config/normalization.d.ts +8 -3
  101. package/dist/config/normalization.js +7 -5
  102. package/dist/config/target.d.ts +48 -109
  103. package/dist/config/target.js +50 -86
  104. package/dist/config/zod.d.ts +2660 -2305
  105. package/dist/config/zod.js +38 -19
  106. package/dist/container/ContainerPlugin.d.ts +7 -7
  107. package/dist/container/ContainerReferencePlugin.d.ts +1 -1
  108. package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
  109. package/dist/container/options.js +1 -1
  110. package/dist/exports.d.ts +4 -4
  111. package/dist/exports.js +2 -2
  112. package/dist/lib/AbstractMethodError.d.ts +12 -3
  113. package/dist/lib/AbstractMethodError.js +29 -21
  114. package/dist/lib/Cache.d.ts +40 -46
  115. package/dist/lib/Cache.js +43 -78
  116. package/dist/lib/CacheFacade.d.ts +119 -143
  117. package/dist/lib/CacheFacade.js +123 -123
  118. package/dist/lib/EntryOptionPlugin.d.ts +19 -2
  119. package/dist/lib/EntryOptionPlugin.js +22 -6
  120. package/dist/lib/EnvironmentPlugin.d.ts +17 -10
  121. package/dist/lib/EnvironmentPlugin.js +16 -15
  122. package/dist/lib/HookWebpackError.d.ts +27 -33
  123. package/dist/lib/HookWebpackError.js +33 -34
  124. package/dist/lib/IgnoreWarningsPlugin.d.ts +25 -0
  125. package/dist/lib/{ignoreWarningsPlugin.js → IgnoreWarningsPlugin.js} +17 -0
  126. package/dist/lib/LoaderOptionsPlugin.d.ts +18 -9
  127. package/dist/lib/LoaderOptionsPlugin.js +38 -14
  128. package/dist/lib/LoaderTargetPlugin.d.ts +17 -8
  129. package/dist/lib/LoaderTargetPlugin.js +17 -15
  130. package/dist/lib/ModuleFilenameHelpers.d.ts +10 -1
  131. package/dist/lib/ModuleFilenameHelpers.js +10 -3
  132. package/dist/lib/NormalModuleReplacementPlugin.d.ts +15 -5
  133. package/dist/lib/NormalModuleReplacementPlugin.js +15 -5
  134. package/dist/lib/WebpackError.d.ts +29 -22
  135. package/dist/lib/WebpackError.js +17 -29
  136. package/dist/lib/cache/getLazyHashedEtag.d.ts +24 -24
  137. package/dist/lib/cache/getLazyHashedEtag.js +20 -23
  138. package/dist/lib/cache/mergeEtags.d.ts +15 -9
  139. package/dist/lib/cache/mergeEtags.js +23 -22
  140. package/dist/lib/formatLocation.d.ts +13 -8
  141. package/dist/lib/formatLocation.js +20 -20
  142. package/dist/loader-runner/LoaderLoadingError.d.ts +11 -1
  143. package/dist/loader-runner/LoaderLoadingError.js +3 -5
  144. package/dist/loader-runner/index.js +7 -9
  145. package/dist/loader-runner/loadLoader.d.ts +11 -2
  146. package/dist/loader-runner/loadLoader.js +17 -19
  147. package/dist/logging/createConsoleLogger.js +2 -6
  148. package/dist/logging/truncateArgs.js +5 -9
  149. package/dist/node/nodeConsole.js +1 -3
  150. package/dist/rspackOptionsApply.js +2 -2
  151. package/dist/stats/DefaultStatsFactoryPlugin.js +18 -8
  152. package/dist/stats/DefaultStatsPresetPlugin.js +4 -4
  153. package/dist/stats/DefaultStatsPrinterPlugin.js +11 -16
  154. package/dist/stats/StatsFactory.js +13 -17
  155. package/dist/stats/StatsPrinter.js +7 -9
  156. package/dist/util/AssetInfo.js +11 -7
  157. package/dist/util/SplitChunkSize.js +1 -1
  158. package/dist/util/cleverMerge.d.ts +33 -57
  159. package/dist/util/cleverMerge.js +89 -145
  160. package/dist/util/comparators.d.ts +1 -1
  161. package/dist/util/comparators.js +3 -5
  162. package/dist/util/createHash.d.ts +4 -3
  163. package/dist/util/createHash.js +31 -45
  164. package/dist/util/fs.js +9 -13
  165. package/dist/util/hash/BatchedHash.d.ts +24 -9
  166. package/dist/util/hash/BatchedHash.js +16 -13
  167. package/dist/util/hash/index.d.ts +9 -9
  168. package/dist/util/hash/index.js +14 -11
  169. package/dist/util/hash/md4.d.ts +29 -2
  170. package/dist/util/hash/md4.js +7 -3
  171. package/dist/util/hash/wasm-hash.d.ts +52 -5
  172. package/dist/util/hash/wasm-hash.js +19 -22
  173. package/dist/util/hash/xxhash64.d.ts +29 -2
  174. package/dist/util/hash/xxhash64.js +7 -3
  175. package/dist/util/identifier.js +9 -15
  176. package/dist/util/index.js +1 -1
  177. package/dist/util/memoize.js +7 -9
  178. package/package.json +9 -8
  179. package/compiled/enhanced-resolve/index.js +0 -5566
  180. package/dist/builtin-plugin/css-extract/hmr/normalize-url.d.ts +0 -2
  181. package/dist/lib/ignoreWarningsPlugin.d.ts +0 -7
@@ -3,7 +3,7 @@ export declare const FlagDependencyUsagePlugin: {
3
3
  new (global: boolean): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [global: boolean];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -17,13 +17,13 @@ declare const htmlRspackPluginOptions: z.ZodObject<{
17
17
  meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
18
18
  }, "strict", z.ZodTypeAny, {
19
19
  filename?: string | undefined;
20
+ publicPath?: string | undefined;
21
+ chunks?: string[] | undefined;
20
22
  template?: string | undefined;
21
23
  templateContent?: string | undefined;
22
24
  templateParameters?: Record<string, string> | undefined;
23
25
  inject?: boolean | "head" | "body" | undefined;
24
- publicPath?: string | undefined;
25
26
  scriptLoading?: "module" | "blocking" | "defer" | undefined;
26
- chunks?: string[] | undefined;
27
27
  excludedChunks?: string[] | undefined;
28
28
  sri?: "sha256" | "sha384" | "sha512" | undefined;
29
29
  minify?: boolean | undefined;
@@ -32,13 +32,13 @@ declare const htmlRspackPluginOptions: z.ZodObject<{
32
32
  meta?: Record<string, string | Record<string, string>> | undefined;
33
33
  }, {
34
34
  filename?: string | undefined;
35
+ publicPath?: string | undefined;
36
+ chunks?: string[] | undefined;
35
37
  template?: string | undefined;
36
38
  templateContent?: string | undefined;
37
39
  templateParameters?: Record<string, string> | undefined;
38
40
  inject?: boolean | "head" | "body" | undefined;
39
- publicPath?: string | undefined;
40
41
  scriptLoading?: "module" | "blocking" | "defer" | undefined;
41
- chunks?: string[] | undefined;
42
42
  excludedChunks?: string[] | undefined;
43
43
  sri?: "sha256" | "sha384" | "sha512" | undefined;
44
44
  minify?: boolean | undefined;
@@ -50,13 +50,13 @@ export type HtmlRspackPluginOptions = z.infer<typeof htmlRspackPluginOptions>;
50
50
  export declare const HtmlRspackPlugin: {
51
51
  new (c?: {
52
52
  filename?: string | undefined;
53
+ publicPath?: string | undefined;
54
+ chunks?: string[] | undefined;
53
55
  template?: string | undefined;
54
56
  templateContent?: string | undefined;
55
57
  templateParameters?: Record<string, string> | undefined;
56
58
  inject?: boolean | "head" | "body" | undefined;
57
- publicPath?: string | undefined;
58
59
  scriptLoading?: "module" | "blocking" | "defer" | undefined;
59
- chunks?: string[] | undefined;
60
60
  excludedChunks?: string[] | undefined;
61
61
  sri?: "sha256" | "sha384" | "sha512" | undefined;
62
62
  minify?: boolean | undefined;
@@ -67,13 +67,13 @@ export declare const HtmlRspackPlugin: {
67
67
  name: BuiltinPluginName;
68
68
  _args: [c?: {
69
69
  filename?: string | undefined;
70
+ publicPath?: string | undefined;
71
+ chunks?: string[] | undefined;
70
72
  template?: string | undefined;
71
73
  templateContent?: string | undefined;
72
74
  templateParameters?: Record<string, string> | undefined;
73
75
  inject?: boolean | "head" | "body" | undefined;
74
- publicPath?: string | undefined;
75
76
  scriptLoading?: "module" | "blocking" | "defer" | undefined;
76
- chunks?: string[] | undefined;
77
77
  excludedChunks?: string[] | undefined;
78
78
  sri?: "sha256" | "sha384" | "sha512" | undefined;
79
79
  minify?: boolean | undefined;
@@ -81,7 +81,7 @@ export declare const HtmlRspackPlugin: {
81
81
  favicon?: string | undefined;
82
82
  meta?: Record<string, string | Record<string, string>> | undefined;
83
83
  } | undefined];
84
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
84
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
85
85
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
86
86
  apply(compiler: import("../Compiler").Compiler): void;
87
87
  };
@@ -3,7 +3,7 @@ export declare const HttpExternalsRspackPlugin: {
3
3
  new (css: boolean, webAsync: boolean): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [css: boolean, webAsync: boolean];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -9,7 +9,7 @@ export declare const IgnorePlugin: {
9
9
  new (options: IgnorePluginOptions): {
10
10
  name: BuiltinPluginName;
11
11
  _args: [options: IgnorePluginOptions];
12
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
12
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
13
13
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
14
14
  apply(compiler: import("../Compiler").Compiler): void;
15
15
  };
@@ -3,7 +3,7 @@ export declare const InferAsyncModulesPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -1,9 +1,9 @@
1
1
  import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
2
2
  import * as liteTapable from "@rspack/lite-tapable";
3
+ import type { Chunk } from "../Chunk";
3
4
  import { Compilation } from "../Compilation";
5
+ import type Hash from "../util/hash";
4
6
  import { RspackBuiltinPlugin } from "./base";
5
- import Hash = require("../util/hash");
6
- import type { Chunk } from "../Chunk";
7
7
  export type CompilationHooks = {
8
8
  chunkHash: liteTapable.SyncHook<[Chunk, Hash]>;
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" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
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" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -4,7 +4,7 @@ export declare const LightningCssMinimizerRspackPlugin: {
4
4
  new (options?: Partial<RawLightningCssMinimizerRspackPluginOptions> | undefined): {
5
5
  name: BuiltinPluginName;
6
6
  _args: [options?: Partial<RawLightningCssMinimizerRspackPluginOptions> | undefined];
7
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
8
8
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("../Compiler").Compiler): void;
10
10
  };
@@ -8,6 +8,9 @@ exports.LightningCssMinimizerRspackPlugin = (0, base_1.create)(binding_1.Builtin
8
8
  errorRecovery: options?.errorRecovery ?? true,
9
9
  unusedSymbols: options?.unusedSymbols ?? [],
10
10
  removeUnusedLocalIdents: options?.removeUnusedLocalIdents ?? true,
11
- browserslist: options?.browserslist ?? ["defaults"]
11
+ browserslist: options?.browserslist ?? ["defaults"],
12
+ test: options?.test,
13
+ include: options?.include,
14
+ exclude: options?.exclude
12
15
  };
13
16
  });
@@ -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" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
11
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
12
12
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
13
13
  apply(compiler: import("../Compiler").Compiler): void;
14
14
  };
@@ -3,7 +3,7 @@ export declare const MangleExportsPlugin: {
3
3
  new (deterministic: boolean): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [deterministic: boolean];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const MergeDuplicateChunksPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const ModuleChunkFormatPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const ModuleConcatenationPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const NamedChunkIdsPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const NamedModuleIdsPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const NaturalChunkIdsPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const NaturalModuleIdsPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const NodeTargetPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -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" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
8
8
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("../Compiler").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" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
8
8
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("../Compiler").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" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const RemoveEmptyChunksPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -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" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
8
8
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
9
9
  apply(compiler: import("../Compiler").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" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const SideEffectsFlagPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -13,7 +13,7 @@ export declare const SizeLimitsPlugin: {
13
13
  maxAssetSize?: number | undefined;
14
14
  maxEntrypointSize?: number | undefined;
15
15
  }];
16
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
16
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
17
17
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
18
18
  apply(compiler: import("../Compiler").Compiler): void;
19
19
  };
@@ -16,7 +16,7 @@ export declare const SourceMapDevToolPlugin: {
16
16
  new (options: SourceMapDevToolPluginOptions): {
17
17
  name: BuiltinPluginName;
18
18
  _args: [options: SourceMapDevToolPluginOptions];
19
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
19
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
20
20
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
21
21
  apply(compiler: import("../Compiler").Compiler): void;
22
22
  };
@@ -34,14 +34,10 @@ function toRawSplitChunksOptions(sc, compiler) {
34
34
  if (typeof ctx.module === "undefined") {
35
35
  return name(undefined);
36
36
  }
37
- else {
38
- return name(Module_1.Module.__from_binding(ctx.module, compiler._lastCompilation), getChunks(ctx.chunks), ctx.cacheGroupKey);
39
- }
37
+ return name(Module_1.Module.__from_binding(ctx.module, compiler._lastCompilation), getChunks(ctx.chunks), ctx.cacheGroupKey);
40
38
  };
41
39
  }
42
- else {
43
- return name;
44
- }
40
+ return name;
45
41
  }
46
42
  function getTest(test) {
47
43
  if (typeof test === "function") {
@@ -49,22 +45,16 @@ function toRawSplitChunksOptions(sc, compiler) {
49
45
  if (typeof ctx.module === "undefined") {
50
46
  return test(undefined);
51
47
  }
52
- else {
53
- return test(Module_1.Module.__from_binding(ctx.module, compiler._lastCompilation));
54
- }
48
+ return test(Module_1.Module.__from_binding(ctx.module, compiler._lastCompilation));
55
49
  };
56
50
  }
57
- else {
58
- return test;
59
- }
51
+ return test;
60
52
  }
61
53
  function getChunks(chunks) {
62
54
  if (typeof chunks === "function") {
63
55
  return (chunk) => chunks(Chunk_1.Chunk.__from_binding(chunk, compiler._lastCompilation.__internal_getInner()));
64
56
  }
65
- else {
66
- return chunks;
67
- }
57
+ return chunks;
68
58
  }
69
59
  const { name, chunks, defaultSizeTypes, cacheGroups = {}, fallbackCacheGroup, minSize, maxSize, maxAsyncSize, maxInitialSize, ...passThrough } = sc;
70
60
  return {
@@ -10,7 +10,7 @@ export declare const SwcCssMinimizerRspackPlugin: {
10
10
  new (options?: SwcCssMinimizerRspackPluginOptions | undefined): {
11
11
  name: BuiltinPluginName;
12
12
  _args: [options?: SwcCssMinimizerRspackPluginOptions | undefined];
13
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
13
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
14
14
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
15
15
  apply(compiler: import("../Compiler").Compiler): void;
16
16
  };
@@ -204,7 +204,7 @@ export declare const SwcJsMinimizerRspackPlugin: {
204
204
  new (options?: SwcJsMinimizerRspackPluginOptions | undefined): {
205
205
  name: BuiltinPluginName;
206
206
  _args: [options?: SwcJsMinimizerRspackPluginOptions | undefined];
207
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
207
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
208
208
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
209
209
  apply(compiler: import("../Compiler").Compiler): void;
210
210
  };
@@ -13,46 +13,38 @@ function getRawExtractCommentsOptions(extractComments) {
13
13
  // copied from terser-webpack-plugin
14
14
  return "@preserve|@lic|@cc_on|^\\**!";
15
15
  }
16
- else if (condition === false) {
16
+ if (condition === false) {
17
17
  throw Error("unreachable");
18
18
  }
19
- else {
20
- // FIXME: flags
21
- return condition.source;
22
- }
19
+ // FIXME: flags
20
+ return condition.source;
23
21
  };
24
22
  if (typeof extractComments === "boolean") {
25
23
  if (!extractComments) {
26
24
  return undefined;
27
25
  }
28
- else {
29
- const res = {
30
- condition: conditionStr(extractComments)
31
- };
32
- return res;
33
- }
26
+ const res = {
27
+ condition: conditionStr(extractComments)
28
+ };
29
+ return res;
34
30
  }
35
- else if (extractComments instanceof RegExp) {
31
+ if (extractComments instanceof RegExp) {
36
32
  const res = {
37
33
  condition: extractComments.source
38
34
  };
39
35
  return res;
40
36
  }
41
- else if (isObject(extractComments)) {
37
+ if (isObject(extractComments)) {
42
38
  if (extractComments.condition === false) {
43
39
  return undefined;
44
40
  }
45
- else {
46
- const res = {
47
- condition: conditionStr(extractComments.condition),
48
- banner: extractComments.banner
49
- };
50
- return res;
51
- }
52
- }
53
- else {
54
- return undefined;
41
+ const res = {
42
+ condition: conditionStr(extractComments.condition),
43
+ banner: extractComments.banner
44
+ };
45
+ return res;
55
46
  }
47
+ return undefined;
56
48
  }
57
49
  exports.SwcJsMinimizerRspackPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.SwcJsMinimizerRspackPlugin, (options) => {
58
50
  let compress = options?.compress ?? true;
@@ -3,7 +3,7 @@ export declare const WarnCaseSensitiveModulesPlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };
@@ -3,7 +3,7 @@ export declare const WebWorkerTemplatePlugin: {
3
3
  new (): {
4
4
  name: BuiltinPluginName;
5
5
  _args: [];
6
- affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
7
  raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
8
8
  apply(compiler: import("../Compiler").Compiler): void;
9
9
  };