chore: render head output in playground

pull/9123/head
gtmnayan 3 years ago
parent d2ed2ca329
commit 3a23277264

@ -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