mirror of
https://github.com/status-im/metro.git
synced 2025-02-05 15:53:58 +00:00
Jean Lauliac
2482fa8956
packager: ResolutionRequest: unify asset resolution
Summary: The existing resolution logic of assets: * goes over all the files of the asset's directory for every resolution request; * duplicates the parsing logic of `AssetPaths` by building up a custom regex for each resolution request. This changeset proposes to tweak this by building an index for each particular directory in which we're looking for assets, so that we don't have to crawl a single directory twice, and so that it reuses the logic of `AssetPaths.tryParse()` for determining variants. Reviewed By: davidaurelio Differential Revision: D5062435 fbshipit-source-id: 708fc5612f57b14565499fad741701269438c806
metro-bundler
The JavaScript bundler for React Native
Description
Languages
JavaScript
100%