File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -581,8 +581,8 @@ HtmlRspackTagsPlugin.prototype.apply = function (compiler) {
581581 } ;
582582
583583 const HtmlWebpackPlugin = htmlPluginName === 'HtmlRspackPlugin' ? webpack . HtmlRspackPlugin : require ( htmlPluginName ) ;
584- if ( HtmlWebpackPlugin . getCompilationHooks ) {
585- const hooks = HtmlWebpackPlugin . getCompilationHooks ( compilation ) ;
584+ if ( HtmlWebpackPlugin . getHooks || HtmlWebpackPlugin . getCompilationHooks ) {
585+ const hooks = ( HtmlWebpackPlugin . getHooks || HtmlWebpackPlugin . getCompilationHooks ) ( compilation ) ;
586586 const htmlPlugins = compilation . options . plugins . filter ( plugin => plugin instanceof HtmlWebpackPlugin ) ;
587587 if ( htmlPlugins . length === 0 ) {
588588 const message = "Error running html-webpack-tags-plugin, are you sure you have html-webpack-plugin before it in your webpack config's plugins?" ;
Original file line number Diff line number Diff line change 4949 },
5050 "homepage" : " https://github.com/rspack-contrib/html-rspack-tags-plugin" ,
5151 "peerDependencies" : {
52- "@rspack/core" : " ^1.0.13"
52+ "@rspack/core" : " ^1.0.13" ,
53+ "html-webpack-plugin" : " ^5.6.0"
54+ },
55+ "peerDependenciesMeta" : {
56+ "html-webpack-plugin" : {
57+ "optional" : true
58+ }
5359 },
5460 "devDependencies" : {
5561 "cheerio" : " 1.0.0-rc.10" ,
You can’t perform that action at this time.
0 commit comments