Skip to content

Commit

Permalink
webpack 4 compatability - fix - no need for async
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadav Sinai committed Sep 25, 2018
1 parent ad8f3b8 commit 7af3878
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/html-elements-webpack-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class HtmlElementsWebpackPlugin {
(compilation) => {
compilation.options.htmlElements = compilation.options.htmlElements || {};
compatAddPlugin(compilation, 'html-webpack-plugin-before-html-generation',
(htmlPluginData, callback) => {
(htmlPluginData) => {
const locations = this.locations;
if (locations) {
const publicPath = htmlPluginData.assets.publicPath;
Expand All @@ -32,10 +32,7 @@ class HtmlElementsWebpackPlugin {
compilation.options.htmlElements[loc] = getHtmlElementString(locations[loc], publicPath);
});
}

if (typeof callback === 'function')
callback(null, htmlPluginData);
}, true);
});
});
}
}
Expand Down

0 comments on commit 7af3878

Please sign in to comment.