chore: fix preview site ()

Co-authored-by: Rich Harris <rich.harris@vercel.com>
pull/10518/head
Rich Harris 1 year ago committed by GitHub
parent 2755401034
commit ce8495c66d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -131,9 +131,9 @@
const __repl_exports = ${$bundle.client?.code}; const __repl_exports = ${$bundle.client?.code};
{ {
const { mount, App } = __repl_exports; const { mount, unmount, App } = __repl_exports;
const [, destroy] = mount(App, { target: document.body }); const component = mount(App, { target: document.body });
window.__unmount_previous = destroy; window.__unmount_previous = () => unmount(component);
} }
//# sourceURL=playground:output //# sourceURL=playground:output
`); `);

@ -485,7 +485,7 @@ async function bundle({ uid, files }) {
lookup.set('./__entry.js', { lookup.set('./__entry.js', {
name: '__entry', name: '__entry',
source: ` source: `
export { mount } from 'svelte'; export { mount, unmount } from 'svelte';
export {default as App} from './App.svelte'; export {default as App} from './App.svelte';
`, `,
type: 'js', type: 'js',

Loading…
Cancel
Save