From 35a31f25e6eb44cdbffbf9d314b0d3d2525d0d9b Mon Sep 17 00:00:00 2001 From: Navelpluisje Date: Wed, 28 Mar 2018 19:55:30 +0200 Subject: [PATCH] Removed callback Removed callback from `html-webpack-plugin-before-html-generation`, because it is not returning a callback anymore. --- src/index.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/index.js b/src/index.js index dd110b2..0cde275 100644 --- a/src/index.js +++ b/src/index.js @@ -105,15 +105,14 @@ class GoogleWebfontsPlugin { } else { cb() } - compilation.plugin("html-webpack-plugin-before-html-generation", (data, cb) => { + compilation.plugin("html-webpack-plugin-before-html-generation", (data) => { if (local && (data.assets.publicPath.indexOf("://") !== -1 || data.assets.publicPath.indexOf(":") !== -1)) { - data.assets.css.push(data.assets.publicPath + cssFile); - } else if (local) { - data.assets.css.push(path.posix.join(data.assets.publicPath, cssFile)); - } else { - data.assets.css.push(cssUrl(fonts)); - } - cb(null, data) + data.assets.css.push(data.assets.publicPath + cssFile); + } else if (local) { + data.assets.css.push(path.posix.join(data.assets.publicPath, cssFile)); + } else { + data.assets.css.push(cssUrl(fonts)); + } }) compilation.plugin("additional-assets", cb => { compilation.chunks.push(this.chunk)