[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
Closed
[heft-webpack4-plugin] Add an option to heft-webpack4-plugin to replace md4 hashes with md5.#4310iclanton wants to merge 5 commits intomicrosoft:mainfrom
iclanton wants to merge 5 commits intomicrosoft:mainfrom
Conversation
1c67d75 to
ddd0792
Compare
fc86ada to
fbcb1e5
Compare
dmichon-msft
approved these changes
Sep 6, 2023
heft-plugins/heft-webpack4-plugin/src/webpackPackageUtilities.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: David Michon <dmichon@microsoft.com>
fe6093c to
8553fba
Compare
Member
Author
|
Superseded by webpack/webpack#17628 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds an option called
patchMd4WithMd5Hashto@rushstack/heft-webpack4-pluginthat patches Webpack to replace MD4 hashes with MD5.Details
This specifically performs these patches in-memory when Webpack is loaded by the plugin:
createHashfunction with a function that conditionally replaces the argument's value with"md5"if"md4"was passed incrypto.createHash("md4")withcrypto.createHash("md5")inSplitChunksPlugin.How it was tested
Tested in a large internal repo that uses Webpack 4 under Node 18 and by removing the
--openssl-legacy-provider=trueenv var workaround in this repo.