Skip to content

Update Worker documentation framework guide for Tanstack start #25422

@mubrik

Description

@mubrik

Existing documentation URL(s)

https://developers.cloudflare.com/workers/framework-guides/web-apps/tanstack/

What changes are you suggesting?

Now that Tanstack Start has a release candidate, i think it's natural to have the documentation updated to match

Here:

export default defineConfig({
  server: {
    port: 3000,
  },
  plugins: [
    tsConfigPaths({
      projects: ["./tsconfig.json"],
    }),
    tanstackStart({
      target: "cloudflare-module", // Key configuration for Cloudflare compatibility
    }),
  ],
});

The recommended target key field is no longer supported by @tanstack/react-start/plugin/vite
An option (which is suggested by TS docs) is to use the cloudflare extension instead @cloudflare/vite-plugin

Here:

{
  "$schema": "node_modules/wrangler/config-schema.json",
  "name": "my-start-app",
  "main": ".output/server/index.mjs",
  "compatibility_date": "2025-09-25",
  "compatibility_flags": ["nodejs_compat"],
  "assets": {
    "directory": ".output/public"
  },
  "observability": {
    "enabled": true
  },
  "kv_namespaces": [
    {
      "binding": "CACHE",
      "id": "<Your KV ID>"
    }
  ]
}

The main entry point recommended: ".output/server/index.mjs"
I believe this should be changed to dist/serevr/server.js, Note before running build, wrangler might throw an error here

Additional information

Here's steps from tanstack documentation:

Image

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions