diff --git a/v2/pkg/templates/templates/svelte-ts/frontend/src/main.ts b/v2/pkg/templates/templates/svelte-ts/frontend/src/main.ts index 95c41a51d20..3a65b849de7 100644 --- a/v2/pkg/templates/templates/svelte-ts/frontend/src/main.ts +++ b/v2/pkg/templates/templates/svelte-ts/frontend/src/main.ts @@ -1,8 +1,9 @@ +import { mount } from 'svelte' import './style.css' import App from './App.svelte' -const app = new App({ - target: document.getElementById('app') +const app = mount(App, { + target: document.getElementById('app') as HTMLElement }) export default app diff --git a/v2/pkg/templates/templates/svelte/frontend/src/main.js b/v2/pkg/templates/templates/svelte/frontend/src/main.js index 95c41a51d20..221e7ebaf1c 100644 --- a/v2/pkg/templates/templates/svelte/frontend/src/main.js +++ b/v2/pkg/templates/templates/svelte/frontend/src/main.js @@ -1,7 +1,8 @@ +import { mount } from 'svelte' import './style.css' import App from './App.svelte' -const app = new App({ +const app = mount(App, { target: document.getElementById('app') }) diff --git a/website/src/pages/changelog.mdx b/website/src/pages/changelog.mdx index f5daf0729ec..5c1001358e3 100644 --- a/website/src/pages/changelog.mdx +++ b/website/src/pages/changelog.mdx @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Fixed v2 `svelte` and `svelte-ts` templates scaffolding a blank page by migrating from the removed Svelte 4 `new App()` API to Svelte 5 `mount()` [#6001](https://github.com/wailsapp/wails/issues/6001) by @haoku123 + ## v2.15.0 - 2026-08-17 ### Added