@sveltejs/kit@2.51.0
📦 sveltekitView on GitHub →
✨ 2 features🐛 7 fixes🔧 11 symbols
Summary
This release introduces scroll position tracking in navigation callbacks and improves CSP compatibility for hydration. Several bugs related to fetching, error handling, and tsconfig generation have also been resolved.
✨ New Features
- Navigation callbacks (`beforeNavigate`, `onNavigate`, and `afterNavigate`) now include scroll position information via the `scroll` property on `from` and `to` targets.
- The injected script for `hydratable` now works correctly when Content Security Policy (CSP) is in use.
🐛 Bug Fixes
- Preloads are now correctly placed before styles.
- Suppressed false-positive inner content warning when the `children` prop is forwarded to a child component.
- Fixed `fetch` not working when the URL is on the same host but different from `paths.base`.
- Fixed navigation to a hash link when the `<base>` element is present.
- Avoided triggering `handleError` when redirecting within a remote function.
- Included the `test` directory in the generated `tsconfig.json` alongside the existing `tests` entry.
- Generate `tsconfig.json` using the value configured in `kit.files.src`.