From 39e02f5852d05eaa7a62299c406b3cc5f04896a0 Mon Sep 17 00:00:00 2001 From: Anton Nikolaev Date: Wed, 28 Oct 2020 06:26:45 -0700 Subject: [PATCH] Fix flipper-pkg Summary: flipper-pkg is broken because of metro package name change. This change should fix it. Reviewed By: priteshrnandgaonkar Differential Revision: D24591217 fbshipit-source-id: 2036c43bc0c2bb052e56740a03dc248e7daa8cfc --- desktop/pkg-lib/src/runBuild.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/pkg-lib/src/runBuild.ts b/desktop/pkg-lib/src/runBuild.ts index ffb5ebd4d..cdc7a522f 100644 --- a/desktop/pkg-lib/src/runBuild.ts +++ b/desktop/pkg-lib/src/runBuild.ts @@ -15,10 +15,11 @@ import fs from 'fs-extra'; let metroDir: string | undefined; const metroDirPromise = getMetroDir().then((dir) => (metroDir = dir)); +// We need to include metro-runtime to the watched folders list because it contains modules which are included into the final bundle. async function getMetroDir() { let dir = __dirname; while (true) { - const dirToCheck = path.join(dir, 'node_modules', 'metro'); + const dirToCheck = path.join(dir, 'node_modules', 'metro-runtime'); if (await fs.pathExists(dirToCheck)) return dirToCheck; const nextDir = path.dirname(dir); if (!nextDir || nextDir === '' || nextDir === dir) {