From b596c9c797b9c6027304de9c4ae1d0741cef9ec8 Mon Sep 17 00:00:00 2001 From: Aero Wang Date: Thu, 29 Sep 2022 09:09:44 -0700 Subject: [PATCH] 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 --- desktop/pkg-lib/src/runBuild.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop/pkg-lib/src/runBuild.tsx b/desktop/pkg-lib/src/runBuild.tsx index 693b93990..291f89b53 100644 --- a/desktop/pkg-lib/src/runBuild.tsx +++ b/desktop/pkg-lib/src/runBuild.tsx @@ -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,