Skip to content

Commit

Permalink
Enable symlinks (resolver.unstable_enableSymlinks) by default (#1068)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #1068

Flip the default for `unstable_enableSymlinks` to true. The option was made available in React Native 0.72 and it's been trialled by the community to the extent that we can have good confidence in it (though there are still devx gaps to guide users towards a suitable configuration).

This is also an effective prerequisite for disabling Haste/global package resolution by default in OSS, which currently allows workspaces to mostly-work in the absence of symlink support.

Closes #1

Changelog:
```
 - **[Feature]**: Enable resolution through symlinks (previously experimental `unstable_enableSymlinks`)
```

Reviewed By: motiz88

Differential Revision: D48777855

fbshipit-source-id: bc3d4acad2f8e19d5f0d118ecbf789663eaca2ce
  • Loading branch information
robhogan authored and facebook-github-bot committed Aug 30, 2023
1 parent 83e0650 commit 9e7cec1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/Configuration.md
Expand Up @@ -403,7 +403,7 @@ Enable experimental support for projects containing symbolic links (symlinks).
When enabled, Metro traverses symlinks during module and asset [resolution](./Resolution.md), instead of ignoring symlinks. Note that, as with any other file Metro needs to resolve, the symlink target *must be within configured [watched folders](#watchfolders)* and not otherwise excluded.
Defaults to `false`.
Defaults to `true` since Metro v0.79.0.
:::info
Expand All @@ -413,7 +413,7 @@ For example, if you have a Metro project within a [Yarn workspace](https://class
:::note
In a future release of Metro, this option will become `true` by default.
In a future release of Metro, this option will be removed (symlink support will be always-on).
:::
Expand Down
Expand Up @@ -84,7 +84,7 @@ Object {
],
},
"unstable_enablePackageExports": false,
"unstable_enableSymlinks": false,
"unstable_enableSymlinks": true,
"useWatchman": true,
},
"serializer": Object {
Expand Down Expand Up @@ -262,7 +262,7 @@ Object {
],
},
"unstable_enablePackageExports": false,
"unstable_enableSymlinks": false,
"unstable_enableSymlinks": true,
"useWatchman": true,
},
"serializer": Object {
Expand Down Expand Up @@ -440,7 +440,7 @@ Object {
],
},
"unstable_enablePackageExports": false,
"unstable_enableSymlinks": false,
"unstable_enableSymlinks": true,
"useWatchman": true,
},
"serializer": Object {
Expand Down Expand Up @@ -618,7 +618,7 @@ Object {
],
},
"unstable_enablePackageExports": false,
"unstable_enableSymlinks": false,
"unstable_enableSymlinks": true,
"useWatchman": true,
},
"serializer": Object {
Expand Down
2 changes: 1 addition & 1 deletion packages/metro-config/src/defaults/index.js
Expand Up @@ -40,7 +40,7 @@ const getDefaultValues = (projectRoot: ?string): ConfigT => ({
blockList: exclusionList(),
dependencyExtractor: undefined,
disableHierarchicalLookup: false,
unstable_enableSymlinks: false,
unstable_enableSymlinks: true,
emptyModulePath: require.resolve(
'metro-runtime/src/modules/empty-module.js',
),
Expand Down

0 comments on commit 9e7cec1

Please sign in to comment.