Skip to content

Commit

Permalink
fix: use getCompilationHooks of HTML plugin (#3750)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Oct 17, 2024
1 parent 87a3918 commit 64f2406
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"dotenv": "16.4.5",
"dotenv-expand": "11.0.6",
"fs-extra": "^11.2.0",
"html-rspack-plugin": "6.0.1",
"html-rspack-plugin": "6.0.2",
"http-proxy-middleware": "^2.0.6",
"jiti": "^1.21.6",
"launch-editor-middleware": "^2.9.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/rspack/RsbuildHtmlPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ export class RsbuildHtmlPlugin {

compiler.hooks.compilation.tap(this.name, (compilation: Compilation) => {
getHTMLPlugin()
.getHooks(compilation)
.getCompilationHooks(compilation)
.alterAssetTagGroups.tapPromise(this.name, async (data) => {
const entryName = data.plugin.options?.entryName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class HtmlPreloadOrPrefetchPlugin implements RspackPluginInstance {
apply(compiler: Compiler): void {
compiler.hooks.compilation.tap(this.constructor.name, (compilation) => {
getHTMLPlugin()
.getHooks(compilation)
.getCompilationHooks(compilation)
.beforeAssetTagGeneration.tap(
`HTML${upperFirst(this.type)}Plugin`,
(htmlPluginData) => {
Expand All @@ -206,7 +206,7 @@ export class HtmlPreloadOrPrefetchPlugin implements RspackPluginInstance {
);

getHTMLPlugin()
.getHooks(compilation)
.getCompilationHooks(compilation)
.alterAssetTags.tap(
`HTML${upperFirst(this.type)}Plugin`,
(htmlPluginData) => {
Expand Down
22 changes: 11 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit 64f2406

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Ran ecosystem CI: Open

suite result
modernjs ❌ failure
plugins ✅ success
rspress ✅ success
rslib ✅ success
examples ✅ success

Please sign in to comment.