Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7af3878

Browse files
author
Nadav Sinai
committedSep 25, 2018
webpack 4 compatability - fix - no need for async
1 parent ad8f3b8 commit 7af3878

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed
 

‎lib/html-elements-webpack-plugin.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class HtmlElementsWebpackPlugin {
2323
(compilation) => {
2424
compilation.options.htmlElements = compilation.options.htmlElements || {};
2525
compatAddPlugin(compilation, 'html-webpack-plugin-before-html-generation',
26-
(htmlPluginData, callback) => {
26+
(htmlPluginData) => {
2727
const locations = this.locations;
2828
if (locations) {
2929
const publicPath = htmlPluginData.assets.publicPath;
@@ -32,10 +32,7 @@ class HtmlElementsWebpackPlugin {
3232
compilation.options.htmlElements[loc] = getHtmlElementString(locations[loc], publicPath);
3333
});
3434
}
35-
36-
if (typeof callback === 'function')
37-
callback(null, htmlPluginData);
38-
}, true);
35+
});
3936
});
4037
}
4138
}

0 commit comments

Comments
 (0)
Please sign in to comment.