-
Notifications
You must be signed in to change notification settings - Fork 631
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor subpath matching logic in browser spec resolution
Summary: - Simplify default `context.redirectModulePath` function to return absolute path in all cases. - This does not affect end-to-end behaviour, but is labelled as a breaking change for rare cases where the result of this function is depended on in a custom resolver. - Simplify `matchSubpathFromMainFields` function to receive and return relative module paths (i.e. the module path or bare import specifier that will attempt to be matched). - Refactor `getPackageEntryPoint` to reuse `matchSubpathFromMainFields`. - Add doc and inline comments clarifying existing behaviour. Changelog: **[Breaking]** Change default `context.redirectModulePath` function to return absolute path in all cases Reviewed By: robhogan Differential Revision: D42801889 fbshipit-source-id: 8d266ad57b8390525bfabcf7a1fc74e36d3a3eed
- Loading branch information
1 parent
c3e453e
commit acbfe63
Showing
1 changed file
with
73 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters