Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

fix: add missing peer dependency html-webpack-plugin #91

Merged

Conversation

merceyz
Copy link
Contributor

@merceyz merceyz commented Dec 8, 2021

What's the problem this PR addresses?

critters-webpack-plugin tries to require html-webpack-plugin (

try {
var htmlPluginHooks = require('html-webpack-plugin').getHooks(
compilation
);
} catch (err) {}
) but doesn't declare it as a dependency which means under strict dependency environments or if hoisting isn't in its favour it wont get access to it.
https://yarnpkg.com/advanced/rulebook/#packages-should-only-ever-require-what-they-formally-list-in-their-dependencies

Ref preactjs/preact-cli#1608 (comment) (cc @rschristian)

How did you fix it?

Based on how critters-webpack-plugin is trying to use html-webpack-plugin I added it as an optional peer dependency.

@developit developit merged commit 4a917b2 into GoogleChromeLabs:main Jan 5, 2022
@merceyz merceyz deleted the merceyz/fix/missing-peer-dep branch January 5, 2022 16:04
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.

2 participants