Skip to content

metro-config: Add injectProjectRootAsWatchFolder argument to loadConfig and provide fallback for watchFolders#1206

Open
kraenhansen wants to merge 2 commits into
react:mainfrom
kraenhansen:@kraenhansen/metro-config/allow-undefined-watchfolders
Open

metro-config: Add injectProjectRootAsWatchFolder argument to loadConfig and provide fallback for watchFolders#1206
kraenhansen wants to merge 2 commits into
react:mainfrom
kraenhansen:@kraenhansen/metro-config/allow-undefined-watchfolders

Conversation

@kraenhansen

Copy link
Copy Markdown
Contributor

Summary

As per react/react-native#41967 (comment) I would like to expose a way to disable the code path which overrides the watchFolders to be able to detect if the user provided a value for it, or not.

Test plan

I added a test to verify the expected behaviour:

https://github.com/kraenhansen/metro/blob/e6de60117ea1e099cb417131d57de52250338ca2/packages/metro-config/src/__tests__/loadConfig-test.js#L169-L182

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 2, 2024
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Feb 2, 2024
@kraenhansen

Copy link
Copy Markdown
Contributor Author

The integration tests failed, the failure seems unrelated to my changes and they pass when ran locally.
Perhaps it needs a re-run?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants