Remove dynamic dependencies from flipper-server

Summary:
Currently, Flipper Server has a few productions dependencies (mac-ca, node-fetch) that are not bundled with the Flipper Server. It makes it harder to distribute Flipper Server, as now all potential consumers need not only to download the bundle, but also install these additional dependencies.
This diff makes it possible to bundle `mac-ca` and `node-fetch` with Flipper Server. As a result, Flipper Server becomes dependency-free in production.

Reviewed By: lblasa

Differential Revision: D36345213

fbshipit-source-id: 2cd6ba1b3301b45dc2295891964ba020fd107586
This commit is contained in:
Andrey Goncharov
2022-05-13 03:19:47 -07:00
committed by Facebook GitHub Bot
parent 21dfeca756
commit d1ed676a48
14 changed files with 190 additions and 38 deletions

View File

@@ -46,10 +46,10 @@ export const BUILTINS = [
'repl',
'timers',
'perf_hooks',
'worker_threads',
'encoding',
'fsevents',
'./fsevents.node',
// MWE node-fetch looks strange here, not sure what the effect of changing that would be
'node-fetch',
// jest is referred to in source code, like in TestUtils, but we don't want to ever bundle it up!
'jest',
'@testing-library/react',