Skip to content

Commit 64f2406

Browse files
authored
fix: use getCompilationHooks of HTML plugin (#3750)
1 parent 87a3918 commit 64f2406

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"dotenv": "16.4.5",
7474
"dotenv-expand": "11.0.6",
7575
"fs-extra": "^11.2.0",
76-
"html-rspack-plugin": "6.0.1",
76+
"html-rspack-plugin": "6.0.2",
7777
"http-proxy-middleware": "^2.0.6",
7878
"jiti": "^1.21.6",
7979
"launch-editor-middleware": "^2.9.1",

packages/core/src/rspack/RsbuildHtmlPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ export class RsbuildHtmlPlugin {
310310

311311
compiler.hooks.compilation.tap(this.name, (compilation: Compilation) => {
312312
getHTMLPlugin()
313-
.getHooks(compilation)
313+
.getCompilationHooks(compilation)
314314
.alterAssetTagGroups.tapPromise(this.name, async (data) => {
315315
const entryName = data.plugin.options?.entryName;
316316

packages/core/src/rspack/preload/HtmlPreloadOrPrefetchPlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export class HtmlPreloadOrPrefetchPlugin implements RspackPluginInstance {
189189
apply(compiler: Compiler): void {
190190
compiler.hooks.compilation.tap(this.constructor.name, (compilation) => {
191191
getHTMLPlugin()
192-
.getHooks(compilation)
192+
.getCompilationHooks(compilation)
193193
.beforeAssetTagGeneration.tap(
194194
`HTML${upperFirst(this.type)}Plugin`,
195195
(htmlPluginData) => {
@@ -206,7 +206,7 @@ export class HtmlPreloadOrPrefetchPlugin implements RspackPluginInstance {
206206
);
207207

208208
getHTMLPlugin()
209-
.getHooks(compilation)
209+
.getCompilationHooks(compilation)
210210
.alterAssetTags.tap(
211211
`HTML${upperFirst(this.type)}Plugin`,
212212
(htmlPluginData) => {

pnpm-lock.yaml

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)