Skip to content

Commit

Permalink
Merge pull request #1 from navelpluisje/fix-callback-error
Browse files Browse the repository at this point in the history
Removed callback
  • Loading branch information
navelpluisje authored Mar 28, 2018
2 parents f149deb + 35a31f2 commit f7a6ece
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f7a6ece

Please sign in to comment.