Do not load installed plugins in dev mode by default

Summary: Installed plugins loaded and make it impossible to debug plugin changes. We need to disable them by default for `yarn start`. To debug plugin installation and auto-update, need to use command `yarn start --plugin-auto-update` instead.

Reviewed By: passy

Differential Revision: D25639345

fbshipit-source-id: 99b59a90dc09ac33a3604487fe501774e5e6fc39
This commit is contained in:
Anton Nikolaev
2020-12-18 08:48:05 -08:00
committed by Facebook GitHub Bot
parent 8af2d819b0
commit a826a240ce

View File

@@ -41,7 +41,9 @@ export default async function loadDynamicPlugins(): Promise<
).map((p: any) => p.name) as string[],
);
const [installedPlugins, unfilteredSourcePlugins] = await Promise.all([
getInstalledPlugins(),
process.env.FLIPPER_DISABLE_PLUGIN_AUTO_UPDATE
? Promise.resolve([])
: getInstalledPlugins(),
getSourcePlugins(),
]);
const sourcePlugins = unfilteredSourcePlugins.filter(