Skip to content

Commit

Permalink
chore: fix preview site (#10519)
Browse files Browse the repository at this point in the history
Co-authored-by: Rich Harris <[email protected]>
  • Loading branch information
Rich-Harris and Rich-Harris authored Feb 18, 2024
1 parent 2755401 commit ce8495c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions sites/svelte-5-preview/src/lib/Output/Viewer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@
const __repl_exports = ${$bundle.client?.code};
{
const { mount, App } = __repl_exports;
const [, destroy] = mount(App, { target: document.body });
window.__unmount_previous = destroy;
const { mount, unmount, App } = __repl_exports;
const component = mount(App, { target: document.body });
window.__unmount_previous = () => unmount(component);
}
//# sourceURL=playground:output
`);
Expand Down
2 changes: 1 addition & 1 deletion sites/svelte-5-preview/src/lib/workers/bundler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ async function bundle({ uid, files }) {
lookup.set('./__entry.js', {
name: '__entry',
source: `
export { mount } from 'svelte';
export { mount, unmount } from 'svelte';
export {default as App} from './App.svelte';
`,
type: 'js',
Expand Down

0 comments on commit ce8495c

Please sign in to comment.