Fix release build

Summary:
This diff fixes the issue where flipper-server didn't properly build when creating a release build, due to plugins being resolved from both source `desktop/plugins` and `desktop/static/defaultPlugins` folders.

The `desktop/plugins` folder should not be included in the build, but wasn't sure why not, as it isn't a problem for desktop release either?

Anyway solved it for now to unblock releasing by using bundled-plugins, which might actually be better anyway for a bunch of use cases of flipper-server (e.g. when installed to an OD). So I think this is fine for now.

It does increase the build to ~40 MB, which is still halve of our unbundled electron build.

Reviewed By: aigoncharov

Differential Revision: D33427938

fbshipit-source-id: c931c2d1bea1e04c7b1603a488dcb76a41488740
This commit is contained in:
Michel Weststrate
2022-01-10 08:56:54 -08:00
committed by Facebook GitHub Bot
parent 3d86280686
commit b05219d09c
3 changed files with 60 additions and 33 deletions

View File

@@ -53,9 +53,12 @@ export async function downloadIcons(buildFolder: string) {
const url = getPublicIconUrl(icon);
return fetch(url, {
retryOptions: {
retryMaxDuration: 30 * 1000,
// Be default, only 5xx are retried but we're getting the odd 404
// which goes away on a retry for some reason.
retryOnHttpResponse: (res) => res.status >= 400,
// @ts-expect-error not available in typings, but provided in docs (if this errors in future, remove the comment!)
retryOnHttpError: () => true,
},
})
.then((res) => {