Simplify bundled plugin setup
Summary: Stop bundling plugins into Flipper Server bundles. In later diffs, we will start building all plugins even in dev mode which removes the need to bundle them. Reviewed By: lblasa Differential Revision: D39276249 fbshipit-source-id: 091405cfcf58aa7e1bd2b382da40f8d9841ae6b1
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a67a4e5d0f
commit
a888e6affa
@@ -30,9 +30,9 @@ export class HeadlessPluginInitializer extends AbstractPluginInitializer {
|
||||
protected async requirePluginImpl(
|
||||
pluginDetails: ActivatablePluginDetails,
|
||||
): Promise<_SandyPluginDefinition> {
|
||||
const plugin = pluginDetails.isBundled
|
||||
? this.defaultPluginsIndex[pluginDetails.name]
|
||||
: await getRenderHostInstance().requirePlugin(pluginDetails.entry);
|
||||
const plugin = await getRenderHostInstance().requirePlugin(
|
||||
(pluginDetails as InstalledPluginDetails).entry,
|
||||
);
|
||||
if (!plugin) {
|
||||
throw new Error(
|
||||
`Failed to obtain plugin source for: ${pluginDetails.name}`,
|
||||
|
||||
@@ -46,7 +46,7 @@ export function initializeRenderHost(
|
||||
restartFlipper() {
|
||||
// TODO:
|
||||
},
|
||||
loadDefaultPlugins: getDefaultPluginsIndex,
|
||||
loadDefaultPlugins: () => ({}),
|
||||
serverConfig: flipperServerConfig,
|
||||
GK(gatekeeper) {
|
||||
return flipperServerConfig.gatekeepers[gatekeeper] ?? false;
|
||||
@@ -81,8 +81,3 @@ export function initializeRenderHost(
|
||||
},
|
||||
} as RenderHost;
|
||||
}
|
||||
|
||||
function getDefaultPluginsIndex() {
|
||||
// TODO: Fix me
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user