@ohos-ports/rsbuild-core 1.7.2-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 (279) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +27 -0
  3. package/bin/rsbuild.js +20 -0
  4. package/compiled/@jridgewell/remapping/index.d.ts +1 -0
  5. package/compiled/@jridgewell/remapping/index.js +1222 -0
  6. package/compiled/@jridgewell/remapping/license +19 -0
  7. package/compiled/@jridgewell/remapping/package.json +1 -0
  8. package/compiled/@jridgewell/trace-mapping/index.d.ts +194 -0
  9. package/compiled/@jridgewell/trace-mapping/index.js +1408 -0
  10. package/compiled/@jridgewell/trace-mapping/license +19 -0
  11. package/compiled/@jridgewell/trace-mapping/package.json +1 -0
  12. package/compiled/chokidar/index.d.ts +384 -0
  13. package/compiled/chokidar/index.js +1793 -0
  14. package/compiled/chokidar/license +21 -0
  15. package/compiled/chokidar/package.json +1 -0
  16. package/compiled/connect/index.d.ts +90 -0
  17. package/compiled/connect/index.js +1240 -0
  18. package/compiled/connect/license +25 -0
  19. package/compiled/connect/package.json +1 -0
  20. package/compiled/cors/index.d.ts +56 -0
  21. package/compiled/cors/index.js +371 -0
  22. package/compiled/cors/license +22 -0
  23. package/compiled/cors/package.json +1 -0
  24. package/compiled/css-loader/api.js +85 -0
  25. package/compiled/css-loader/getUrl.js +26 -0
  26. package/compiled/css-loader/index.d.ts +1 -0
  27. package/compiled/css-loader/index.js +2 -0
  28. package/compiled/css-loader/license +20 -0
  29. package/compiled/css-loader/noSourceMaps.js +5 -0
  30. package/compiled/css-loader/package.json +1 -0
  31. package/compiled/css-loader/sourceMaps.js +16 -0
  32. package/compiled/html-rspack-plugin/default_index.ejs +9 -0
  33. package/compiled/html-rspack-plugin/index.d.ts +290 -0
  34. package/compiled/html-rspack-plugin/index.js +1602 -0
  35. package/compiled/html-rspack-plugin/license +20 -0
  36. package/compiled/html-rspack-plugin/loader.js +166 -0
  37. package/compiled/html-rspack-plugin/package.json +1 -0
  38. package/compiled/http-proxy-middleware/index.d.ts +319 -0
  39. package/compiled/http-proxy-middleware/index.js +5284 -0
  40. package/compiled/http-proxy-middleware/license +22 -0
  41. package/compiled/http-proxy-middleware/package.json +1 -0
  42. package/compiled/launch-editor-middleware/index.d.ts +1 -0
  43. package/compiled/launch-editor-middleware/index.js +719 -0
  44. package/compiled/launch-editor-middleware/license +21 -0
  45. package/compiled/launch-editor-middleware/package.json +1 -0
  46. package/compiled/memfs/index.d.ts +1462 -0
  47. package/compiled/memfs/index.js +1 -0
  48. package/compiled/memfs/license +201 -0
  49. package/compiled/memfs/package.json +1 -0
  50. package/compiled/mrmime/index.d.ts +4 -0
  51. package/compiled/mrmime/index.js +456 -0
  52. package/compiled/mrmime/package.json +1 -0
  53. package/compiled/picocolors/index.d.ts +55 -0
  54. package/compiled/picocolors/index.js +108 -0
  55. package/compiled/picocolors/license +15 -0
  56. package/compiled/picocolors/package.json +1 -0
  57. package/compiled/postcss/index.js +1 -0
  58. package/compiled/postcss/lib/at-rule.d.ts +140 -0
  59. package/compiled/postcss/lib/comment.d.ts +68 -0
  60. package/compiled/postcss/lib/container.d.ts +483 -0
  61. package/compiled/postcss/lib/css-syntax-error.d.ts +248 -0
  62. package/compiled/postcss/lib/declaration.d.ts +151 -0
  63. package/compiled/postcss/lib/document.d.ts +69 -0
  64. package/compiled/postcss/lib/fromJSON.d.ts +9 -0
  65. package/compiled/postcss/lib/input.d.ts +227 -0
  66. package/compiled/postcss/lib/lazy-result.d.ts +190 -0
  67. package/compiled/postcss/lib/list.d.ts +60 -0
  68. package/compiled/postcss/lib/no-work-result.d.ts +46 -0
  69. package/compiled/postcss/lib/node.d.ts +556 -0
  70. package/compiled/postcss/lib/parse.d.ts +9 -0
  71. package/compiled/postcss/lib/postcss.d.ts +458 -0
  72. package/compiled/postcss/lib/previous-map.d.ts +81 -0
  73. package/compiled/postcss/lib/processor.d.ts +115 -0
  74. package/compiled/postcss/lib/result.d.ts +205 -0
  75. package/compiled/postcss/lib/root.d.ts +87 -0
  76. package/compiled/postcss/lib/rule.d.ts +126 -0
  77. package/compiled/postcss/lib/source-map-js.d.ts +4 -0
  78. package/compiled/postcss/lib/stringifier.d.ts +46 -0
  79. package/compiled/postcss/lib/stringify.d.ts +9 -0
  80. package/compiled/postcss/lib/warning.d.ts +147 -0
  81. package/compiled/postcss/license +20 -0
  82. package/compiled/postcss/package.json +1 -0
  83. package/compiled/postcss-loader/index.d.ts +1 -0
  84. package/compiled/postcss-loader/index.js +720 -0
  85. package/compiled/postcss-loader/license +20 -0
  86. package/compiled/postcss-loader/package.json +1 -0
  87. package/compiled/rslog/index.d.ts +67 -0
  88. package/compiled/rslog/license +21 -0
  89. package/compiled/rslog/package.json +1 -0
  90. package/compiled/rspack-chain/license +22 -0
  91. package/compiled/rspack-chain/package.json +1 -0
  92. package/compiled/rspack-chain/types/index.d.ts +545 -0
  93. package/compiled/rspack-manifest-plugin/index.d.ts +48 -0
  94. package/compiled/rspack-manifest-plugin/index.js +409 -0
  95. package/compiled/rspack-manifest-plugin/license +21 -0
  96. package/compiled/rspack-manifest-plugin/package.json +1 -0
  97. package/compiled/sirv/index.d.ts +1 -0
  98. package/compiled/sirv/index.js +274 -0
  99. package/compiled/sirv/package.json +1 -0
  100. package/compiled/style-loader/index.d.ts +1 -0
  101. package/compiled/style-loader/index.js +427 -0
  102. package/compiled/style-loader/license +20 -0
  103. package/compiled/style-loader/package.json +1 -0
  104. package/compiled/style-loader/runtime/injectStylesIntoLinkTag.js +29 -0
  105. package/compiled/style-loader/runtime/injectStylesIntoStyleTag.js +84 -0
  106. package/compiled/style-loader/runtime/insertBySelector.js +34 -0
  107. package/compiled/style-loader/runtime/insertStyleElement.js +10 -0
  108. package/compiled/style-loader/runtime/isEqualLocals.js +28 -0
  109. package/compiled/style-loader/runtime/isOldIE.js +17 -0
  110. package/compiled/style-loader/runtime/setAttributesWithAttributes.js +13 -0
  111. package/compiled/style-loader/runtime/setAttributesWithAttributesAndNonce.js +9 -0
  112. package/compiled/style-loader/runtime/setAttributesWithoutAttributes.js +10 -0
  113. package/compiled/style-loader/runtime/singletonStyleDomAPI.js +86 -0
  114. package/compiled/style-loader/runtime/styleDomAPI.js +61 -0
  115. package/compiled/style-loader/runtime/styleTagTransform.js +14 -0
  116. package/compiled/tinyglobby/index.d.ts +46 -0
  117. package/compiled/tinyglobby/index.js +2664 -0
  118. package/compiled/tinyglobby/license +21 -0
  119. package/compiled/tinyglobby/package.json +1 -0
  120. package/compiled/webpack-bundle-analyzer/index.d.ts +160 -0
  121. package/compiled/webpack-bundle-analyzer/index.js +23 -0
  122. package/compiled/webpack-bundle-analyzer/license +20 -0
  123. package/compiled/webpack-bundle-analyzer/package.json +1 -0
  124. package/compiled/webpack-bundle-analyzer/public/viewer.js +16 -0
  125. package/compiled/webpack-bundle-analyzer/public/viewer.js.LICENSE.txt +10 -0
  126. package/compiled/webpack-merge/index.d.ts +31 -0
  127. package/compiled/webpack-merge/index.js +1200 -0
  128. package/compiled/webpack-merge/license +20 -0
  129. package/compiled/webpack-merge/package.json +1 -0
  130. package/compiled/ws/index.d.ts +437 -0
  131. package/compiled/ws/index.js +3161 -0
  132. package/compiled/ws/license +20 -0
  133. package/compiled/ws/package.json +1 -0
  134. package/dist/0~open.js +427 -0
  135. package/dist/0~range-parser.js +49 -0
  136. package/dist/0~range-parser.js.LICENSE.txt +6 -0
  137. package/dist/131.js +9305 -0
  138. package/dist/131.js.LICENSE.txt +26 -0
  139. package/dist/136.mjs +42 -0
  140. package/dist/2~open.cjs +436 -0
  141. package/dist/2~range-parser.cjs +52 -0
  142. package/dist/2~range-parser.cjs.LICENSE.txt +6 -0
  143. package/dist/client/59.js +22 -0
  144. package/dist/client/hmr.js +206 -0
  145. package/dist/client/overlay.js +203 -0
  146. package/dist/ignoreCssLoader.mjs +3 -0
  147. package/dist/index.cjs +9456 -0
  148. package/dist/index.cjs.LICENSE.txt +26 -0
  149. package/dist/index.js +1 -0
  150. package/dist/rslib-runtime.js +44 -0
  151. package/dist/transformLoader.mjs +1 -0
  152. package/dist/transformRawLoader.mjs +4 -0
  153. package/dist-types/cli/commands.d.ts +28 -0
  154. package/dist-types/cli/index.d.ts +1 -0
  155. package/dist-types/cli/init.d.ts +7 -0
  156. package/dist-types/client/hmr.d.ts +3 -0
  157. package/dist-types/client/log.d.ts +13 -0
  158. package/dist-types/client/overlay.d.ts +1 -0
  159. package/dist-types/configChain.d.ts +154 -0
  160. package/dist-types/constants.d.ts +52 -0
  161. package/dist-types/createContext.d.ts +11 -0
  162. package/dist-types/createRsbuild.d.ts +5 -0
  163. package/dist-types/defaultConfig.d.ts +25 -0
  164. package/dist-types/helpers/compiler.d.ts +5 -0
  165. package/dist-types/helpers/exitHook.d.ts +3 -0
  166. package/dist-types/helpers/format.d.ts +2 -0
  167. package/dist-types/helpers/fs.d.ts +17 -0
  168. package/dist-types/helpers/index.d.ts +29 -0
  169. package/dist-types/helpers/path.d.ts +26 -0
  170. package/dist-types/helpers/stats.d.ts +18 -0
  171. package/dist-types/helpers/url.d.ts +11 -0
  172. package/dist-types/helpers/vendors.d.ts +29 -0
  173. package/dist-types/helpers/version.d.ts +7 -0
  174. package/dist-types/hooks.d.ts +44 -0
  175. package/dist-types/index.d.ts +22 -0
  176. package/dist-types/initPlugins.d.ts +6 -0
  177. package/dist-types/inspectConfig.d.ts +35 -0
  178. package/dist-types/loadConfig.d.ts +60 -0
  179. package/dist-types/loadEnv.d.ts +63 -0
  180. package/dist-types/loader/ignoreCssLoader.d.ts +3 -0
  181. package/dist-types/loader/transformLoader.d.ts +8 -0
  182. package/dist-types/loader/transformRawLoader.d.ts +3 -0
  183. package/dist-types/logger.d.ts +19 -0
  184. package/dist-types/mergeConfig.d.ts +2 -0
  185. package/dist-types/package.json +1 -0
  186. package/dist-types/pluginHelper.d.ts +12 -0
  187. package/dist-types/pluginManager.d.ts +21 -0
  188. package/dist-types/plugins/appIcon.d.ts +2 -0
  189. package/dist-types/plugins/asset.d.ts +3 -0
  190. package/dist-types/plugins/basic.d.ts +5 -0
  191. package/dist-types/plugins/bundleAnalyzer.d.ts +2 -0
  192. package/dist-types/plugins/cache.d.ts +2 -0
  193. package/dist-types/plugins/cleanOutput.d.ts +2 -0
  194. package/dist-types/plugins/css.d.ts +4 -0
  195. package/dist-types/plugins/define.d.ts +2 -0
  196. package/dist-types/plugins/entry.d.ts +2 -0
  197. package/dist-types/plugins/esm.d.ts +2 -0
  198. package/dist-types/plugins/externals.d.ts +2 -0
  199. package/dist-types/plugins/fileSize.d.ts +6 -0
  200. package/dist-types/plugins/html.d.ts +9 -0
  201. package/dist-types/plugins/inlineChunk.d.ts +6 -0
  202. package/dist-types/plugins/lazyCompilation.d.ts +2 -0
  203. package/dist-types/plugins/manifest.d.ts +2 -0
  204. package/dist-types/plugins/minimize.d.ts +10 -0
  205. package/dist-types/plugins/moduleFederation.d.ts +2 -0
  206. package/dist-types/plugins/moment.d.ts +2 -0
  207. package/dist-types/plugins/nodeAddons.d.ts +2 -0
  208. package/dist-types/plugins/nonce.d.ts +2 -0
  209. package/dist-types/plugins/output.d.ts +2 -0
  210. package/dist-types/plugins/performance.d.ts +5 -0
  211. package/dist-types/plugins/progress.d.ts +2 -0
  212. package/dist-types/plugins/resolve.d.ts +2 -0
  213. package/dist-types/plugins/resourceHints.d.ts +2 -0
  214. package/dist-types/plugins/rsdoctor.d.ts +2 -0
  215. package/dist-types/plugins/rspackProfile.d.ts +2 -0
  216. package/dist-types/plugins/server.d.ts +2 -0
  217. package/dist-types/plugins/sourceMap.d.ts +2 -0
  218. package/dist-types/plugins/splitChunks.d.ts +4 -0
  219. package/dist-types/plugins/sri.d.ts +2 -0
  220. package/dist-types/plugins/swc.d.ts +5 -0
  221. package/dist-types/plugins/target.d.ts +2 -0
  222. package/dist-types/plugins/wasm.d.ts +2 -0
  223. package/dist-types/provider/build.d.ts +4 -0
  224. package/dist-types/provider/createCompiler.d.ts +6 -0
  225. package/dist-types/provider/helpers.d.ts +12 -0
  226. package/dist-types/provider/initConfigs.d.ts +19 -0
  227. package/dist-types/provider/provider.d.ts +2 -0
  228. package/dist-types/provider/rspackConfig.d.ts +8 -0
  229. package/dist-types/restart.d.ts +18 -0
  230. package/dist-types/rspack-plugins/RsbuildHtmlPlugin.d.ts +38 -0
  231. package/dist-types/rspack-plugins/resource-hints/HtmlResourceHintsPlugin.d.ts +32 -0
  232. package/dist-types/rspack-plugins/resource-hints/doesChunkBelongToHtml.d.ts +28 -0
  233. package/dist-types/rspack-plugins/resource-hints/extractChunks.d.ts +23 -0
  234. package/dist-types/rspack-plugins/resource-hints/getResourceType.d.ts +22 -0
  235. package/dist-types/rspack.d.ts +2 -0
  236. package/dist-types/server/ansiHTML.d.ts +4 -0
  237. package/dist-types/server/assets-middleware/getFileFromUrl.d.ts +12 -0
  238. package/dist-types/server/assets-middleware/index.d.ts +37 -0
  239. package/dist-types/server/assets-middleware/middleware.d.ts +2 -0
  240. package/dist-types/server/assets-middleware/parseTokenList.d.ts +1 -0
  241. package/dist-types/server/assets-middleware/setupOutputFileSystem.d.ts +3 -0
  242. package/dist-types/server/assets-middleware/setupWriteToDisk.d.ts +15 -0
  243. package/dist-types/server/browserLogs.d.ts +9 -0
  244. package/dist-types/server/buildManager.d.ts +33 -0
  245. package/dist-types/server/cliShortcuts.d.ts +10 -0
  246. package/dist-types/server/devMiddlewares.d.ts +21 -0
  247. package/dist-types/server/devServer.d.ts +79 -0
  248. package/dist-types/server/environment.d.ts +8 -0
  249. package/dist-types/server/gracefulShutdown.d.ts +10 -0
  250. package/dist-types/server/gzipMiddleware.d.ts +2 -0
  251. package/dist-types/server/helper.d.ts +91 -0
  252. package/dist-types/server/historyApiFallback.d.ts +2 -0
  253. package/dist-types/server/hmrFallback.d.ts +1 -0
  254. package/dist-types/server/httpServer.d.ts +7 -0
  255. package/dist-types/server/middlewares.d.ts +33 -0
  256. package/dist-types/server/open.d.ts +10 -0
  257. package/dist-types/server/overlay.d.ts +3 -0
  258. package/dist-types/server/prodServer.d.ts +24 -0
  259. package/dist-types/server/proxy.d.ts +6 -0
  260. package/dist-types/server/runner/asModule.d.ts +2 -0
  261. package/dist-types/server/runner/basic.d.ts +29 -0
  262. package/dist-types/server/runner/cjs.d.ts +10 -0
  263. package/dist-types/server/runner/esm.d.ts +6 -0
  264. package/dist-types/server/runner/index.d.ts +4 -0
  265. package/dist-types/server/runner/type.d.ts +42 -0
  266. package/dist-types/server/socketServer.d.ts +81 -0
  267. package/dist-types/server/watchFiles.d.ts +14 -0
  268. package/dist-types/types/config.d.ts +1882 -0
  269. package/dist-types/types/context.d.ts +110 -0
  270. package/dist-types/types/hooks.d.ts +275 -0
  271. package/dist-types/types/index.d.ts +8 -0
  272. package/dist-types/types/plugin.d.ts +585 -0
  273. package/dist-types/types/rsbuild.d.ts +286 -0
  274. package/dist-types/types/rspack.d.ts +16 -0
  275. package/dist-types/types/thirdParty.d.ts +186 -0
  276. package/dist-types/types/utils.d.ts +19 -0
  277. package/package.json +114 -0
  278. package/static/openChrome.applescript +95 -0
  279. package/types.d.ts +349 -0
@@ -0,0 +1,290 @@
1
+ import { AsyncSeriesWaterfallHook } from '@rspack/lite-tapable';
2
+ import { Compiler, Compilation } from '@rspack/core';
3
+
4
+ declare class HtmlRspackPlugin {
5
+ constructor(options?: HtmlRspackPlugin.Options);
6
+
7
+ /** Current HtmlRspackPlugin Major */
8
+ version: number;
9
+
10
+ /**
11
+ * Options after html-webpack-plugin has been initialized with defaults
12
+ */
13
+ options?: HtmlRspackPlugin.ProcessedOptions;
14
+
15
+ apply(compiler: Compiler): void;
16
+
17
+ /**
18
+ * @deprecated use `getCompilationHooks` instead
19
+ */
20
+ static getHooks(compilation: Compilation): HtmlRspackPlugin.Hooks;
21
+
22
+ static getCompilationHooks(compilation: Compilation): HtmlRspackPlugin.Hooks;
23
+
24
+ /**
25
+ * Static helper to create a tag object to be get injected into the dom
26
+ */
27
+ static createHtmlTagObject(
28
+ tagName: string,
29
+ attributes?: { [attributeName: string]: string | boolean },
30
+ innerHTML?: string,
31
+ ): HtmlRspackPlugin.HtmlTagObject;
32
+
33
+ static readonly version: number;
34
+ }
35
+
36
+ declare namespace HtmlRspackPlugin {
37
+ interface Options {
38
+ /**
39
+ * Emit the file only if it was changed.
40
+ * @default true
41
+ */
42
+ cache?: boolean;
43
+ /**
44
+ * List all entries which should be injected
45
+ */
46
+ chunks?: 'all' | string[];
47
+ /**
48
+ * Allows to control how chunks should be sorted before they are included to the html.
49
+ * @default 'auto'
50
+ */
51
+ chunksSortMode?:
52
+ | 'auto'
53
+ // `none` is deprecated and an alias for `auto` now.
54
+ | 'none'
55
+ | 'manual'
56
+ | ((entryNameA: string, entryNameB: string) => number);
57
+ /**
58
+ * List all entries which should not be injected
59
+ */
60
+ excludeChunks?: string[];
61
+ /**
62
+ * Path to the favicon icon
63
+ */
64
+ favicon?: false | string;
65
+ /**
66
+ * The file to write the HTML to.
67
+ * Supports subdirectories eg: `assets/admin.html`
68
+ * [name] will be replaced by the entry name
69
+ * Supports a function to generate the name
70
+ *
71
+ * @default 'index.html'
72
+ */
73
+ filename?: string | ((entryName: string) => string);
74
+ /**
75
+ * By default the public path is set to `auto` - that way the html-webpack-plugin will try
76
+ * to set the publicPath according to the current filename and the webpack publicPath setting
77
+ */
78
+ publicPath?: string | 'auto';
79
+ /**
80
+ * If `true` then append a unique `webpack` compilation hash to all included scripts and CSS files.
81
+ * This is useful for cache busting
82
+ */
83
+ hash?: boolean;
84
+ /**
85
+ * Inject all assets into the given `template` or `templateContent`.
86
+ */
87
+ inject?:
88
+ | false // Don't inject scripts
89
+ | true // Inject scripts into body
90
+ | 'body' // Inject scripts into body
91
+ | 'head'; // Inject scripts into head
92
+ /**
93
+ * Set up script loading
94
+ * blocking will result in <script src="..."></script>
95
+ * defer will result in <script defer src="..."></script>
96
+ *
97
+ * @default 'defer'
98
+ */
99
+ scriptLoading?: 'blocking' | 'defer' | 'module' | 'systemjs-module';
100
+ /**
101
+ * Inject meta tags
102
+ */
103
+ meta?:
104
+ | false // Disable injection
105
+ | {
106
+ [name: string]:
107
+ | string
108
+ | false // name content pair e.g. {viewport: 'width=device-width, initial-scale=1, shrink-to-fit=no'}`
109
+ | { [attributeName: string]: string | boolean }; // custom properties e.g. { name:"viewport" content:"width=500, initial-scale=1" }
110
+ };
111
+ /**
112
+ * A function to minify the HTML
113
+ */
114
+ minify?: (html: string) => string | Promise<string>;
115
+ /**
116
+ * Render errors into the HTML page
117
+ */
118
+ showErrors?: boolean;
119
+ /**
120
+ * The `webpack` require path to the template.
121
+ * @see https://github.com/jantimon/html-webpack-plugin/blob/master/docs/template-option.md
122
+ */
123
+ template?: string;
124
+ /**
125
+ * Allow to use a html string instead of reading from a file
126
+ */
127
+ templateContent?:
128
+ | false // Use the template option instead to load a file
129
+ | string
130
+ | ((templateParameters: {
131
+ [option: string]: any;
132
+ }) => string | Promise<string>)
133
+ | Promise<string>;
134
+ /**
135
+ * Allows to overwrite the parameters used in the template
136
+ */
137
+ templateParameters?:
138
+ | false // Pass an empty object to the template function
139
+ | ((
140
+ compilation: Compilation,
141
+ assets: {
142
+ publicPath: string;
143
+ js: Array<string>;
144
+ css: Array<string>;
145
+ favicon?: string;
146
+ },
147
+ assetTags: {
148
+ headTags: HtmlTagObject[];
149
+ bodyTags: HtmlTagObject[];
150
+ },
151
+ options: ProcessedOptions,
152
+ ) => { [option: string]: any } | Promise<{ [option: string]: any }>)
153
+ | { [option: string]: any };
154
+ /**
155
+ * The title to use for the generated HTML document
156
+ */
157
+ title?: string;
158
+ /**
159
+ * Enforce self closing tags e.g. <link />
160
+ */
161
+ xhtml?: boolean;
162
+ /**
163
+ * In addition to the options actually used by this plugin, you can use this hash to pass arbitrary data through
164
+ * to your template.
165
+ */
166
+ [option: string]: any;
167
+ }
168
+
169
+ /**
170
+ * The plugin options after adding default values
171
+ */
172
+ interface ProcessedOptions extends Required<Options> {}
173
+
174
+ /**
175
+ * The values which are available during template execution
176
+ *
177
+ * Please keep in mind that the `templateParameter` options allows to change them
178
+ */
179
+ interface TemplateParameter {
180
+ compilation: Compilation;
181
+ htmlWebpackPlugin: {
182
+ tags: {
183
+ headTags: HtmlTagObject[];
184
+ bodyTags: HtmlTagObject[];
185
+ };
186
+ files: {
187
+ publicPath: string;
188
+ js: Array<string>;
189
+ css: Array<string>;
190
+ favicon?: string;
191
+ };
192
+ options: Options;
193
+ };
194
+ webpackConfig: any;
195
+ }
196
+
197
+ interface AlterAssetTagsData {
198
+ assetTags: {
199
+ scripts: HtmlTagObject[];
200
+ styles: HtmlTagObject[];
201
+ meta: HtmlTagObject[];
202
+ };
203
+ publicPath: string;
204
+ outputName: string;
205
+ plugin: HtmlRspackPlugin;
206
+ }
207
+
208
+ interface AlterAssetTagGroupsData {
209
+ headTags: HtmlTagObject[];
210
+ bodyTags: HtmlTagObject[];
211
+ outputName: string;
212
+ publicPath: string;
213
+ plugin: HtmlRspackPlugin;
214
+ }
215
+
216
+ interface AfterTemplateExecutionData {
217
+ html: string;
218
+ headTags: HtmlTagObject[];
219
+ bodyTags: HtmlTagObject[];
220
+ outputName: string;
221
+ plugin: HtmlRspackPlugin;
222
+ }
223
+
224
+ interface BeforeAssetTagGenerationData {
225
+ assets: {
226
+ publicPath: string;
227
+ js: Array<string>;
228
+ css: Array<string>;
229
+ favicon?: string;
230
+ };
231
+ outputName: string;
232
+ plugin: HtmlRspackPlugin;
233
+ }
234
+
235
+ interface BeforeEmitData {
236
+ html: string;
237
+ outputName: string;
238
+ plugin: HtmlRspackPlugin;
239
+ }
240
+
241
+ interface AfterEmitData {
242
+ outputName: string;
243
+ plugin: HtmlRspackPlugin;
244
+ }
245
+
246
+ interface Hooks {
247
+ alterAssetTags: AsyncSeriesWaterfallHook<AlterAssetTagsData>;
248
+ alterAssetTagGroups: AsyncSeriesWaterfallHook<AlterAssetTagGroupsData>;
249
+ afterTemplateExecution: AsyncSeriesWaterfallHook<AfterTemplateExecutionData>;
250
+ beforeAssetTagGeneration: AsyncSeriesWaterfallHook<BeforeAssetTagGenerationData>;
251
+ beforeEmit: AsyncSeriesWaterfallHook<BeforeEmitData>;
252
+ afterEmit: AsyncSeriesWaterfallHook<AfterEmitData>;
253
+ }
254
+
255
+ /**
256
+ * A tag element according to the htmlWebpackPlugin object notation
257
+ */
258
+ interface HtmlTagObject {
259
+ /**
260
+ * Attributes of the html tag
261
+ * E.g. `{'disabled': true, 'value': 'demo'}`
262
+ */
263
+ attributes: {
264
+ [attributeName: string]: string | boolean | null | undefined;
265
+ };
266
+ /**
267
+ * The tag name e.g. `'div'`
268
+ */
269
+ tagName: string;
270
+ /**
271
+ * The inner HTML
272
+ */
273
+ innerHTML?: string;
274
+ /**
275
+ * Whether this html must not contain innerHTML
276
+ * @see https://www.w3.org/TR/html5/syntax.html#void-elements
277
+ */
278
+ voidTag: boolean;
279
+ /**
280
+ * Meta information about the tag
281
+ * E.g. `{'plugin': 'html-webpack-plugin'}`
282
+ */
283
+ meta: {
284
+ plugin?: string;
285
+ [metaAttributeName: string]: any;
286
+ };
287
+ }
288
+ }
289
+
290
+ export { HtmlRspackPlugin as default };