Fix --no-bundled-plugins was not respected

Summary: Even with the `--no-bundled-plugins` flag, still a hundred plugins were loaded when running flipper-server

Reviewed By: timur-valiev, aigoncharov

Differential Revision: D32987158

fbshipit-source-id: 19e51e7e5f8ec9e664eb48cf2f2b8936f2f5ed73
This commit is contained in:
Michel Weststrate
2021-12-13 05:46:42 -08:00
committed by Facebook GitHub Bot
parent 34a1da3345
commit 7e9ad72baa
3 changed files with 6 additions and 3 deletions

View File

@@ -68,7 +68,10 @@ export class PluginManager {
}
async getBundledPlugins(): Promise<Array<BundledPluginDetails>> {
if (process.env.NODE_ENV === 'test') {
if (
process.env.NODE_ENV === 'test' ||
process.env.FLIPPER_NO_BUNDLED_PLUGINS === 'true'
) {
return [];
}
// defaultPlugins that are included in the Flipper distributive.