Skip to content

Comments

[heft-webpack4-plugin] Add an option to heft-webpack4-plugin to replace md4 hashes with md5.#4310

Closed
iclanton wants to merge 5 commits intomicrosoft:mainfrom
iclanton:webpack4-compat-patch
Closed

[heft-webpack4-plugin] Add an option to heft-webpack4-plugin to replace md4 hashes with md5.#4310
iclanton wants to merge 5 commits intomicrosoft:mainfrom
iclanton:webpack4-compat-patch

Conversation

@iclanton
Copy link
Member

@iclanton iclanton commented Sep 6, 2023

Summary

This PR adds an option called patchMd4WithMd5Hash to @rushstack/heft-webpack4-plugin that patches Webpack to replace MD4 hashes with MD5.

Details

This specifically performs these patches in-memory when Webpack is loaded by the plugin:

  • wraps the createHash function with a function that conditionally replaces the argument's value with "md5" if "md4" was passed in
  • Replaces crypto.createHash("md4") with crypto.createHash("md5") in SplitChunksPlugin.

How it was tested

Tested in a large internal repo that uses Webpack 4 under Node 18 and by removing the --openssl-legacy-provider=true env var workaround in this repo.

@iclanton iclanton force-pushed the webpack4-compat-patch branch from fc86ada to fbcb1e5 Compare September 6, 2023 00:22
iclanton and others added 2 commits September 5, 2023 17:48
@iclanton iclanton force-pushed the webpack4-compat-patch branch from fe6093c to 8553fba Compare September 6, 2023 00:50
@iclanton
Copy link
Member Author

iclanton commented Sep 7, 2023

Superseded by webpack/webpack#17628

@iclanton iclanton closed this Sep 7, 2023
@iclanton iclanton deleted the webpack4-compat-patch branch September 7, 2023 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants