no bundled plugins while developing

Summary: While running in dev mode, there are no bundled plugins. This was causing an error messages being logged. Now we early return an empty array to prevent the error.

Reviewed By: passy

Differential Revision: D13971930

fbshipit-source-id: 4110a3ea5d6d2e60b3de17a43d497a3727b8e441
This commit is contained in:
Daniel Büchele
2019-02-06 08:07:40 -08:00
committed by Facebook Github Bot
parent 14ae2fea2c
commit 765874f4be

View File

@@ -25,6 +25,7 @@ import {FlipperBasePlugin} from '../plugin.js';
import {setupMenuBar} from '../MenuBar.js';
import path from 'path';
import {default as config} from '../utils/processConfig.js';
import isProduction from '../utils/isProduction';
export type PluginDefinition = {
name: string,
@@ -74,6 +75,11 @@ export default (store: Store, logger: Logger) => {
};
function getBundledPlugins(): Array<PluginDefinition> {
if (!isProduction()) {
// Plugins are only bundled in production builds
return [];
}
// DefaultPlugins that are included in the bundle.
// List of defaultPlugins is written at build time
const pluginPath =