chore: render head output in playground (#9123)

pull/9126/head
gtmnayan 11 months ago committed by GitHub
parent ba1e67844e
commit d06cfe3723
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -69,11 +69,12 @@ const watcher = watch([
async generateBundle(_, bundle) {
const result = bundle['entry-server.js'];
const mod = (0, eval)(result.code);
const { html } = mod.render();
const { html, head } = mod.render();
writeFileSync(
'dist/index.html',
readFileSync('src/template.html', 'utf-8')
.replace('<!--app-head-->', head)
.replace('<!--app-html-->', html)
.replace('<!--app-title-->', svelte.VERSION)
);

Loading…
Cancel
Save