Skip to content

Commit 9e7cec1

Browse files
robhoganfacebook-github-bot
authored andcommitted
Enable symlinks (resolver.unstable_enableSymlinks) by default (#1068)
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
1 parent 83e0650 commit 9e7cec1

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

docs/Configuration.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ Enable experimental support for projects containing symbolic links (symlinks).
403403
404404
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.
405405
406-
Defaults to `false`.
406+
Defaults to `true` since Metro v0.79.0.
407407
408408
:::info
409409
@@ -413,7 +413,7 @@ For example, if you have a Metro project within a [Yarn workspace](https://class
413413
414414
:::note
415415
416-
In a future release of Metro, this option will become `true` by default.
416+
In a future release of Metro, this option will be removed (symlink support will be always-on).
417417
418418
:::
419419

packages/metro-config/src/__tests__/__snapshots__/loadConfig-test.js.snap

+4-4
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Object {
8484
],
8585
},
8686
"unstable_enablePackageExports": false,
87-
"unstable_enableSymlinks": false,
87+
"unstable_enableSymlinks": true,
8888
"useWatchman": true,
8989
},
9090
"serializer": Object {
@@ -262,7 +262,7 @@ Object {
262262
],
263263
},
264264
"unstable_enablePackageExports": false,
265-
"unstable_enableSymlinks": false,
265+
"unstable_enableSymlinks": true,
266266
"useWatchman": true,
267267
},
268268
"serializer": Object {
@@ -440,7 +440,7 @@ Object {
440440
],
441441
},
442442
"unstable_enablePackageExports": false,
443-
"unstable_enableSymlinks": false,
443+
"unstable_enableSymlinks": true,
444444
"useWatchman": true,
445445
},
446446
"serializer": Object {
@@ -618,7 +618,7 @@ Object {
618618
],
619619
},
620620
"unstable_enablePackageExports": false,
621-
"unstable_enableSymlinks": false,
621+
"unstable_enableSymlinks": true,
622622
"useWatchman": true,
623623
},
624624
"serializer": Object {

packages/metro-config/src/defaults/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const getDefaultValues = (projectRoot: ?string): ConfigT => ({
4040
blockList: exclusionList(),
4141
dependencyExtractor: undefined,
4242
disableHierarchicalLookup: false,
43-
unstable_enableSymlinks: false,
43+
unstable_enableSymlinks: true,
4444
emptyModulePath: require.resolve(
4545
'metro-runtime/src/modules/empty-module.js',
4646
),

0 commit comments

Comments
 (0)