From 79fe5a79cd8b178a36011d2a154b1697de8dfc74 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Thu, 20 Apr 2023 12:20:46 +0530 Subject: [PATCH] Properly load monaco workers --- src/lib/components/Editor.svelte | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/lib/components/Editor.svelte b/src/lib/components/Editor.svelte index 15dcbaa6..7e495b89 100644 --- a/src/lib/components/Editor.svelte +++ b/src/lib/components/Editor.svelte @@ -66,15 +66,6 @@ }; onMount(async () => { - const getWorkerModule = (moduleUrl: string, label: string) => { - return new Worker( - new URL('monaco-editor/esm/vs/' + moduleUrl + '.js?worker', import.meta.url), - { - name: label, - type: 'module' - } - ); - }; self.MonacoEnvironment = { getWorker(_, label) { if (label === 'json') { @@ -107,7 +98,7 @@ run: function () { syncDiagram(); logEvent('renderDiagram', { - method: 'keyboadShortcut' + method: 'keyboardShortcut' }); } });