Railway, the cloud platform competing with Heroku and Vercel, just slashed its frontend build times from 10-15 minutes to 1 minute 45 seconds. Engineers ditched Next.js entirely and rebuilt using Vite, React, Tailwind CSS, and shadcn/ui components. Deployments now fly through CI/CD pipelines, freeing up developer time and compute resources.
This isn’t hype—it’s a real-world fix for a common pain point. Railway’s frontend serves a complex dashboard for app deployments, templates, and billing. Next.js handled it, but builds dragged on Vercel’s infrastructure. Webpack’s slow compilation, especially with TypeScript and large codebases, pushed times past 10 minutes consistently. Even Next.js 14’s Turbopack experiments didn’t close the gap enough.
Next.js’s Build Bottlenecks Exposed
Next.js dominates React frameworks, powering sites like Netflix and TikTok. It bundles SSR, SSG, API routes, and image optimization. But that convenience comes at a cost. Production builds invoke webpack (or swc in newer versions), which chugs through thousands of modules. For Railway’s 500+ page monorepo, this meant 10+ minute waits per deploy.
Numbers tell the story: Railway tracked median build times hitting 12 minutes, with peaks at 20. Vercel bills by build minutes—those add up. Developers twiddled thumbs or switched branches mid-build. In a competitive space where Railway pushes “deploy in seconds,” slow frontend deploys undercut the brand.
Skeptical take: Next.js works fine for smaller apps or content sites. Its app router shines for SEO-heavy pages. But for dashboard-style SPAs with heavy client-side logic, the overhead mounts. Railway’s move echoes complaints from other teams—Reddit threads and HN posts lament similar 5-20 minute builds on mid-sized projects.
The New Stack: Lean and Lightning-Fast
Railway rebuilt from scratch in three weeks. Core: Vite for bundling and dev server. Vite uses esbuild for lightning transpilation—initial builds in seconds, HMR under 50ms. React handles UI, Tailwind for styling, shadcn/ui for pre-built components. TypeScript everywhere, no server-side rendering.
Key metrics post-switch:
- Local dev startup: 2 seconds (was 30+)
- HMR: <50ms
- Production build: 1:45
- Bundle size: 1.2MB gzipped (down 20%)
- Deployments per day: doubled without extra hardware
They host on Railway itself, using Docker for deploys. No lock-in to Vercel. The repo stays monorepo-style with Turborepo for shared packages, but Vite handles the frontend slice independently.
Tradeoffs exist. No built-in SSR means client-side routing only—fine for logged-in dashboards, risky for public pages. Team lost Next.js niceties like automatic code-splitting per route. But gains outweigh: engineers report 5x faster iteration cycles.
Why This Matters for Devs and Platforms
Build speed dictates productivity. At 10 minutes per PR, a team of 10 loses 1,000+ hours yearly to waiting. Railway’s fix reclaims that for coding. Platforms like Vercel face pressure—users eye alternatives when builds lag.
Bigger picture: Frameworks bloat over time. Next.js ballooned from 2016’s simple React setup to a full-stack behemoth. Vite proves you can ship fast without it. Expect copycats: indie hackers already fork shadcn templates for Vite. For SaaS dashboards, this stack—Vite + React + Tailwind—becomes the new default.
Railway open-sourced parts on GitHub, inviting scrutiny. Fork it, benchmark your builds. If you’re on Next.js with 5+ minute deploys, test Vite. The savings compound: faster deploys mean quicker feedback, fewer bugs, happier teams.
Bottom line: Right tool for the job. Next.js isn’t dead—pick based on needs. Railway proves ditching it pays off when speed trumps features.
