Skip to content

Commit

Permalink
Merge pull request #39 from slackhq/an-ensure-html-webpack-plugin-hoo…
Browse files Browse the repository at this point in the history
…ks-present

Ensuring that html webpack plugin hooks are available
  • Loading branch information
AnujRNair authored Jun 3, 2019
2 parents 14aabb3 + ecd269c commit 396e7ff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,10 @@ class CspHtmlWebpackPlugin {
'CspHtmlWebpackPlugin',
this.processCsp.bind(this)
);
} else {
} else if (
compilation.hooks.htmlWebpackPluginBeforeHtmlGeneration &&
compilation.hooks.htmlWebpackPluginAfterHtmlProcessing
) {
// HTMLWebpackPlugin@3
compilation.hooks.htmlWebpackPluginBeforeHtmlGeneration.tapAsync(
'CspHtmlWebpackPlugin',
Expand Down

0 comments on commit 396e7ff

Please sign in to comment.