From 0d34662698a29965bcfd5edd621c540fa27e8f5e Mon Sep 17 00:00:00 2001 From: Aria Fallah Date: Wed, 17 May 2023 21:16:31 -0700 Subject: [PATCH] Support the monaco editor in flipper and add it to the smax plugin Summary: ## Context The editor for mocks is currently just a textarea. It'd be nicer as a monaco editor :D ## Changes * Add monaco editor * Change bundler for flipper plugins to allow loading .ttf as `dataurl` * Resize the input/button for name and save and put them at the top next to each other * Add a default mock template for when the editor is empty allow-large-files Reviewed By: aigoncharov Differential Revision: D45929635 fbshipit-source-id: 66f3103d073ac630cb41d21f2ce3a7f89e15fed8 --- desktop/pkg-lib/src/runBuild.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/desktop/pkg-lib/src/runBuild.tsx b/desktop/pkg-lib/src/runBuild.tsx index 77de5cc35..ac07f17f4 100644 --- a/desktop/pkg-lib/src/runBuild.tsx +++ b/desktop/pkg-lib/src/runBuild.tsx @@ -74,6 +74,9 @@ async function runBuild({ sourcemap: dev ? 'inline' : 'external', minify: !dev, plugins: intern ? [resolveFbStubsToFbPlugin] : undefined, + loader: { + '.ttf': 'dataurl', + }, }); const sourceMapUrl = `${out}.map`;