JSDOM SSR renderer for Svelte
npm install @roxi/ssrnpm i @sveltech/ssr
$3
`javascript
const { ssr } require('@sveltech/ssr')
const fs = require('fs')
const template = fs.readFileSync('./dist/index.html')
const script = fs.readFileSync('./dist/app.js')
ssr(template, script, '/blog/ssr-is-fun')
.then(html => console.log(html + ''))
`
$3
The HTML is only rendered after an app-loaded event has been emitted from the app.
`javascript
dispatchEvent(new CustomEvent('app-loaded'))
``