Resolve fallback to an absolute path in the suggested config for the
Node.js polyfill. This is necessary in setups where where packages that
use the Node.js module are symlinked outside the package directory and
fail to resolve the fallback as a result.
A trailing slash is also necessary for packages that are shadowed by
builtin modules, i.e.: require.resolve("events") returns "events" while
require.resolve("events/") returns the path to the polyfill.
Perhaps this would be even clearer: "webpack no longer includes polyfills for node.js core modules by default. If you need this module, configure a polyfill for it."
As i walk through the source, i've tried to trace the webpack running stack.
Then, i find the missing constructors result in uncleasr stack and create a patch
for them.