Cloudflare just slop forked Next.js…

By Fireship

Share:

Key Concepts

  • V-Next: A re-implementation of the Next.js API built on top of Vite.
  • Vite: A modern frontend build tool that leverages Rollup and Rolldown for high-performance bundling.
  • Rolldown: A Rust-based bundler used by Vite to improve build speeds.
  • OpenNext: An existing open-source project designed to repackage Next.js build output for non-Vercel platforms.
  • Edge Computing: A distributed computing paradigm (e.g., Cloudflare Workers) that brings computation closer to the user.
  • Hydration: The process where client-side JavaScript converts static HTML into a dynamic, interactive web page.

1. The Vercel vs. Cloudflare Rivalry

The video highlights an escalating rivalry between Vercel and Cloudflare, characterized by public tension between their leadership. The core of the conflict lies in the deployment ecosystem:

  • Vercel’s Lock-in: Next.js is optimized for Vercel, utilizing a bespoke runtime for features like middleware, Incremental Static Regeneration (ISR), and image optimization.
  • The Deployment Constraint: Deploying Next.js on platforms like Cloudflare or Netlify has historically required "OpenNext," a fragile reverse-engineering approach that repackages Next.js build output.

2. The V-Next Framework

Cloudflare’s solution, V-Next, aims to bypass the limitations of OpenNext by rebuilding the Next.js framework from the ground up using Vite.

  • Development Methodology: Cloudflare utilized AI to accelerate development, achieving basic Server-Side Rendering (SSR), middleware, and server actions in one day. By day three, they achieved full client hydration on Cloudflare Workers.
  • Efficiency: The project reached 94% API coverage of Next.js in one week, costing approximately $1,100 in AI tokens.
  • Technical Advantage: By leveraging Vite and the Rust-based Rolldown bundler, V-Next claims significant performance gains over the standard Next.js build process.

3. Performance Benchmarks

Cloudflare’s internal benchmarks for V-Next compared to standard Next.js include:

  • Build Times: Up to 4.4x faster.
  • Bundle Size: 57% smaller.
  • User Testing: The presenter independently verified a 5x improvement in build times on their own project, byes.dev.

4. Migration and Implementation

The migration process to V-Next involves specific technical adjustments:

  • Agentic Assistance: Cloudflare provided an AI agent skill to automate the migration.
  • Key Refactoring Steps:
    • Updating package.json to include "type": "module" to enforce ES modules.
    • Renaming files containing JSX to the .jsx extension, a requirement for Vite compatibility.
  • Current Status: While functional, the presenter notes that the migration is not yet production-ready, emphasizing that "bleeding edge" software often comes with significant stability risks.

5. Industry Perspectives and Controversy

  • Vercel’s Stance: Vercel leadership has been highly critical, labeling the project a "slop fork" and highlighting potential security vulnerabilities.
  • The "Slop" Narrative: The term refers to the debate over whether re-implementing frameworks via AI-assisted code generation creates unmaintainable or low-quality software.
  • The Presenter’s View: The presenter argues that while the "slop" debate is ongoing, the underlying performance benefits of Vite are undeniable. They suggest monitoring the project’s maturity over the coming months rather than adopting it immediately.

Synthesis and Conclusion

The emergence of V-Next represents a significant challenge to Vercel’s dominance by attempting to decouple the Next.js API from the Vercel runtime. While the project demonstrates impressive performance gains through Vite and AI-accelerated development, it remains in an experimental phase. The primary takeaway is that while developers now have a potential path to deploy Next.js-like applications anywhere, the trade-off between performance and the stability of a mature, supported framework remains a critical consideration for production environments.

Chat with this Video

AI-Powered

Hi! I can answer questions about this video "Cloudflare just slop forked Next.js…". What would you like to know?

Chat is based on the transcript of this video and may not be 100% accurate.

Related Videos

Ready to summarize another video?

Summarize YouTube Video
Cloudflare just slop forked Next.js… - Video Summary