Error when using with sveltekit 1.0
Closed this issue · 6 comments
When I attempt to implement this in +layout.svelte or +page.svelte I get the below error;
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. Otherwise you may need to fix a .
Error: 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. Otherwise you may need to fix a .
Hi @jtfogarty
Interesting... never saw this error.
Can you submit a sample?
Can you confirm using the latest npm release version? -> 0.7.8
0.7.7 was broken, had to rerelease.
Hi @orefalo
Here is my project
https://github.com/jtfogarty/md-blog-sk
it is on v 0.7.8
Thanks for your quick reply
I can get some of the examples on here to work.
I was looking at the modern example and get an error with
<HighlightSvelte {code} />
If I remove this the csss gives error.
This example is not one that can be copied / paste.
Happy new year @jtfogarty
I got your example to work with...
<script>
import { Pane, Splitpanes } from 'svelte-splitpanes';
</script>
<!--
{#if Splitpanes}
<svelte:self this={Splitpanes} />
{/if} -->
<Splitpanes>
<div>Pane 1</div>
<div><slot /></div>
</Splitpanes>
which brings something we may have missed in the examples/online code... we didn't include the import statement
Just updated all examples with proper import statements.
As far as <HighlightSvelte {code} />
you should have no issues removing it from your code it you don't import it, reference it in the html.
Please confirm resolution, and close this ticket
Thank you
Thanks for the help.