Support loading config from .config directory#1558
Closed
Conversation
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D80272839 |
robhogan
added a commit
that referenced
this pull request
Aug 15, 2025
Summary: One for folks who like to keep their top-level folders tidy - Metro will now look for config in `<project>/.config/metro.[extensions]`, as well as the existing `<project>/metro.config.js` (and, as before, will search up from cwd to the home dir). This is in line with "newer" (from [7.10.0](https://github.com/cosmiconfig/cosmiconfig/blob/main/CHANGELOG.md#710)) versions of `cosmiconfig` (Metro previously used v5), and is a popular user ask, eg: [https://x.com/jamonholmgren/status/1749492293617508776](https://x.com/jamonholmgren/status/1749492293617508776) . Changelog: ```javascript - **[Feature]**: Support finding `metro.config.js` (etc) files in `.config` subdirectory ``` Reviewed By: GijsWeterings Differential Revision: D80272839
6140009 to
85b9a6e
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D80272839 |
robhogan
added a commit
that referenced
this pull request
Aug 15, 2025
Summary: Pull Request resolved: #1558 One for folks who like to keep their top-level folders tidy - Metro will now look for config in `<project>/.config/metro.[extensions]`, as well as the existing `<project>/metro.config.js` (and, as before, will search up from cwd to the home dir). This is in line with "newer" (from [7.10.0](https://github.com/cosmiconfig/cosmiconfig/blob/main/CHANGELOG.md#710)) versions of `cosmiconfig` (Metro previously used v5), and is a popular user ask, eg: [https://x.com/jamonholmgren/status/1749492293617508776](https://x.com/jamonholmgren/status/1749492293617508776) . Changelog: ```javascript - **[Feature]**: Support finding `metro.config.js` (etc) files in `.config` subdirectory ``` Reviewed By: GijsWeterings Differential Revision: D80272839
85b9a6e to
507da9b
Compare
facebook-github-bot
pushed a commit
that referenced
this pull request
Aug 15, 2025
Summary: One for folks who like to keep their top-level folders tidy - Metro will now look for config in `<project>/.config/metro.js`, as well as the existing `<project>/metro.config.js` (and, as before, will search up from cwd to the home dir). This is in line with "newer" (from [7.10.0](https://github.com/cosmiconfig/cosmiconfig/blob/main/CHANGELOG.md#710)) versions of `cosmiconfig` (Metro previously used v5), and is a popular user ask, eg: [https://x.com/jamonholmgren/status/1749492293617508776](https://x.com/jamonholmgren/status/1749492293617508776) . Changelog: ```javascript - **[Feature]**: Support finding `metro.config.js` (etc) files in `.config` subdirectory ``` Reviewed By: GijsWeterings Differential Revision: D80272839
507da9b to
4942765
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D80272839 |
robhogan
added a commit
that referenced
this pull request
Aug 18, 2025
Summary: One for folks who like to keep their top-level folders tidy - Metro will now look for config in `<project>/.config/metro.js`, as well as the existing `<project>/metro.config.js` (and, as before, will search up from cwd to the home dir). This is in line with "newer" (from [7.10.0](https://github.com/cosmiconfig/cosmiconfig/blob/main/CHANGELOG.md#710)) versions of `cosmiconfig` (Metro previously used v5), and is a popular user ask, eg: [https://x.com/jamonholmgren/status/1749492293617508776](https://x.com/jamonholmgren/status/1749492293617508776) . Changelog: ```javascript - **[Feature]**: Support finding `metro.config.js` (etc) files in `.config` subdirectory ``` Reviewed By: GijsWeterings Differential Revision: D80272839
4942765 to
86e13df
Compare
Summary: Pull Request resolved: #1558 One for folks who like to keep their top-level folders tidy - Metro will now look for config in `<project>/.config/metro.js`, as well as the existing `<project>/metro.config.js` (and, as before, will search up from cwd to the home dir). This is in line with "newer" (from [7.10.0](https://github.com/cosmiconfig/cosmiconfig/blob/main/CHANGELOG.md#710)) versions of `cosmiconfig` (Metro previously used v5), and is a popular user ask, eg: [https://x.com/jamonholmgren/status/1749492293617508776](https://x.com/jamonholmgren/status/1749492293617508776) . Changelog: ```javascript - **[Feature]**: Support finding `metro.config.js` (etc) files in `.config` subdirectory ``` Reviewed By: GijsWeterings Differential Revision: D80272839
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D80272839 |
86e13df to
eb8f28c
Compare
Contributor
|
This pull request has been merged in fd0c51d. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
One for folks who like to keep their top-level folders tidy - Metro will now look for config in
<project>/.config/metro.js, as well as the existing<project>/metro.config.js(and, as before, will search up from cwd to the home dir).This is in line with "newer" (from 7.10.0) versions of
cosmiconfig(Metro previously used v5), and is a popular user ask, eg: https://x.com/jamonholmgren/status/1749492293617508776 .Changelog:
Differential Revision: D80272839