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:
committed by
Facebook GitHub Bot
parent
34a1da3345
commit
7e9ad72baa
@@ -68,7 +68,10 @@ export class PluginManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getBundledPlugins(): Promise<Array<BundledPluginDetails>> {
|
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 [];
|
return [];
|
||||||
}
|
}
|
||||||
// defaultPlugins that are included in the Flipper distributive.
|
// defaultPlugins that are included in the Flipper distributive.
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ const argv = yargs
|
|||||||
},
|
},
|
||||||
'bundled-plugins': {
|
'bundled-plugins': {
|
||||||
describe:
|
describe:
|
||||||
'Enables bundling of plugins into Flipper bundle. This is useful for debugging, because it makes Flipper dev mode loading faster and unblocks fast refresh. The flag is enabled by default. Env var FLIPPER_NO_BUNDLEDD_PLUGINS is equivalent to the command-line option "--no-bundled-plugins".',
|
'Enables bundling of plugins into Flipper bundle. This is useful for debugging, because it makes Flipper dev mode loading faster and unblocks fast refresh. The flag is enabled by default. Env var FLIPPER_NO_BUNDLED_PLUGINS is equivalent to the command-line option "--no-bundled-plugins".',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
},
|
},
|
||||||
'rebuild-plugins': {
|
'rebuild-plugins': {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const argv = yargs
|
|||||||
},
|
},
|
||||||
'bundled-plugins': {
|
'bundled-plugins': {
|
||||||
describe:
|
describe:
|
||||||
'Enables bundling of plugins into Flipper bundle. This is useful for debugging, because it makes Flipper dev mode loading faster and unblocks fast refresh. The flag is enabled by default. Env var FLIPPER_NO_BUNDLEDD_PLUGINS is equivalent to the command-line option "--no-bundled-plugins".',
|
'Enables bundling of plugins into Flipper bundle. This is useful for debugging, because it makes Flipper dev mode loading faster and unblocks fast refresh. The flag is enabled by default. Env var FLIPPER_NO_BUNDLED_PLUGINS is equivalent to the command-line option "--no-bundled-plugins".',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
},
|
},
|
||||||
'rebuild-plugins': {
|
'rebuild-plugins': {
|
||||||
|
|||||||
Reference in New Issue
Block a user