Skip to content

Commit

Permalink
fix: do not rely on html-webpack-plugin's internals
Browse files Browse the repository at this point in the history
  • Loading branch information
brunocodutra authored and jantimon committed Aug 14, 2019
1 parent c9d7c35 commit 9f166a7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ module.exports = class FaviconsWebpackPlugin {
if (this.options.inject) {
// Hook into the html-webpack-plugin processing and add the html
tap(compilation, 'html-webpack-plugin-before-html-processing', 'FaviconsWebpackPlugin', (htmlPluginData, callback) => {
if (htmlPluginData.plugin.options.favicons !== false) {
htmlPluginData.html = htmlPluginData.html.replace(/(<\/head>)/i, result + '$&');
}
htmlPluginData.html = htmlPluginData.html.replace(/(<\/head>)/i, result + '$&');
return callback(null, htmlPluginData);
});
}
Expand Down

0 comments on commit 9f166a7

Please sign in to comment.