github sveltejs/kit @sveltejs/kit@2.51.0

latest releases: @sveltejs/adapter-auto@7.0.1, @sveltejs/enhanced-img@0.10.2, @sveltejs/adapter-netlify@6.0.0...
4 hours ago

Minor Changes

  • feat: add scroll property to NavigationTarget in navigation callbacks (#15248)

    Navigation callbacks (beforeNavigate, onNavigate, and afterNavigate) now include scroll position information via the scroll property on from and to targets:

    • from.scroll: The scroll position at the moment navigation was triggered
    • to.scroll: In beforeNavigate and onNavigate, this is populated for popstate navigations (back/forward) with the scroll position that will be restored, and null for other navigation types. In afterNavigate, this is always the final scroll position after navigation completed.

    This enables use cases like animating transitions based on the target scroll position when using browser back/forward navigation.

  • feat: hydratable's injected script now works with CSP (#15048)

Patch Changes

  • fix: put preloads before styles (#15232)

  • fix: suppress false-positive inner content warning when children prop is forwarded to a child component (#15269)

  • fix: fetch not working when URL is same host but different than paths.base (#15291)

  • fix: navigate to hash link when base element is present (#15236)

  • fix: avoid triggering handleError when redirecting in a remote function (#15222)

  • fix: include test directory in generated tsconfig.json alongside existing tests entry (#15254)

  • fix: generate tsconfig.json using the value of kit.files.src (#15253)

Don't miss a new kit release

NewReleases is sending notifications on new releases.