Fix electron error during build for desktop plugins (#4145)

Summary:
Related GH issue: https://github.com/facebook/flipper/issues/4139

Context:
The current direction is that all plugins should be able to run in browser envs. Opening external windows, deeplinks and etc. should be abstracted away in getFlipperLib().
For plugin developers, it could be challenging to upgrade the existing plugins that rely on electron being present. We should not failing the build process for them because their plugins depend on electron.

Allow desktop plugin to build

Relevant ticket: https://github.com/facebook/flipper/issues/4139

Pull Request resolved: https://github.com/facebook/flipper/pull/4145

Reviewed By: mweststrate

Differential Revision: D39887902

Pulled By: mweststrate

fbshipit-source-id: 4132912b5a2b598c7897d434647cffed6980de19
This commit is contained in:
Aero Wang
2022-09-29 09:09:44 -07:00
committed by Facebook GitHub Bot
parent 35e6dc0352
commit b596c9c797

View File

@@ -65,6 +65,8 @@ async function runBuild({
'@ant-design/icons',
// It is an optional dependency for rollup that we use in react-devtools
'fsevents',
// Allow desktop plugins that require electron to build (deprecated)
'electron',
],
sourcemap: dev ? 'inline' : 'external',
minify: !dev,