github TanStack/router @tanstack/router-plugin@1.170.0

latest release: release-2026-11-28-1923
2 hours ago

Minor Changes

  • #8965 611b364 - Start's Vite plugin can be used in a Vitest config. When Vitest resolves the config to run tests, the plugin compiles the code as it does in the app (createServerFn, createIsomorphicFn, createServerOnlyFn, createClientOnlyFn, the server-only route options), for the client in browser mode and in jsdom or happy-dom, and for the server in the Node environment. It does not set up the app's dev server, preview server or build.

    • A project needs no router entry and no routes. A package that only uses Start's compile-time APIs used to fail with "Could not resolve entry for router entry".
    • The route tree is generated once, when Vitest starts, and only for a project with a router entry and a routes directory. It is not regenerated while Vitest watches.
    • A test run never writes route files: a route file with an outdated route path and an empty route file are left as they are, with a warning.
    • A module that calls createFileRoute, createRootRoute or createRootRouteWithContext loses its server, ssr and headers options in client code even when the route generator does not know the module.
    • It needs Vitest 5.1.1 or later. Before, Vitest's translation of the wildcards in resolve.noExternal missed a package name with a dash, so in a project that installs Start from the registry, jsdom, happy-dom and Node tests ran @tanstack/start-client-core without the Start compiler.

    For this, Generator of @tanstack/router-generator takes writeRouteFiles: false, and tanstackRouterGenerator of @tanstack/router-plugin/vite takes options for the plugin that embeds it.

Patch Changes

  • Updated dependencies [611b364]:
    • @tanstack/router-generator@1.169.0

Don't miss a new router release

NewReleases is sending notifications on new releases.