Skip to content

Routing Reliability, Base Paths, and Cancellable Loaders

Choose a tag to compare

@bradpotts bradpotts released this 05 Sep 23:43
· 6 commits to main since this release

Contract change type: additive

Added

  • Added RouterOptions.basePath for deploying an app under a URL prefix (e.g. /portal) —
    stripped before route matching and re-applied by navigate(), replace(), href(), and
    link interception.
  • Route.loader now receives an AbortSignal, aborted when a navigation is superseded by
    another before the loader resolves (or on router.destroy()), so expensive in-flight work
    (e.g. fetch()) can be cancelled. Existing loaders that ignore the argument are unaffected.

Changed

  • Updated development tooling to ESLint 10.10 and Vitest 5.0.

Fixed

  • Handle malformed path encoding through onError and the configured error route instead of
    producing an unhandled rejection.
  • Clean up rendered parent pages when a required nested routing outlet is missing.
  • Preserve the full previous URL, including query strings and fragments, when a navigation
    guard cancels navigation in history or hash mode.
  • Invoke onError for unmatched routes even when no error route is configured.