Skip to content

Feature Request: Svelte equivalent to React's renderToString() #14928

Answered by dummdidumm
pjebs asked this question in Q&A
Discussion options

You must be logged in to vote

Can you provide a repository? Hard to say what the problem is without seeing the whole picture. Some shots in the dark:

  • make sure you're compiling for the server (generate: 'server' compiler option)
  • make sure whatever environment is responsibly for loading/bundling the code is using the correct export map entry (i.e. if you have import { onMount } from 'svelte' somewhere it should resolve to the server version of that import via the export map)

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@pjebs
Comment options

@pjebs
Comment options

@pjebs
Comment options

@dummdidumm
Comment options

Answer selected by pjebs
@pjebs
Comment options

@pjebs
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #14926 on January 07, 2025 12:13.