fix: remove monaco-editor for app preview code path for faster app loads

This commit is contained in:
Ruben Fiszel
2024-10-10 00:04:25 +02:00
parent 5bf0ade82d
commit 0902bec982
@@ -6,9 +6,9 @@
import { filteredContentForExport } from '../utils'
import YAML from 'yaml'
import SimpleEditor from '$lib/components/SimpleEditor.svelte'
import { Button } from '$lib/components/common'
import { sendUserToast } from '$lib/toast'
import { Loader2 } from 'lucide-svelte'
const { flowStore } = getContext<FlowEditorContext>('FlowEditorContext')
@@ -56,7 +56,11 @@
</svelte:fragment>
{#if $flowStore}
<SimpleEditor autoHeight bind:code lang="yaml" />
{#await import('../../SimpleEditor.svelte')}
<Loader2 class="animate-spin" />
{:then Module}
<Module.default autoHeight bind:code lang="yaml" />
{/await}
{/if}
</DrawerContent>
</Drawer>