idris-maps / svelte-parts

Svelte components
https://svelte-parts.surge.sh
49 stars 5 forks source link

<Editor> is not a valid SSR component. #9

Closed hhaoao closed 3 years ago

hhaoao commented 3 years ago

I tried to [https://github.com/codemirror/CodeMirror/issues/5492](CodeMirror issues) disable SSR, but found that I needed to disable SSR globally.

https://kit.svelte.dev/docs#ssr-and-javascript-ssr

disable SSR a page-level ssr export don't work.

markdown.svelte

<script context="module">
  import Editor from '@svelte-parts/editor';

  export const ssr = false;
</script>

<Editor/>

error log:

<Editor> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules
idris-maps commented 3 years ago

Hello @hhaoao,

I do not know much about svelte-kit. Not sure if there is a trick similar to the one from next in your link.

maybe you can try to ask your question on https://svelte.dev/chat