Because arguments.length is > 0, this causes the callback to be called, instead of the resolver.applyPluginsAsyncSeriesBailResult1 being called, which means after-resolve never gets called in the plugin chain, causing other things in webpack to break.
This fix just makes sure cb() gets called with no arguments.
Currently, when resolving the
resolved
promise, theargument
s passed tocb
contains an argument withundefined
as the first argument, like so:This causes an issue with the enhanced-resolver in webpack. Particularly this line here: https://github.com/webpack/enhanced-resolve/blob/master/lib/Resolver.js#L128
Because arguments.length is > 0, this causes the callback to be called, instead of the
resolver.applyPluginsAsyncSeriesBailResult1
being called, which meansafter-resolve
never gets called in the plugin chain, causing other things in webpack to break.This fix just makes sure cb() gets called with no arguments.