Skip to content

@tanstack/vue-start@1.170.0

Choose a tag to compare

@github-actions github-actions released this 28 Nov 19:23
Immutable release. Only release title and notes can be modified.
54dfe7f

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

  • #8965 611b364 - fix: Vite pre-bundles @tanstack/vue-store for a project that depends on @tanstack/vue-start but not on @tanstack/vue-router itself. Start named the dependency by a path through @tanstack/vue-router, which only resolves from a project that depends on the router. In such a project Vite warned "Failed to resolve dependency: @tanstack/vue-router > @tanstack/vue-store", found the store when the router was first imported and reloaded the page.

  • Updated dependencies [611b364, 611b364]:

    • @tanstack/start-plugin-core@1.173.0