Skip to content

Commit d83d398

Browse files
committed
chore: fix preview site
1 parent 2755401 commit d83d398

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sites/svelte-5-preview/src/lib/Output/Viewer.svelte

+3-3
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@
131131
132132
const __repl_exports = ${$bundle.client?.code};
133133
{
134-
const { mount, App } = __repl_exports;
135-
const [, destroy] = mount(App, { target: document.body });
136-
window.__unmount_previous = destroy;
134+
const { mount, unmount, App } = __repl_exports;
135+
const component = mount(App, { target: document.body });
136+
window.__unmount_previous = () => unmount(component);
137137
}
138138
//# sourceURL=playground:output
139139
`);

sites/svelte-5-preview/src/lib/workers/bundler/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ async function bundle({ uid, files }) {
485485
lookup.set('./__entry.js', {
486486
name: '__entry',
487487
source: `
488-
export { mount } from 'svelte';
488+
export { mount, unmount } from 'svelte';
489489
export {default as App} from './App.svelte';
490490
`,
491491
type: 'js',

0 commit comments

Comments
 (0)