@ohos-ports/rspack-core 1.1.8-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 (243) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +25 -0
  3. package/compiled/@swc/types/index.d.ts +1962 -0
  4. package/compiled/@swc/types/index.js +19 -0
  5. package/compiled/@swc/types/license +201 -0
  6. package/compiled/@swc/types/package.json +1 -0
  7. package/compiled/browserslist/index.d.ts +1 -0
  8. package/compiled/browserslist/index.js +2053 -0
  9. package/compiled/browserslist/license +20 -0
  10. package/compiled/browserslist/package.json +1 -0
  11. package/compiled/enhanced-resolve/CachedInputFileSystem.js +664 -0
  12. package/compiled/enhanced-resolve/index.d.ts +1123 -0
  13. package/compiled/enhanced-resolve/license +20 -0
  14. package/compiled/enhanced-resolve/package.json +1 -0
  15. package/compiled/graceful-fs/index.d.ts +13 -0
  16. package/compiled/graceful-fs/index.js +1063 -0
  17. package/compiled/graceful-fs/license +15 -0
  18. package/compiled/graceful-fs/package.json +1 -0
  19. package/compiled/watchpack/index.d.ts +216 -0
  20. package/compiled/watchpack/index.js +2075 -0
  21. package/compiled/watchpack/license +20 -0
  22. package/compiled/watchpack/package.json +1 -0
  23. package/compiled/webpack-sources/index.d.ts +130 -0
  24. package/compiled/webpack-sources/index.js +3520 -0
  25. package/compiled/webpack-sources/license +21 -0
  26. package/compiled/webpack-sources/package.json +1 -0
  27. package/compiled/zod/index.d.ts +1733 -0
  28. package/compiled/zod/index.js +4405 -0
  29. package/compiled/zod/license +21 -0
  30. package/compiled/zod/package.json +1 -0
  31. package/dist/Chunk.d.ts +40 -0
  32. package/dist/ChunkGraph.d.ts +12 -0
  33. package/dist/ChunkGroup.d.ts +26 -0
  34. package/dist/Compilation.d.ts +421 -0
  35. package/dist/Compiler.d.ts +154 -0
  36. package/dist/ContextModuleFactory.d.ts +13 -0
  37. package/dist/DependenciesBlock.d.ts +10 -0
  38. package/dist/Dependency.d.ts +11 -0
  39. package/dist/Entrypoint.d.ts +8 -0
  40. package/dist/ErrorHelpers.d.ts +16 -0
  41. package/dist/ExecuteModulePlugin.d.ts +4 -0
  42. package/dist/FileSystem.d.ts +29 -0
  43. package/dist/FileSystemInfo.d.ts +5 -0
  44. package/dist/Module.d.ts +93 -0
  45. package/dist/ModuleGraph.d.ts +10 -0
  46. package/dist/ModuleTypeConstants.d.ts +93 -0
  47. package/dist/MultiCompiler.d.ts +68 -0
  48. package/dist/MultiStats.d.ts +22 -0
  49. package/dist/MultiWatching.d.ts +26 -0
  50. package/dist/NormalModule.d.ts +12 -0
  51. package/dist/NormalModuleFactory.d.ts +20 -0
  52. package/dist/Resolver.d.ts +16 -0
  53. package/dist/ResolverFactory.d.ts +14 -0
  54. package/dist/RspackError.d.ts +8 -0
  55. package/dist/RuleSetCompiler.d.ts +9 -0
  56. package/dist/RuntimeGlobals.d.ts +324 -0
  57. package/dist/RuntimeModule.d.ts +32 -0
  58. package/dist/Stats.d.ts +17 -0
  59. package/dist/Template.d.ts +77 -0
  60. package/dist/Watching.d.ts +35 -0
  61. package/dist/builtin-loader/index.d.ts +1 -0
  62. package/dist/builtin-loader/lightningcss/index.d.ts +95 -0
  63. package/dist/builtin-loader/swc/index.d.ts +3 -0
  64. package/dist/builtin-loader/swc/pluginImport.d.ts +33 -0
  65. package/dist/builtin-loader/swc/types.d.ts +19 -0
  66. package/dist/builtin-plugin/APIPlugin.d.ts +10 -0
  67. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +10 -0
  68. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +10 -0
  69. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +10 -0
  70. package/dist/builtin-plugin/BannerPlugin.d.ts +40 -0
  71. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +15 -0
  72. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +10 -0
  73. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +10 -0
  74. package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +10 -0
  75. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +15 -0
  76. package/dist/builtin-plugin/CssModulesPlugin.d.ts +10 -0
  77. package/dist/builtin-plugin/DataUriPlugin.d.ts +10 -0
  78. package/dist/builtin-plugin/DefinePlugin.d.ts +17 -0
  79. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +10 -0
  80. package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +8 -0
  81. package/dist/builtin-plugin/DllEntryPlugin.d.ts +13 -0
  82. package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +11 -0
  83. package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +12 -0
  84. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +10 -0
  85. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +10 -0
  86. package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +11 -0
  87. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +10 -0
  88. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +10 -0
  89. package/dist/builtin-plugin/EntryPlugin.d.ts +27 -0
  90. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +11 -0
  91. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +10 -0
  92. package/dist/builtin-plugin/ExternalsPlugin.d.ts +10 -0
  93. package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +10 -0
  94. package/dist/builtin-plugin/FileUriPlugin.d.ts +10 -0
  95. package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +10 -0
  96. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +10 -0
  97. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +10 -0
  98. package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +7 -0
  99. package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +112 -0
  100. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +10 -0
  101. package/dist/builtin-plugin/IgnorePlugin.d.ts +19 -0
  102. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +10 -0
  103. package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +15 -0
  104. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +11 -0
  105. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +10 -0
  106. package/dist/builtin-plugin/LibManifestPlugin.d.ts +18 -0
  107. package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +33 -0
  108. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +15 -0
  109. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +10 -0
  110. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +10 -0
  111. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +10 -0
  112. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +8 -0
  113. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +10 -0
  114. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +10 -0
  115. package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +10 -0
  116. package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +8 -0
  117. package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +10 -0
  118. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +10 -0
  119. package/dist/builtin-plugin/ProgressPlugin.d.ts +11 -0
  120. package/dist/builtin-plugin/ProvidePlugin.d.ts +11 -0
  121. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +10 -0
  122. package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +10 -0
  123. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +10 -0
  124. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +11 -0
  125. package/dist/builtin-plugin/RuntimePlugin.d.ts +10 -0
  126. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +10 -0
  127. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +20 -0
  128. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +11 -0
  129. package/dist/builtin-plugin/SplitChunksPlugin.d.ts +11 -0
  130. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +213 -0
  131. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +10 -0
  132. package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +7 -0
  133. package/dist/builtin-plugin/WorkerPlugin.d.ts +13 -0
  134. package/dist/builtin-plugin/base.d.ts +22 -0
  135. package/dist/builtin-plugin/css-extract/index.d.ts +23 -0
  136. package/dist/builtin-plugin/css-extract/loader.d.ts +21 -0
  137. package/dist/builtin-plugin/css-extract/utils.d.ts +6 -0
  138. package/dist/builtin-plugin/index.d.ts +71 -0
  139. package/dist/builtin-plugin/lazy-compilation/backend.d.ts +46 -0
  140. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +24 -0
  141. package/dist/builtin-plugin/lazy-compilation/plugin.d.ts +13 -0
  142. package/dist/config/adapter.d.ts +10 -0
  143. package/dist/config/adapterRuleUse.d.ts +157 -0
  144. package/dist/config/browserslistTargetHandler.d.ts +21 -0
  145. package/dist/config/defaults.d.ts +12 -0
  146. package/dist/config/index.d.ts +5 -0
  147. package/dist/config/normalization.d.ts +128 -0
  148. package/dist/config/target.d.ts +89 -0
  149. package/dist/config/types.d.ts +2136 -0
  150. package/dist/config/utils.d.ts +16 -0
  151. package/dist/config/zod.d.ts +4090 -0
  152. package/dist/container/ContainerPlugin.d.ts +40 -0
  153. package/dist/container/ContainerReferencePlugin.d.ts +33 -0
  154. package/dist/container/ModuleFederationPlugin.d.ts +13 -0
  155. package/dist/container/ModuleFederationPluginV1.d.ts +22 -0
  156. package/dist/container/ModuleFederationRuntimePlugin.d.ts +10 -0
  157. package/dist/container/options.d.ts +3 -0
  158. package/dist/cssExtractHmr.js +224 -0
  159. package/dist/cssExtractLoader.js +278 -0
  160. package/dist/error/ConcurrentCompilationError.d.ts +14 -0
  161. package/dist/exports.d.ts +167 -0
  162. package/dist/index.d.ts +10 -0
  163. package/dist/index.js +20251 -0
  164. package/dist/lib/AbstractMethodError.d.ts +24 -0
  165. package/dist/lib/Cache.d.ts +65 -0
  166. package/dist/lib/CacheFacade.d.ts +167 -0
  167. package/dist/lib/DllPlugin.d.ts +42 -0
  168. package/dist/lib/DllReferencePlugin.d.ts +119 -0
  169. package/dist/lib/EntryOptionPlugin.d.ts +33 -0
  170. package/dist/lib/EnvironmentPlugin.d.ts +22 -0
  171. package/dist/lib/HookWebpackError.d.ts +40 -0
  172. package/dist/lib/IgnoreWarningsPlugin.d.ts +25 -0
  173. package/dist/lib/LoaderOptionsPlugin.d.ts +28 -0
  174. package/dist/lib/LoaderTargetPlugin.d.ts +24 -0
  175. package/dist/lib/ModuleFilenameHelpers.d.ts +53 -0
  176. package/dist/lib/NormalModuleReplacementPlugin.d.ts +29 -0
  177. package/dist/lib/WebpackError.d.ts +23 -0
  178. package/dist/lib/cache/MemoryCachePlugin.d.ts +5 -0
  179. package/dist/lib/cache/getLazyHashedEtag.d.ts +35 -0
  180. package/dist/lib/cache/mergeEtags.d.ts +17 -0
  181. package/dist/loader-runner/LoaderLoadingError.d.ts +13 -0
  182. package/dist/loader-runner/index.d.ts +40 -0
  183. package/dist/loader-runner/loadLoader.d.ts +11 -0
  184. package/dist/logging/Logger.d.ts +61 -0
  185. package/dist/logging/createConsoleLogger.d.ts +35 -0
  186. package/dist/logging/truncateArgs.d.ts +16 -0
  187. package/dist/moduleFederationDefaultRuntime.js +1 -0
  188. package/dist/node/NodeEnvironmentPlugin.d.ts +10 -0
  189. package/dist/node/NodeTemplatePlugin.d.ts +18 -0
  190. package/dist/node/NodeWatchFileSystem.d.ts +18 -0
  191. package/dist/node/nodeConsole.d.ts +15 -0
  192. package/dist/rspack.d.ts +16 -0
  193. package/dist/rspackOptionsApply.d.ts +4 -0
  194. package/dist/runtime/cssExtractHmr.d.ts +4 -0
  195. package/dist/runtime/moduleFederationDefaultRuntime.d.ts +2 -0
  196. package/dist/sharing/ConsumeSharedPlugin.d.ts +41 -0
  197. package/dist/sharing/ProvideSharedPlugin.d.ts +34 -0
  198. package/dist/sharing/SharePlugin.d.ts +51 -0
  199. package/dist/sharing/ShareRuntimePlugin.d.ts +9 -0
  200. package/dist/sharing/utils.d.ts +1 -0
  201. package/dist/stats/DefaultStatsFactoryPlugin.d.ts +4 -0
  202. package/dist/stats/DefaultStatsPresetPlugin.d.ts +4 -0
  203. package/dist/stats/DefaultStatsPrinterPlugin.d.ts +13 -0
  204. package/dist/stats/StatsFactory.d.ts +57 -0
  205. package/dist/stats/StatsPrinter.d.ts +57 -0
  206. package/dist/stats/statsFactoryUtils.d.ts +295 -0
  207. package/dist/util/ArrayQueue.d.ts +45 -0
  208. package/dist/util/AssetInfo.d.ts +7 -0
  209. package/dist/util/MergeCaller.d.ts +9 -0
  210. package/dist/util/SizeFormatHelpers.d.ts +10 -0
  211. package/dist/util/SplitChunkSize.d.ts +5 -0
  212. package/dist/util/assertNotNil.d.ts +1 -0
  213. package/dist/util/assetCondition.d.ts +2 -0
  214. package/dist/util/asyncLib.d.ts +54 -0
  215. package/dist/util/bindingVersionCheck.d.ts +5 -0
  216. package/dist/util/cleverMerge.d.ts +54 -0
  217. package/dist/util/comparators.d.ts +20 -0
  218. package/dist/util/createHash.d.ts +16 -0
  219. package/dist/util/createReadonlyMap.d.ts +1 -0
  220. package/dist/util/fake.d.ts +9 -0
  221. package/dist/util/fs.d.ts +342 -0
  222. package/dist/util/hash/BatchedHash.d.ts +29 -0
  223. package/dist/util/hash/index.d.ts +17 -0
  224. package/dist/util/hash/md4.d.ts +11 -0
  225. package/dist/util/hash/wasm-hash.d.ts +52 -0
  226. package/dist/util/hash/xxhash64.d.ts +11 -0
  227. package/dist/util/identifier.d.ts +79 -0
  228. package/dist/util/index.d.ts +19 -0
  229. package/dist/util/memoize.d.ts +3 -0
  230. package/dist/util/smartGrouping.d.ts +21 -0
  231. package/dist/util/source.d.ts +7 -0
  232. package/dist/util/validate.d.ts +6 -0
  233. package/hot/dev-server.js +75 -0
  234. package/hot/emitter.js +21 -0
  235. package/hot/lazy-compilation-node.js +50 -0
  236. package/hot/lazy-compilation-web.js +83 -0
  237. package/hot/log-apply-result.js +49 -0
  238. package/hot/log.js +79 -0
  239. package/hot/only-dev-server.js +103 -0
  240. package/hot/poll.js +40 -0
  241. package/hot/signal.js +66 -0
  242. package/module.d.ts +244 -0
  243. package/package.json +55 -0
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const AsyncWebAssemblyModulesPlugin: {
3
+ new (): {
4
+ name: BuiltinPluginName;
5
+ _args: [];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,40 @@
1
+ import { BuiltinPluginName, type JsChunk } from "@rspack/binding";
2
+ export type Rule = string | RegExp;
3
+ export type Rules = Rule[] | Rule;
4
+ export type BannerFunction = (args: {
5
+ hash: string;
6
+ chunk: JsChunk;
7
+ filename: string;
8
+ }) => string;
9
+ export type BannerContent = string | BannerFunction;
10
+ export type BannerPluginOptions = {
11
+ /** Specifies the banner, it will be wrapped in a comment. */
12
+ banner: BannerContent;
13
+ /** If true, the banner will only be added to the entry chunks. */
14
+ entryOnly?: boolean;
15
+ /** Exclude all modules matching any of these conditions. */
16
+ exclude?: Rules;
17
+ /** Include all modules matching any of these conditions. */
18
+ include?: Rules;
19
+ /** If true, banner will not be wrapped in a comment. */
20
+ raw?: boolean;
21
+ /** If true, banner will be placed at the end of the output. */
22
+ footer?: boolean;
23
+ /**
24
+ * The stage of the compilation in which the banner should be injected.
25
+ * @default PROCESS_ASSETS_STAGE_ADDITIONS (-100)
26
+ */
27
+ stage?: number;
28
+ /** Include all modules that pass test assertion. */
29
+ test?: Rules;
30
+ };
31
+ export type BannerPluginArgument = BannerContent | BannerPluginOptions;
32
+ export declare const BannerPlugin: {
33
+ new (args: BannerPluginArgument): {
34
+ name: BuiltinPluginName;
35
+ _args: [args: BannerPluginArgument];
36
+ 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;
37
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
38
+ apply(compiler: import("..").Compiler): void;
39
+ };
40
+ };
@@ -0,0 +1,15 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export type BundleInfoOptions = {
3
+ version?: string;
4
+ bundler?: string;
5
+ force?: boolean | string[];
6
+ };
7
+ export declare const BundlerInfoRspackPlugin: {
8
+ new (options: BundleInfoOptions): {
9
+ name: BuiltinPluginName;
10
+ _args: [options: BundleInfoOptions];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
13
+ apply(compiler: import("..").Compiler): void;
14
+ };
15
+ };
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const ChunkPrefetchPreloadPlugin: {
3
+ new (): {
4
+ name: BuiltinPluginName;
5
+ _args: [];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const CommonJsChunkFormatPlugin: {
3
+ new (): {
4
+ name: BuiltinPluginName;
5
+ _args: [];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const ContextReplacementPlugin: {
3
+ new (resourceRegExp: RegExp, newContentResource?: any, newContentRecursive?: any, newContentRegExp?: any): {
4
+ name: BuiltinPluginName;
5
+ _args: [resourceRegExp: RegExp, newContentResource?: any, newContentRecursive?: any, newContentRegExp?: any];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,15 @@
1
+ import { BuiltinPluginName, type RawCopyPattern } from "@rspack/binding";
2
+ export type CopyRspackPluginOptions = {
3
+ patterns: (string | ({
4
+ from: string;
5
+ } & Partial<RawCopyPattern>))[];
6
+ };
7
+ export declare const CopyRspackPlugin: {
8
+ new (copy: CopyRspackPluginOptions): {
9
+ name: BuiltinPluginName;
10
+ _args: [copy: CopyRspackPluginOptions];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
13
+ apply(compiler: import("..").Compiler): void;
14
+ };
15
+ };
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const CssModulesPlugin: {
3
+ new (): {
4
+ name: BuiltinPluginName;
5
+ _args: [];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const DataUriPlugin: {
3
+ new (): {
4
+ name: BuiltinPluginName;
5
+ _args: [];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,17 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export type DefinePluginOptions = Record<string, CodeValue>;
3
+ export declare const DefinePlugin: {
4
+ new (define: DefinePluginOptions): {
5
+ name: BuiltinPluginName;
6
+ _args: [define: DefinePluginOptions];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
9
+ apply(compiler: import("..").Compiler): void;
10
+ };
11
+ };
12
+ type CodeValue = RecursiveArrayOrRecord<CodeValuePrimitive>;
13
+ type CodeValuePrimitive = null | undefined | RegExp | Function | string | number | boolean | bigint | undefined;
14
+ type RecursiveArrayOrRecord<T> = {
15
+ [index: string]: RecursiveArrayOrRecord<T>;
16
+ } | Array<RecursiveArrayOrRecord<T>> | T;
17
+ export {};
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const DeterministicChunkIdsPlugin: {
3
+ new (): {
4
+ name: BuiltinPluginName;
5
+ _args: [];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,8 @@
1
+ import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
2
+ import type { Compiler } from "../Compiler";
3
+ import { RspackBuiltinPlugin } from "./base";
4
+ export declare class DeterministicModuleIdsPlugin extends RspackBuiltinPlugin {
5
+ name: BuiltinPluginName;
6
+ affectedHooks: "compilation";
7
+ raw(compiler: Compiler): BuiltinPlugin;
8
+ }
@@ -0,0 +1,13 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export type DllEntryPluginOptions = {
3
+ name: string;
4
+ };
5
+ export declare const DllEntryPlugin: {
6
+ new (context: string, entries: string[], options: DllEntryPluginOptions): {
7
+ name: BuiltinPluginName;
8
+ _args: [context: string, entries: string[], options: DllEntryPluginOptions];
9
+ 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;
10
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
11
+ apply(compiler: import("..").Compiler): void;
12
+ };
13
+ };
@@ -0,0 +1,11 @@
1
+ import { BuiltinPluginName, type RawDllReferenceAgencyPluginOptions } from "@rspack/binding";
2
+ export type DllReferenceAgencyPluginOptions = RawDllReferenceAgencyPluginOptions;
3
+ export declare const DllReferenceAgencyPlugin: {
4
+ new (options: RawDllReferenceAgencyPluginOptions): {
5
+ name: BuiltinPluginName;
6
+ _args: [options: RawDllReferenceAgencyPluginOptions];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
9
+ apply(compiler: import("..").Compiler): void;
10
+ };
11
+ };
@@ -0,0 +1,12 @@
1
+ import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
2
+ import type { Compiler } from "../Compiler";
3
+ import type { EntryDynamicNormalized } from "../config";
4
+ import { RspackBuiltinPlugin } from "./base";
5
+ export declare class DynamicEntryPlugin extends RspackBuiltinPlugin {
6
+ private context;
7
+ private entry;
8
+ name: BuiltinPluginName;
9
+ affectedHooks: "make";
10
+ constructor(context: string, entry: EntryDynamicNormalized);
11
+ raw(compiler: Compiler): BuiltinPlugin | undefined;
12
+ }
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const ElectronTargetPlugin: {
3
+ new (context?: string | undefined): {
4
+ name: BuiltinPluginName;
5
+ _args: [context?: string | 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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const EnableChunkLoadingPlugin: {
3
+ new (type: string): {
4
+ name: BuiltinPluginName;
5
+ _args: [type: string];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,11 @@
1
+ import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
2
+ import type { Compiler, LibraryType } from "..";
3
+ import { RspackBuiltinPlugin } from "./base";
4
+ export declare class EnableLibraryPlugin extends RspackBuiltinPlugin {
5
+ private type;
6
+ name: BuiltinPluginName;
7
+ constructor(type: LibraryType);
8
+ static setEnabled(compiler: Compiler, type: LibraryType): void;
9
+ static checkEnabled(compiler: Compiler, type: LibraryType): void;
10
+ raw(compiler: Compiler): BuiltinPlugin | undefined;
11
+ }
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const EnableWasmLoadingPlugin: {
3
+ new (type: string): {
4
+ name: BuiltinPluginName;
5
+ _args: [type: string];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const EnsureChunkConditionsPlugin: {
3
+ new (): {
4
+ name: BuiltinPluginName;
5
+ _args: [];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,27 @@
1
+ import { BuiltinPluginName, type JsEntryOptions } from "@rspack/binding";
2
+ import { type EntryDescriptionNormalized } from "../config";
3
+ /**
4
+ * Options for the `EntryPlugin`.
5
+ */
6
+ export type EntryOptions = Omit<EntryDescriptionNormalized, "import"> & {
7
+ /**
8
+ * The name of the entry chunk.
9
+ */
10
+ name?: string;
11
+ };
12
+ /**
13
+ * The entry plugin that will handle creation of the `EntryDependency`.
14
+ * It adds an entry chunk on compilation. The chunk is named `options.name` and
15
+ * contains only one module (plus dependencies). The module is resolved from
16
+ * `entry` in `context` (absolute path).
17
+ */
18
+ export declare const EntryPlugin: {
19
+ new (context: string, entry: string, options?: string | EntryOptions | undefined): {
20
+ name: BuiltinPluginName;
21
+ _args: [context: string, entry: string, options?: string | EntryOptions | undefined];
22
+ 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;
23
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
24
+ apply(compiler: import("..").Compiler): void;
25
+ };
26
+ };
27
+ export declare function getRawEntryOptions(entry: EntryOptions): JsEntryOptions;
@@ -0,0 +1,11 @@
1
+ import { BuiltinPluginName, type RawEvalDevToolModulePluginOptions } from "@rspack/binding";
2
+ export type { RawEvalDevToolModulePluginOptions as EvalDevToolModulePluginOptions };
3
+ export declare const EvalDevToolModulePlugin: {
4
+ new (options: RawEvalDevToolModulePluginOptions): {
5
+ name: BuiltinPluginName;
6
+ _args: [options: RawEvalDevToolModulePluginOptions];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
9
+ apply(compiler: import("..").Compiler): void;
10
+ };
11
+ };
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName, type RawSourceMapDevToolPluginOptions } from "@rspack/binding";
2
+ export declare const EvalSourceMapDevToolPlugin: {
3
+ new (options: RawSourceMapDevToolPluginOptions): {
4
+ name: BuiltinPluginName;
5
+ _args: [options: RawSourceMapDevToolPluginOptions];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,10 @@
1
+ import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
2
+ import type { Compiler, Externals } from "..";
3
+ import { RspackBuiltinPlugin } from "./base";
4
+ export declare class ExternalsPlugin extends RspackBuiltinPlugin {
5
+ private type;
6
+ private externals;
7
+ name: BuiltinPluginName;
8
+ constructor(type: string, externals: Externals);
9
+ raw(compiler: Compiler): BuiltinPlugin | undefined;
10
+ }
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const FetchCompileAsyncWasmPlugin: {
3
+ new (): {
4
+ name: BuiltinPluginName;
5
+ _args: [];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const FileUriPlugin: {
3
+ new (): {
4
+ name: BuiltinPluginName;
5
+ _args: [];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const FlagAllModulesAsUsedPlugin: {
3
+ new (explanation: string): {
4
+ name: BuiltinPluginName;
5
+ _args: [explanation: string];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const FlagDependencyExportsPlugin: {
3
+ new (): {
4
+ name: BuiltinPluginName;
5
+ _args: [];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,10 @@
1
+ import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
2
+ import type { Compiler } from "../Compiler";
3
+ import { RspackBuiltinPlugin } from "./base";
4
+ export declare class FlagDependencyUsagePlugin extends RspackBuiltinPlugin {
5
+ private global;
6
+ name: BuiltinPluginName;
7
+ affectedHooks: "compilation";
8
+ constructor(global: boolean);
9
+ raw(compiler: Compiler): BuiltinPlugin;
10
+ }
@@ -0,0 +1,7 @@
1
+ import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
2
+ import type { Compiler } from "../Compiler";
3
+ import { RspackBuiltinPlugin } from "./base";
4
+ export declare class HotModuleReplacementPlugin extends RspackBuiltinPlugin {
5
+ name: BuiltinPluginName;
6
+ raw(compiler: Compiler): BuiltinPlugin;
7
+ }
@@ -0,0 +1,112 @@
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";
5
+ export type TemplateRenderFunction = (params: Record<string, any>) => string | Promise<string>;
6
+ export type TemplateParamFunction = (params: Record<string, any>) => Record<string, any> | Promise<Record<string, any>>;
7
+ export type HtmlRspackPluginOptions = {
8
+ /** The title to use for the generated HTML document. */
9
+ title?: string;
10
+ /**
11
+ * The file to write the HTML to. You can specify a subdirectory here too (eg: pages/index.html).
12
+ * @default 'index.html'
13
+ */
14
+ filename?: string | ((entry: string) => string);
15
+ /** The template file path. */
16
+ template?: string;
17
+ /**
18
+ * The template file content, priority is greater than template.
19
+ * When using a function, pass in the template parameters and use the returned string as the template content.
20
+ */
21
+ templateContent?: string | TemplateRenderFunction;
22
+ /**
23
+ * Allows to overwrite the parameters used in the template.
24
+ * When using a function, pass in the original template parameters and use the returned object as the final template parameters.
25
+ */
26
+ templateParameters?: Record<string, string> | boolean | TemplateParamFunction;
27
+ /**
28
+ * The script and link tag inject position in template. Use false to not inject.
29
+ * If not specified, it will be automatically determined based on scriptLoading.
30
+ */
31
+ inject?: boolean | "head" | "body";
32
+ /** The publicPath used for script and link tags. */
33
+ publicPath?: string;
34
+ /** Inject a [base](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base) tag */
35
+ base?: string | {
36
+ href?: string;
37
+ target?: "_self" | "_blank" | "_parent" | "_top";
38
+ };
39
+ /**
40
+ * Modern browsers support non blocking javascript loading ('defer') to improve the page startup performance.
41
+ * Setting to 'module' adds attribute type='module'.
42
+ * This also implies 'defer', since modules are automatically deferred.
43
+ * @default 'defer'
44
+ * */
45
+ scriptLoading?: "blocking" | "defer" | "module" | "systemjs-module";
46
+ /** Allows you to add only some chunks. */
47
+ chunks?: string[];
48
+ /** Allows you to skip some chunks. */
49
+ excludeChunks?: string[];
50
+ /** Allows to control how chunks should be sorted before they are included to the HTML. */
51
+ chunksSortMode?: "auto" | "manual";
52
+ /** The sri hash algorithm, disabled by default. */
53
+ sri?: "sha256" | "sha384" | "sha512";
54
+ /**
55
+ * Controls whether to minify the output.
56
+ * @default false
57
+ */
58
+ minify?: boolean;
59
+ /** Adds the given favicon path to the output HTML. */
60
+ favicon?: string;
61
+ /**
62
+ * If true then append a unique rspack compilation hash to all included scripts and CSS files.
63
+ * This is useful for cache busting
64
+ * @default false
65
+ * */
66
+ meta?: Record<string, string | Record<string, string>>;
67
+ /** Inject a base tag */
68
+ hash?: boolean;
69
+ };
70
+ declare const HtmlRspackPluginImpl: {
71
+ new (c?: HtmlRspackPluginOptions | undefined): {
72
+ name: BuiltinPluginName;
73
+ _args: [c?: HtmlRspackPluginOptions | undefined];
74
+ 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;
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 };
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const HttpExternalsRspackPlugin: {
3
+ new (css: boolean, webAsync: boolean): {
4
+ name: BuiltinPluginName;
5
+ _args: [css: boolean, webAsync: boolean];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,19 @@
1
+ import { BuiltinPluginName, type RawIgnorePluginOptions } from "@rspack/binding";
2
+ export type IgnorePluginOptions = {
3
+ /** A RegExp to test the resource against. */
4
+ resourceRegExp: NonNullable<RawIgnorePluginOptions["resourceRegExp"]>;
5
+ /** A RegExp to test the context (directory) against. */
6
+ contextRegExp?: RawIgnorePluginOptions["contextRegExp"];
7
+ } | {
8
+ /** A Filter function that receives `resource` and `context` as arguments, must return boolean. */
9
+ checkResource: NonNullable<RawIgnorePluginOptions["checkResource"]>;
10
+ };
11
+ export declare const IgnorePlugin: {
12
+ new (options: IgnorePluginOptions): {
13
+ name: BuiltinPluginName;
14
+ _args: [options: IgnorePluginOptions];
15
+ 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;
16
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
17
+ apply(compiler: import("..").Compiler): void;
18
+ };
19
+ };
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const InferAsyncModulesPlugin: {
3
+ new (): {
4
+ name: BuiltinPluginName;
5
+ _args: [];
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
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,15 @@
1
+ import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
2
+ import * as liteTapable from "@rspack/lite-tapable";
3
+ import type { Chunk } from "../Chunk";
4
+ import { Compilation } from "../Compilation";
5
+ import type Hash from "../util/hash";
6
+ import { RspackBuiltinPlugin } from "./base";
7
+ export type CompilationHooks = {
8
+ chunkHash: liteTapable.SyncHook<[Chunk, Hash]>;
9
+ };
10
+ export declare class JavascriptModulesPlugin extends RspackBuiltinPlugin {
11
+ name: BuiltinPluginName;
12
+ affectedHooks: "compilation";
13
+ raw(): BuiltinPlugin;
14
+ static getCompilationHooks(compilation: Compilation): CompilationHooks;
15
+ }