Closed zrthxn closed 2 years ago
Any idea why this might be happening?
codemirror, the underlying library only works in a browser context.
As your error starts with [vite] Error when evaluating SSR module
, I assume you trying to prerender the component on the server.
Or how I can fix it?
I do not know much about vite, sorry. I think you need to somehow tell it to render the component only when in the browser.
I've tried doing that like so
let Editor;
onMount(async () => {
Editor = (await import('@svelte-parts/editor')).default;
});
This doesnt give me the error but nothing really happens, Editor
is never rendered if I do
<svelte:component this={Editor}/>
I'm trying to use the editor package, almost exactly as you've recommended in the readme
But I get the following error
Any idea why this might be happening? Or how I can fix it?