Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrap hooks object so that plugins can add custom hooks #169

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davidparkagoda
Copy link

this might fix #44

I saw issues with incremental builds especially with HardSourceWebpackPlugin. This changes fixes it for me.

Debugging HardSourceWebpackPlugin, it looks like they are modifying the hooks objects to add more hooks
https://github.com/mzgoddard/hard-source-webpack-plugin/blob/5122a1c3c3660d94798e73e73b6e36d0fc1d784d/lib/SystemArchetype.js#L14
https://github.com/mzgoddard/hard-source-webpack-plugin/blob/master/lib/util/plugin-compat.js#L59

These modified hooks are okay in the first run, but speed-measure-plugin does not modify the actual hooks when these registrations happen. This makes the subsequent newly created hooks object fail during the next incremental build.

@davidparkagoda davidparkagoda marked this pull request as ready for review May 19, 2021 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Breaks with incremental builds
1 participant