Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions packages/cli/src/tools/loadMetroConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,18 @@ export type ConfigOptionsT = {|
*/
export default function load(ctx: ConfigT, options?: ConfigOptionsT) {
const defaultConfig = getDefaultConfig(ctx);
return loadConfig(
{cwd: ctx.root, ...options},
{...defaultConfig, reporter: options && options.reporter},
);
if (options && options.reporter) {
/**
* $FlowIssue: Metro doesn't accept `reporter` to be passed along other options
* and will ignore the value, if provided.
*
* We explicitly read `reporter` value and set it on a default configuration. Note
* that all other options described in the `ConfigOptionsT` are handled by Metro
* automatically.
*
* This is a temporary workaround.
*/
defaultConfig.reporter = options.reporter;
}
return loadConfig({cwd: ctx.root, ...options}, defaultConfig);
}