Fix fb-stubs replacement for plugin bundling

Reviewed By: nikoant

Differential Revision: D39765543

fbshipit-source-id: 14cbf8a9bdf35031e636bbbde3dbc955faedb66b
This commit is contained in:
Andrey Goncharov
2022-09-23 05:50:28 -07:00
committed by Facebook GitHub Bot
parent 61a8fe09e9
commit dd7ba2d6fc
11 changed files with 71 additions and 19 deletions

View File

@@ -13,6 +13,7 @@ import {pluginsDir} from './paths';
import path from 'path';
import {runBuild} from 'flipper-pkg-lib';
import {getWorkspaces} from './workspaces';
import isFB from './isFB';
async function bundleAllPlugins() {
const plugins = await getWorkspaces().then((workspaces) =>
@@ -24,7 +25,7 @@ async function bundleAllPlugins() {
console.log(`Bundling "${relativeDir}"`);
console.time(`Finished bundling "${relativeDir}"`);
try {
await runBuild(plugin.dir, false);
await runBuild(plugin.dir, false, isFB);
} catch (err) {
console.log(`Failed to bundle "${relativeDir}": ${err.message}`);
errors.set(relativeDir, err);