enhanced-resolve icon indicating copy to clipboard operation
enhanced-resolve copied to clipboard

Error object is missing the `missing` property in 5.0.0

Open soluml opened this issue 5 years ago • 3 comments

I have a custom resolver that depends on the missing property of an error object returned in the callback after attempting to resolve a path. This was done so that I can attempt to do some further path correction (like globbing). In the latest version (5.0.0), the missing field has been removed from the error object.

Is this something that we could get back? Either in the error object or as some additional property so that we can see what paths were attempted for resolution?

soluml avatar Sep 27 '20 23:09 soluml

~~No, it is breaking change, you should not rely on missing~~

alexander-akait avatar Sep 28 '20 10:09 alexander-akait

You can get this info by passing a missingDependencies property to the resolveContext. It should be an object with an add method, e. g. a Set. During resolving all missing items will be added. There is also fileDependencies for files and the existence of directories and contextDependencies for the content of directories.

sokra avatar Sep 28 '20 17:09 sokra

Answer above, my mistake, sorry, need to document

alexander-akait avatar Sep 28 '20 17:09 alexander-akait