Neuerungen in Svelte und SvelteKit im Dezember 2022
SvelteKit bietet neue Funktionen wie willUnload, Caching für __data.json, Unterstützung für Hash-Links und Redirects im handle-Hook sowie optionale Fallback-Komponenten.
SvelteKit 1.0 is just around the corner! With 99% of the milestone issues completed, there’s a lot of new changes from the last month to cover...
Let’s get to it!
What’s new in SvelteKit
- Use the
willUnloadproperty to find out if the navigation will result the app being unloaded (full page reload/closing/leaving to another page). (#6813) __data.jsonrequests now allows for caching while ensuring we cache matching responses for all invalidation scenarios (#7532)- Linking to
<a name="hash">tags is now supported (#7596) - Throwing redirects in the
handlehook is now supported (#7612) - A fallback component will now be added automatically for layouts without one (#7619)
- The new
preloadfunction within theresolvehook determines what files should be added to the tag to preload it (Docs, #4963, #7704) versionis now available via$app/environment(#7689, #7694) …