From 3adbf01ea2e9e7f40108a35bfa05d74f9159e6b8 Mon Sep 17 00:00:00 2001 From: Rafael Oleza Date: Fri, 20 Apr 2018 09:17:40 -0700 Subject: [PATCH] Expose minify param to the buildGraph method Summary: Now that the minifier is integrated inside the transformer, we can expose the param in the `buildGraph` method Reviewed By: davidaurelio Differential Revision: D7707542 fbshipit-source-id: 0125172b2ac90c7ceb477d5c55e9aea3c3867e02 --- 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 b8597395..367818c2 100644 --- a/packages/metro/src/index.js +++ b/packages/metro/src/index.js @@ -270,6 +270,7 @@ type BuildGraphOptions = {| ...PublicMetroOptions, entries: $ReadOnlyArray, dev?: boolean, + minify?: boolean, onProgress?: (transformedFileCount: number, totalFileCount: number) => void, platform?: string, type: 'module' | 'script', @@ -370,6 +371,7 @@ exports.buildGraph = async function({ config, dev = false, entries, + minify = false, onProgress, platform = `web`, type = 'module', @@ -384,6 +386,7 @@ exports.buildGraph = async function({ return await metroServer.buildGraph(entries, { ...MetroServer.DEFAULT_GRAPH_OPTIONS, dev, + minify, onProgress, platform, type,