-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
Allow terser-webpack-plugin to work with Node 18+ and webpack 4 default hashes without openssl-legacy-provider #578
Comments
Actually, I may have gotten confused here, as I seem to have a dependency on
On the face of it, I seem to have been able to workaround this with a Yarn Berry/4.x forced resolution dependency so the change might need to be in webpack 4 itself (if anywhere) but will see if it causes any other ill side effects by force upgrading "resolutions": {
"webpack@npm:4.47.0/terser-webpack-plugin": "^4.2.3"
}, |
Going to close this for now, as it seems on the face of it, that this works fine with |
And there's even a PR to fix this at webpack/webpack#17659 - missed it somehow. Oops. |
Modification Proposal
Recently webpack
4.47.0
released a fix to allow it to work with Node 18+ without use of the openssl-legacy-provider which is required due to use of some legacy crypto stuff.Unfortunately terser-webpack-plugin as depended on by webpack 4 currently seems to also rely on the same crypto logic. I believe terser's usage of the functions is similar to webpack 4's.
Would you be open to a similar PR to webpack/webpack#17628 and releasing a version which removes dependency on this, for folks for whom the webpack 5 upgrade takes quite a while? The motivation is pretty well articulated in webpack/webpack#17628 (comment) given heavy use of Webpack 4 and Node 16 EOL.
Please excuse my ignorance if I have missed a way to change the
hashFunction
in a way that works around this without downsides.Expected Behavior / Situation
terser-webpack-plugin 4.x works with Node 18/20 without use of
NODE_OPTIONS=--openssl-legacy-provider
Actual Behavior / Situation
Currently with Node 18 and terser-webpack-plugin as transitive dependency from webpack
4.47.0
, WITHOUT the above flag you will get errors likePlease paste the results of
npx webpack-cli info
here, and mention other relevant informationThe text was updated successfully, but these errors were encountered: