Expose type parameter on the buildGraph command

Reviewed By: davidaurelio

Differential Revision: D7654256

fbshipit-source-id: c3d97a1564ed06561b071ca412b14655f46cbc4f
This commit is contained in:
Rafael Oleza 2018-04-18 12:09:06 -07:00 committed by Facebook Github Bot
parent 47793c25a5
commit 310c096671
1 changed files with 3 additions and 0 deletions

View File

@ -281,6 +281,7 @@ type BuildGraphOptions = {|
dev?: boolean,
onProgress?: (transformedFileCount: number, totalFileCount: number) => void,
platform?: string,
type: 'module' | 'script',
|};
type RunBuildOptions = {|
@ -380,6 +381,7 @@ exports.buildGraph = async function({
entries,
onProgress,
platform = `web`,
type = 'module',
...rest
}: BuildGraphOptions): Promise<Graph> {
const metroServer = await runMetro({
@ -393,6 +395,7 @@ exports.buildGraph = async function({
dev,
onProgress,
platform,
type,
});
} finally {
await metroServer.end();