Skip to content

feat(builder): add Vercel as a deploy provider#905

Open
HiMarioLopez wants to merge 1 commit intoTanStack:mainfrom
HiMarioLopez:feat/vercel-deploy-provider
Open

feat(builder): add Vercel as a deploy provider#905
HiMarioLopez wants to merge 1 commit intoTanStack:mainfrom
HiMarioLopez:feat/vercel-deploy-provider

Conversation

@HiMarioLopez
Copy link
Copy Markdown

@HiMarioLopez HiMarioLopez commented May 8, 2026

Adds Vercel to the builder's deploy actions, alongside Cloudflare, Netlify, and Railway. TanStack Start has first-party support on Vercel via the Nitro Vite plugin.

Changes

  • New "Deploy to Vercel" button next to Railway, styled black/white per Vercel's brand
  • Vercel added to DeployProvider / StarterDeployProvider unions and PROVIDER_INFO (deploy URL: vercel.com/new/clone?repository-url=...)
  • provider-config.server.ts mirrors the Railway/Nitro path, with one deviation: pins nitro to latest (stable beta) instead of nitro-nightly. Today's nightly hits a 508 INFINITE_LOOP_DETECTED on Vercel; the stable beta works.

Verified

Deployed a real TanStack Start app via this exact config — build succeeded, served HTTP 200. The vercel.com/new/clone URL renders the expected import page.

Summary by CodeRabbit

  • New Features
    • Added Vercel as a new deployment provider option, enabling users to deploy directly to Vercel from the CLI
    • Vercel deployment includes automatic configuration for both static site and dynamic application projects

@netlify
Copy link
Copy Markdown

netlify Bot commented May 8, 2026

👷 Deploy request for tanstack pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 26a586d

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4da965b9-f0a3-4650-9c8f-c66ab58d0ff0

📥 Commits

Reviewing files that changed from the base of the PR and between ed718de and 26a586d.

📒 Files selected for processing (4)
  • src/components/ApplicationStarter.tsx
  • src/components/application-builder/shared.ts
  • src/components/deploy/shared.ts
  • src/utils/provider-config.server.ts
✅ Files skipped from review due to trivial changes (1)
  • src/components/application-builder/shared.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/components/ApplicationStarter.tsx
  • src/utils/provider-config.server.ts
  • src/components/deploy/shared.ts

📝 Walkthrough

Walkthrough

This PR adds Vercel as a deployment provider: extends provider types, adds PROVIDER_INFO for Vercel, wires provider resolution, adds Vercel project scaffolding (devDependency, vercel.json rewrite, build script, Vite Nitro plugin), and adds a "Deploy to Vercel" UI button.

Changes

Vercel Deployment Provider

Layer / File(s) Summary
Provider Type Definitions
src/components/application-builder/shared.ts, src/components/deploy/shared.ts, src/utils/provider-config.server.ts
StarterDeployProvider and DeployProvider types are extended to include 'vercel'.
Provider Metadata and Configuration
src/components/deploy/shared.ts
PROVIDER_INFO gains a vercel entry with display name, color, and a deployUrl(owner, repo) builder.
Provider Resolution
src/utils/provider-config.server.ts
getProviderConfig() switch includes a vercel case that invokes getVercelConfig().
Project File Configuration
src/utils/provider-config.server.ts
getVercelConfig() adds Nitro devDependency; getStaticSiteConfig() emits vercel.json rewrite for SPAs; updatePackageJson() ensures a build script; updateViteConfig() injects nitro/vite import and adds nitro() to Vite plugins; generateExampleDescription() maps 'vercel' to "Vercel".
UI Button and Descriptions
src/components/ApplicationStarter.tsx, src/utils/provider-config.server.ts
A "Deploy to Vercel" button is added to the action menu; provider display name mapping updated.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I nudged a button, smooth and new,
A vercel rocket ready to pursue,
Configs and rewrites placed with care,
Nitro tucked into devs' lair,
Now deploys hop off into the blue. 🚀

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 77.78% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(builder): add Vercel as a deploy provider' clearly and concisely describes the primary change—adding Vercel as a new deployment provider option to the application builder.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/utils/provider-config.server.ts (1)

117-134: ⚡ Quick win

Consolidate duplicated Nitro-provider logic to reduce drift risk.

getVercelConfig and the Vercel updateViteConfig branch currently duplicate Railway behavior; extracting a shared Nitro helper would make future edits safer.

♻️ Suggested refactor sketch
+function isNitroProvider(provider: DeployProvider): boolean {
+  return provider === 'railway' || provider === 'vercel'
+}
+
+function getNitroConfig(): ProviderConfigResult {
+  return {
+    files: {},
+    devDependencies: {
+      nitro: 'npm:nitro-nightly@latest',
+    },
+  }
+}
+
 function getRailwayConfig(): ProviderConfigResult {
-  return {
-    files: {},
-    devDependencies: {
-      nitro: 'npm:nitro-nightly@latest',
-    },
-  }
+  return getNitroConfig()
 }
 
 function getVercelConfig(): ProviderConfigResult {
-  return {
-    files: {},
-    devDependencies: {
-      nitro: 'npm:nitro-nightly@latest',
-    },
-  }
+  return getNitroConfig()
 }
-    case 'railway': {
-      // Add nitro import if not present
-      if (!result.includes('nitro/vite')) {
-        const lastImportIndex = findLastImportIndex(result)
-        const importStatement = `import { nitro } from 'nitro/vite'\n`
-        result =
-          result.slice(0, lastImportIndex) +
-          importStatement +
-          result.slice(lastImportIndex)
-      }
-
-      // Add nitro() to plugins array
-      result = addPluginToConfig(result, 'nitro()')
-      break
-    }
-
-    case 'vercel': {
+    case 'railway':
+    case 'vercel': {
       // Add nitro import if not present
       if (!result.includes('nitro/vite')) {
         const lastImportIndex = findLastImportIndex(result)
         const importStatement = `import { nitro } from 'nitro/vite'\n`
         result =

Also applies to: 409-423

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/utils/provider-config.server.ts` around lines 117 - 134, getVercelConfig
duplicates Nitro/provider setup that's also implemented in the Vercel branch of
updateViteConfig (and the Railway logic); extract the common Nitro provider
logic into a shared helper (e.g., createNitroProviderConfig or
applyNitroViteConfig) and have getVercelConfig, the Vercel branch in
updateViteConfig, and the Railway branch call that helper instead of repeating
the nitro devDependencies/files setup; update function names referenced:
getVercelConfig and updateViteConfig to use the new helper and remove the
duplicated nitro-specific lines.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/utils/provider-config.server.ts`:
- Around line 117-134: getVercelConfig duplicates Nitro/provider setup that's
also implemented in the Vercel branch of updateViteConfig (and the Railway
logic); extract the common Nitro provider logic into a shared helper (e.g.,
createNitroProviderConfig or applyNitroViteConfig) and have getVercelConfig, the
Vercel branch in updateViteConfig, and the Railway branch call that helper
instead of repeating the nitro devDependencies/files setup; update function
names referenced: getVercelConfig and updateViteConfig to use the new helper and
remove the duplicated nitro-specific lines.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0c2322c6-5433-4440-a5e6-ff49628638b5

📥 Commits

Reviewing files that changed from the base of the PR and between 1cc3b6c and ed718de.

📒 Files selected for processing (4)
  • src/components/ApplicationStarter.tsx
  • src/components/application-builder/shared.ts
  • src/components/deploy/shared.ts
  • src/utils/provider-config.server.ts

@HiMarioLopez HiMarioLopez marked this pull request as draft May 8, 2026 21:09
@HiMarioLopez HiMarioLopez force-pushed the feat/vercel-deploy-provider branch from c4ba489 to 9ce36dc Compare May 8, 2026 21:16
TanStack Start has first-party support on Vercel via the Nitro Vite
plugin, so add Vercel alongside Cloudflare, Netlify, and Railway in
the builder's deploy actions.

Mirrors the Railway/Nitro path with one deviation: pins the nitro dep
to the stable 'latest' tag (currently a beta) instead of nitro-nightly,
because today's nightly hits a 508 INFINITE_LOOP_DETECTED on every
request when deployed to Vercel. Verified end-to-end with a real
TanStack Start app deployed via this exact config.

Refs: https://vercel.com/docs/frameworks/full-stack/tanstack-start
@HiMarioLopez HiMarioLopez force-pushed the feat/vercel-deploy-provider branch from 9ce36dc to 26a586d Compare May 8, 2026 21:17
@HiMarioLopez HiMarioLopez marked this pull request as ready for review May 8, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant