jharris4 / html-webpack-tags-plugin

lets you define html tags to inject with html-webpack-plugin
MIT License
256 stars 31 forks source link

fix finding instances of HtmlWebpackPlugin #88

Open felschr opened 1 year ago

felschr commented 1 year ago

Using instanceof HtmlWebpackPlugin doesn't work in projects with multiple versions of html-webpack-plugin and causes the following error message:

Error running html-webpack-tags-plugin, are you sure you have html-webpack-plugin before it in your webpack config's plugins?

Checking the constructor name instead should be more robust and seems to be common practice, too.