Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions packages/cli/src/commands/server/runServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ async function runServer(argv: Array<string>, ctx: ContextT, args: Args) {
port: args.port,
resetCache: args.resetCache,
watchFolders: args.watchFolders,
projectRoot: ctx.root,
sourceExts: args.sourceExts,
reporter,
});
Expand Down
19 changes: 4 additions & 15 deletions packages/cli/src/tools/loadMetroConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export const getDefaultConfig = (ctx: ContextT) => {
export type ConfigOptionsT = {|
maxWorkers?: number,
port?: number,
projectRoot?: string,
resetCache?: boolean,
watchFolders?: string[],
sourceExts?: string[],
Expand All @@ -85,20 +86,8 @@ export type ConfigOptionsT = {|
*
* This allows the CLI to always overwrite the file settings.
*/
export default (async function load(
ctx: ContextT,
// $FlowFixMe - troubles with empty object being inexact
options?: ConfigOptionsT = {},
) {
export default function load(ctx: ContextT, options?: ConfigOptionsT) {
const defaultConfig = getDefaultConfig(ctx);

const config = await loadConfig(
{
cwd: ctx.root,
...options,
},
defaultConfig,
);

return config;
});
return loadConfig({cwd: ctx.root, ...options}, defaultConfig);
}