sveltekit: Fallback file does not exist in injected manifest (for SPA app)

I am currently creating a SPA using Svelte 5, SvelteKit 2 and Vite 6. For the SvelteKitPWA plugin I use the injectManifest strategy and I configured my fallback(for sveltekit adapater static) to be app.html.

When I build my project I see the app.html file correctly in the build folder. However when I inspect the injected data in my service worker the entry for app.html is missing (as a matter of fact not even an app entry is there.

I looked a bit into this plugins code and it seems like you guys are expecting a fallback.html inside the prerender/pages folder (inside .svelte-kit). However that folder does not contain a fallback.html file (nor does it contain an app.html file) the only files it contains are the once from my actual pre-rendered pages.

Not sure if that is some type of recent change in how Vite/SvelteKit works or am I missing some setup?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 27 (17 by maintainers)

Most upvoted comments