我们如何在一周内用 AI 重建 Next.js

*This post was updated at 12:35 pm PT to fix a typo in the build time benchmarks.

*This post was updated at 12:35 pm PT to fix a typo in the build time benchmarks.

Last week, one engineer and an AI model rebuilt the most popular front-end framework from scratch. The result, vinext (pronounced "vee-next"), is a drop-in replacement for Next.js, built on Vite, that deploys to Cloudflare Workers with a single command. In early benchmarks, it builds production apps up to 4x faster and produces client bundles up to 57% smaller. And we already have customers running it in production. 

上周,一位工程师和一个 AI 模型从零重建了最受欢迎的前端框架。结果,vinext(发音为 "vee-next"),是 Next.js 的即插即用替换品,基于 Vite 构建,只需一个命令即可部署到 Cloudflare Workers。在早期基准测试中,它构建生产应用的速度快达 4 倍,生成的客户端包小达 57%。而且我们已经有客户在生产环境中运行它。 

The whole thing cost about $1,100 in tokens.

整个过程花费了大约 1,100 美元的 tokens。

Next.js is the most popular React framework. Millions of developers use it. It powers a huge chunk of the production web, and for good reason. The developer experience is top-notch.

Next.js 是最受欢迎的 React 框架。数百万开发者使用它。它驱动了生产 web 的很大一部分,而且理由充分。开发者体验一流。

But Next.js has a deployment problem when used in the broader serverless ecosystem. The tooling is entirely bespoke: Next.js has invested heavily in Turbopack but if you want to deploy it to Cloudflare, Netlify, or AWS Lambda, you have to take that build output and reshape it into something the target platform can actually run.

但是 Next.js 在更广泛的无服务器生态系统中使用时存在部署问题。工具链完全是定制的:Next.js 大力投资了 Turbopack,但如果你想部署到 Cloudflare、Netlify 或 AWS Lambda,你必须取那个构建输出并将其重塑成目标平台实际能运行的东西。

If you’re thinking: “Isn’t that what OpenNext does?”, you are correct. 

如果你在想:“这不就是 OpenNext 做的吗?”,你是对的。 

That is indeed the problem OpenNext was built to solve. And a lot of engineering effort has gone into OpenNext from multiple providers, including us at Cloudflare. It works, but quickly runs into limitations and becomes a game of whack-a-mole. 

那确实是 OpenNext 旨在解决的问题。而且多家提供商,包括我们在 Cloudflare 的团队,都投入了大量工程努力到 OpenNext 中。它有效,但很快就会遇到限制,并变成打地鼠游戏。 

Building on top of Next.js output as a found...

开通本站会员,查看完整译文。

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.154.0. UTC+08:00, 2026-02-25 21:55
浙ICP备14020137号-1 $Carte des visiteurs$