From 310c096671f46ae112aa925343f36718f16310dc Mon Sep 17 00:00:00 2001 From: Rafael Oleza Date: Wed, 18 Apr 2018 12:09:06 -0700 Subject: [PATCH] Expose type parameter on the buildGraph command Reviewed By: davidaurelio Differential Revision: D7654256 fbshipit-source-id: c3d97a1564ed06561b071ca412b14655f46cbc4f --- packages/metro/src/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/metro/src/index.js b/packages/metro/src/index.js index d3e6c289..9f42b307 100644 --- a/packages/metro/src/index.js +++ b/packages/metro/src/index.js @@ -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 { const metroServer = await runMetro({ @@ -393,6 +395,7 @@ exports.buildGraph = async function({ dev, onProgress, platform, + type, }); } finally { await metroServer.end();