diff --git a/playgrounds/demo/demo-client.ts b/playgrounds/demo/demo-client.ts deleted file mode 100644 index acf96e6490..0000000000 --- a/playgrounds/demo/demo-client.ts +++ /dev/null @@ -1,12 +0,0 @@ -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); diff --git a/playgrounds/demo/dist/index.js b/playgrounds/demo/dist/index.js deleted file mode 100644 index ddf268b8c5..0000000000 --- a/playgrounds/demo/dist/index.js +++ /dev/null @@ -1,22 +0,0 @@ -import fs from 'node:fs'; -import path from 'node:path'; -import express from 'express'; -import { head, body } from './server/entry-server.js'; - -const rendered = fs - .readFileSync(path.resolve('./dist/client/index.html'), 'utf-8') - .replace(``, body) - .replace(``, head); - -express() - .use('*', async (req, res) => { - if (req.originalUrl !== '/') { - res.sendFile(path.resolve('./dist/client' + req.originalUrl)); - return; - } - - res.status(200).set({ 'Content-Type': 'text/html' }).end(rendered); - }) - .listen('3000'); - -console.log('listening on http://localhost:3000'); diff --git a/playgrounds/demo/index.html b/playgrounds/demo/index.html index ddaccadff3..16a8151940 100644 --- a/playgrounds/demo/index.html +++ b/playgrounds/demo/index.html @@ -8,6 +8,20 @@
- + +