You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/playgrounds/demo/index.html

29 lines
713 B

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<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>