From 765874f4be83522cf808643a415051a0d6e69e13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20B=C3=BCchele?= Date: Wed, 6 Feb 2019 08:07:40 -0800 Subject: [PATCH] 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 --- src/dispatcher/plugins.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dispatcher/plugins.js b/src/dispatcher/plugins.js index 859eaddff..b16b4bac5 100644 --- a/src/dispatcher/plugins.js +++ b/src/dispatcher/plugins.js @@ -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 { + 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 =