Skip to content

Docs: Fix stale symlink rationale in local development guide - #1904

Draft
robhogan wants to merge 1 commit into
react:mainfrom
robhogan:docs-symlink-watchfolders-wording
Draft

Docs: Fix stale symlink rationale in local development guide#1904
robhogan wants to merge 1 commit into
react:mainfrom
robhogan:docs-symlink-watchfolders-wording

Conversation

@robhogan

@robhogan robhogan commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Summary:
The local development guide tells you to configure watchFolders "as it will not automatically follow the symlinks". Metro does follow symlinks, the requirement is that the symlink's target must itself be under projectRoot or watchFolders to be resolvable, which is how it's already put under [watchFolders](https://metrobundler.dev/docs/configuration/#watchfolders

Changelog: Internal

Summary:
The local development guide tells you to configure `watchFolders` "as it will not automatically follow the symlinks". Metro does follow symlinks, and has for some time - `metro-file-map` is constructed with `enableSymlinks: true` unconditionally, and there's no longer a config option to turn it off:

https://github.com/react/metro/blob/v0.87.0/packages/metro/src/node-haste/DependencyGraph/createFileMap.js#L106

The step itself is still needed, but the reason is that a symlink's target must itself be under `projectRoot` or `watchFolders` to be resolvable, which is how it's already put under [`watchFolders`](https://metrobundler.dev/docs/configuration/#watchfolders).

Worth fixing because the old wording sends anyone debugging a half-working `yarn link`ed package after the wrong thing - looking for a way to make Metro follow the link, rather than checking whether its target is watched. That's the same root cause as the `SHA-1 for file ... is not computed` reports.

Changelog: [Internal]

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@meta-cla meta-cla 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 Sep 5, 2026
@robhogan
robhogan marked this pull request as draft September 5, 2026 22:24
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant