Issue 1:
Feature request

What is the expected behavior?

If I have the following,

import('test.js')

with the config,

module.exports = {
output: {
chunkFormat: "module",
},
target: ["web", "es2020"],
};

You get the following output

(()=>{var e,t,r,o,n={},f={};function i(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={exports:{}};return n[e](r,r.exports,i),r.exports}i.m=n,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var n=Object.create(null);i.r(n);var f={};e=e||[null,t({}),t([]),t(t)];for(var u=2&o&&r;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((e=>f[e]=()=>r[e]));return f.default=()=>r,i.d(n,f),n},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>e+".js",i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r={179:0},o=e=>{var t,o,{ids:n,modules:f,runtime:u}=e,a=0;for(t in f)i.o(f,t)&&(i.m[t]=f[t]);for(u&&u(i);a<n.length;a++)o=n[a],i.o(r,o)&&r[o]&&r[o][0](),r[n[a]]=0},i.f.j=(e,t)=>{var n=i.o(r,e)?r[e]:void 0;if(0!==n)if(n)t.push(n[1]);else{var f=import("./"+i.u(e)).then(o,(t=>{throw 0!==r[e]&&(r[e]=void 0),t}));f=Promise.race([f,new Promise((t=>n=r[e]=[t]))]),t.push(n[1]=f)}},i.e(4).then(i.t.bind(i,4,23))})();

Notably - the import("./"+i.u(e))

Is there a way to force this to output a statically analysable import statement (i.e. import("./4.js"))?

What is motivation or use case for adding/changing the behavior?

If you're using webpack to produce libraries that may be used in other build tools (including webpack), statically analysable imports improve optimisations

How should this be implemented in your opinion?

The current config should produce statically analysable imports

-(i.e = (e) =>
- Promise.all(Object.keys(i.f).reduce((t, r) => (i.f[r](e, t), t), []))),
+(i.e = (e, importFunction) =>
+ Promise.all(Object.keys(i.f).reduce((t, r) => (i.f[r](e, t, importFunction), t), []))),
-(i.u = (e) => e + ".js"),
(i.f.j = (e, t, importFunction) => {
var n = i.o(r, e) ? r[e] : void 0;
if (0 !== n)
if (n) t.push(n[1]);
else {
- var f = import("./" + i.u(e)).then(o, (t) => {
+ var f = importFunction().then(o, (t) => {
throw (0 !== r[e] && (r[e] = void 0), t);
});
(f = Promise.race([f, new Promise((t) => (n = r[e] = [t]))])),
t.push((n[1] = f));
}
}),
-i.e(4).then(i.t.bind(i, 4, 23));
+i.e(4, () => import("./4.js")).then(i.t.bind(i, 4, 23));

Are you willing to work on this yourself?

No - this is way out of my depth 😅

Issue 2:
Bug report

What is the current behavior?

Throughout the webpack code, md4 is used as has function. md4 is deprecated, and disabled by default in openssl-3.0.0+ (https://www.openssl.org/docs/manmaster/man3/MD4_Final.html)

If the current behavior is a bug, please provide the steps to reproduce.

With any current webpack release, on a system with openssl-3.0.0 (i.e. Fedora rawhide), i.e. webpack serve will give

9% setup compilation DefinePluginnode:internal/crypto/hash:67
this[kHandle] = new _Hash(algorithm, xofLen);
^

Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at BulkUpdateDecorator.hashFactory (/home/sandro/Documents/Devel/berlinerglas/berlinerglas-webmap/node_modules/webpack/lib/util/createHash.js:155:18)
at BulkUpdateDecorator.digest (/home/sandro/Documents/Devel/berlinerglas/berlinerglas-webmap/node_modules/webpack/lib/util/createHash.js:80:21)
at /home/sandro/Documents/Devel/berlinerglas/berlinerglas-webmap/node_modules/webpack/lib/DefinePlugin.js:595:38
at Hook.eval [as call] (eval at create (/home/sandro/Documents/Devel/berlinerglas/berlinerglas-webmap/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:198:1)
at Hook.CALL_DELEGATE [as _call] (/home/sandro/Documents/Devel/berlinerglas/berlinerglas-webmap/node_modules/webpack/node_modules/tapable/lib/Hook.js:14:14)
at Compiler.newCompilation (/home/sandro/Documents/Devel/berlinerglas/berlinerglas-webmap/node_modules/webpack/lib/Compiler.js:1053:26)
at /home/sandro/Documents/Devel/berlinerglas/berlinerglas-webmap/node_modules/webpack/lib/Compiler.js:1097:29
at Hook.eval [as callAsync] (eval at create (/home/sandro/Documents/Devel/berlinerglas/berlinerglas-webmap/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:22:1) {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
error Command failed with exit code 1.

What is the expected behavior?

No ERR_OSSL_EVP_UNSUPPORTED error

Other relevant information:

webpack version: 5.59.1

Node.js version: nodejs-16.11.1-1.fc36.x86_64

Operating System: Fedora rawhide

Additional tools: -

Workaround:

cd node_modules/webpack/lib
find -type f -exec sed -i 's|md4|sha512|g' {} \;