You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Strict-mode block function named require causes dependencies outside its block to be omitted #22797
Open the reproduction and let it install dependencies.
Run npm start if it does not start automatically.
Inspect the strict block function (repro) results and dist/index-webpack/bundle.cjs.
Expected Behavior
The function declaration is scoped to its block. Webpack should bundle lib.js and transform the subsequent require("./lib.js") call, preserving the original Node.js behavior.
Actual Behavior
The build succeeds, but lib.js is omitted and the require call remains untransformed, causing a runtime error without a host-provided require.
Environment
Collected using webpack info in the local reproduction environment:
Activity
fix(parser): scope strict-mode block function declarations to their b…
fix(parser): scope strict-mode block function declarations to their b…