`verboseName` in dev-mode modules is no longer verbose
See original GitHub issueDo you want to request a feature or report a bug?
Bug
What is the current behavior?
In order to perform manual code-splitting with React Native’s ‘unbundle’ command, it’s necessary to collect and transform the names of modules that have loaded after app startup. (The process is described in detail in the RN docs here.)
In RN v0.56.0, the module objects returned by require.getModules()
no longer contain a full path in the verboseName
field. Instead, they contain just the file name, which is insufficient for transforming back to module paths, as described here.
What is the expected behavior?
The expected behavior is that verboseName
contains the path used to require the module.
Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.
React Native v0.56.0 Metro v0.38.3
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
Thanks for the report! This is indeed an incorrect behaviour: I’m going to fix it to display the relative path based on the project root instead.
Awesome. Left a single comment, but generally LGTM. I don’t know how changes are flagged as breaking for the release notes, but that’s the only other thing I’d request that you do.
Many, many thanks for the quick turnaround on this!