facebook / metro

🚇 The JavaScript bundler for React Native
https://metrobundler.dev
MIT License
5.25k stars 627 forks source link

Ignore errors in unreachable modules #1164

Closed robhogan closed 11 months ago

robhogan commented 11 months ago

Summary: Currently, if Metro encounters an error resolving a dependency or transforming a module that is present in the graph at the time the error is introduced, it will return the error to the client and continue to do so, even after the bad dependency is subsequently made unreachable by another change.

This is "fixed" by a full refresh or Metro restart, because a new traversal would not encounter the error, and is therefore a correctness bug.

This diff fixes the bug by:

Changelog:

**[Fix]**: Ignore errors in unreachable modules during incremental builds.

Reviewed By: motiz88

Differential Revision: D52457312

facebook-github-bot commented 11 months ago

This pull request was exported from Phabricator. Differential Revision: D52457312

facebook-github-bot commented 11 months ago

This pull request was exported from Phabricator. Differential Revision: D52457312

facebook-github-bot commented 11 months ago

This pull request was exported from Phabricator. Differential Revision: D52457312

facebook-github-bot commented 11 months ago

This pull request has been merged in facebook/metro@698b13e8788017d7384132b10a4381c7582d7f02.