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:
committed by
Facebook Github Bot
parent
14ae2fea2c
commit
765874f4be
@@ -25,6 +25,7 @@ import {FlipperBasePlugin} from '../plugin.js';
|
|||||||
import {setupMenuBar} from '../MenuBar.js';
|
import {setupMenuBar} from '../MenuBar.js';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import {default as config} from '../utils/processConfig.js';
|
import {default as config} from '../utils/processConfig.js';
|
||||||
|
import isProduction from '../utils/isProduction';
|
||||||
|
|
||||||
export type PluginDefinition = {
|
export type PluginDefinition = {
|
||||||
name: string,
|
name: string,
|
||||||
@@ -74,6 +75,11 @@ export default (store: Store, logger: Logger) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function getBundledPlugins(): Array<PluginDefinition> {
|
function getBundledPlugins(): Array<PluginDefinition> {
|
||||||
|
if (!isProduction()) {
|
||||||
|
// Plugins are only bundled in production builds
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
// DefaultPlugins that are included in the bundle.
|
// DefaultPlugins that are included in the bundle.
|
||||||
// List of defaultPlugins is written at build time
|
// List of defaultPlugins is written at build time
|
||||||
const pluginPath =
|
const pluginPath =
|
||||||
|
|||||||
Reference in New Issue
Block a user