@@ -154,9 +154,9 @@ function mergeConfig<T: $ReadOnly<InputConfigT>>(
154
154
} ) ;
155
155
}
156
156
157
- // mergeConfig is public, we should try to keep its API stable
158
- // This trick is necessary to pass proper cwd to `populateSync`
159
- const mergeConfigHooked = < T : $ReadOnly < InputConfigT >> (
157
+ // ` mergeConfig` is public, so we should try to keep its API stable
158
+ // This trick is necessary to pass the proper cwd to the internal `populateSync` call
159
+ const mergeConfigWithCwd = < T : $ReadOnly < InputConfigT >> (
160
160
cwd : string ,
161
161
base : T ,
162
162
extra : ConfigT | InputConfigT ,
@@ -186,7 +186,7 @@ async function loadMetroConfigFromDisk(
186
186
const rootPath = dirname ( filepath ) ;
187
187
188
188
const defaults = await getDefaultConfig ( rootPath ) ;
189
- const defaultConfig : ConfigT = mergeConfigHooked (
189
+ const defaultConfig : ConfigT = mergeConfigWithCwd (
190
190
rootPath ,
191
191
defaults ,
192
192
defaultConfigOverrides ,
@@ -197,10 +197,10 @@ async function loadMetroConfigFromDisk(
197
197
// to the function.
198
198
199
199
const resultedConfig = await configModule ( defaultConfig ) ;
200
- return mergeConfigHooked ( rootPath , defaultConfig , resultedConfig ) ;
200
+ return mergeConfigWithCwd ( rootPath , defaultConfig , resultedConfig ) ;
201
201
}
202
202
203
- return mergeConfigHooked ( rootPath , defaultConfig , configModule ) ;
203
+ return mergeConfigWithCwd ( rootPath , defaultConfig , configModule ) ;
204
204
}
205
205
206
206
function overrideConfigWithArguments (
0 commit comments