Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Support html-webpack-plugin v4 #131

Merged
merged 1 commit into from
Nov 24, 2018
Merged

Conversation

brunocodutra
Copy link
Owner

Closes #128

@coveralls
Copy link

coveralls commented Sep 19, 2018

Pull Request Test Coverage Report for Build 598

  • 12 of 12 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.7%) to 92.308%

Totals Coverage Status
Change from base Build 596: -0.7%
Covered Lines: 85
Relevant Lines: 86

💛 - Coveralls

@@ -14,6 +14,14 @@ module.exports.tap = (tappable, hook, name, plugin) => (
: tappable.plugin(hook, plugin)
);

module.exports.tapHtml = (tappable, name, plugin) => {
const HtmlWebpackPlugin = require('html-webpack-plugin');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's using "html-webpack-plugin": "^3.2.0" from package.json here.
HtmlWebpackPlugin.getHooks will always be undefined.

Or at least that's what I'm noticing testing it locally.
Makes sense it's undefined tho, the version with getHooks is html-webpack-plugin@next.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I misunderstood, html-webpack-plugin ist a dev-dependency and should not be installed if you consume webapp-webpack-plugin as a dependency, meaning it should pick whichever version you have in your package.json.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're right, my understanding of npm dependencies is lacking at best.

Copy link

@keepitterron keepitterron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well for me!

@bj00rn
Copy link

bj00rn commented Nov 22, 2018

@brunocodutra can we have this merged?

@brunocodutra
Copy link
Owner Author

@bj00rn yes! The only reason I didn't merge it yet though is the fact it lacks unit tests and it's getting increasingly hard to set them up such that it works for legacy versions of Webpack and HtmlWebpackPlugin, so I've been fiddling with the idea of releasing a major version.

@brunocodutra brunocodutra merged commit 05e9fc5 into master Nov 24, 2018
@brunocodutra brunocodutra deleted the html-webpack-plugin-4 branch November 24, 2018 10:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants