Open vankop opened 1 month ago
Node.js's implementation picks the first valid path (without attempting to resolve it) and throws an error if it can't be resolved. Node.js's fallback array is designed for forward compatibility with features (e.g. protocols) that can be syntactically validated:
try this repo using Node.js https://github.com/Boshen/test-esm-exports-array
Also we need to seach what is bad-specifier
, maybe we can use regexp for perf instead full parsing
@alexander-akait I have added same test case in this commit https://github.com/webpack/enhanced-resolve/pull/420/commits/0d428c916786ae579be02a3ee472b06dfb5024d5
we are slicing paths until first absolute or relative path
Also we need to seach what is bad-specifier, maybe we can use regexp for perf instead full parsing
we dont parse full string only first 2 chars, see getType
in util/path
( this function is already exist, I just reuse it )
cc @alexander-akait
fixes #400