mirror of
https://github.com/status-im/metro.git
synced 2025-02-09 09:43:39 +00:00
Summary: Not only is this function is building a custom Regex for every single file, but it's also duplicating some of the work of the inner function, that is already splitting up the platform/extension. This changeset refactors both function to have a more strict and legible logic to extract asset information. We extract the base name first, then we extract the resolution from it, instead of rematching platform and extension. I stumbled on this while looking into refactoring the asset resolution logic of `ResolutionRequest#_loadAsAssetFile()`. The next step would be to reuse the exact same function for resolving assets instead of using a custom regex there as well. Reviewed By: davidaurelio Differential Revision: D5060589 fbshipit-source-id: b48d9a5d8e963be76cad5384c6bfb3e214a73587
…
…
…
…
…
…
metro-bundler
![npm version](https://badge.fury.io/js/metro-bundler.svg)
The JavaScript bundler for React Native
Description
Languages
JavaScript
100%