mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 09:21:21 +01:00
d1432b0ab3
* chore: fix playground prod preview * tweak * tweak
28 lines
686 B
HTML
28 lines
686 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<link rel="icon" href="/favicon.png" />
|
|
<link href="/demo.css" rel="stylesheet" />
|
|
<!--ssr-head-->
|
|
</head>
|
|
<body>
|
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
<div id="root"><!--ssr-body--></div>
|
|
|
|
<script type="module">
|
|
import { mount, hydrate, unmount } from 'svelte';
|
|
import App from '/src/main.svelte';
|
|
|
|
const root = document.getElementById('root');
|
|
const render = root.firstChild?.nextSibling ? hydrate : mount;
|
|
|
|
const component = render(App, {
|
|
target: document.getElementById('root')
|
|
});
|
|
|
|
// @ts-ignore
|
|
window.unmount = () => unmount(component);
|
|
</script>
|
|
</body>
|
|
</html>
|