-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable global package resolution by default
Summary: Prior to Metro symlink support, many users relied on "global package" resolution in setups such as Yarn workspaces. With global packages, any `package.json` *outside* `node_modules` may be resolved by name from anywhere in the project. In the case of Yarn (etc.) workspaces, we're now able to resolve the same packages through the symlinks the packager creates under `node_modules`, in the same manner as Node JS and other tooling does. Global packages now provide little value for most users, and in fact are a potential footgun - if your global package happens to share its name with a `node_modules` package, the former will always take precedence, even when resolving relative to another `node_modules` package. This changes the default for `resolver.enableGlobalPackages` to `false`. If you require global packages, you will need to explicitly enable them in your config. Changelog ``` - **[Breaking]:** Disable global package resolution (`resolver.enableGlobalPackages`) by default ``` Reviewed By: motiz88 Differential Revision: D48777893 fbshipit-source-id: 23b8a5884582e20ca92c8356e67909f2d66b9e7b
- Loading branch information
1 parent
9e7cec1
commit 0df1541
Showing
5 changed files
with
58 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters