Skip to content
AI & Tech / Briefing

When AI writes the code, your framework choice has a price tag

Nolan Lawson had Claude build the same app in 12 JavaScript frameworks. The cheapest cost $2.67 a run, the most expensive $4.97, and the JavaScript shipped ranged from 0 KiB to 142 KiB. What the numbers mean for a founder paying for an MVP.

Tanuj Rajput

Senior Shopify and web developer

·5 min read
When AI writes the code, your framework choice has a price tag

The short answer

  • In Nolan Lawson's October 2026 benchmark, Claude Opus 5.5 built the same app in 12 JavaScript frameworks, five runs each. Median API-equivalent cost ranged from $2.67 a run for Hono with htmx to $4.97 for Angular.
  • Build time ranged from 8.2 minutes for Astro to 17.2 minutes for Angular, and token use from 3.85 million for Nuxt to 9.76 million for Angular.
  • Every framework scored 100 for accessibility in Lighthouse. JavaScript shipped to the browser ranged from 0 KiB for Astro to 142 KiB for Next.js.
  • For a founder buying an MVP, the gap in AI build cost is a few dollars a run. The bigger differences are how much JavaScript users download and how reliably agents can keep working on the code.
  • Lawson's advice is to pick a stack on evidence rather than habit, and to re-check it now that agents write much of the code.

Want this done rather than explained? see my published prices

Nolan Lawson had Claude Opus 5.5 build the same app in 12 JavaScript frameworks, five times each. The cheapest framework cost a median $2.67 per build and the most expensive $4.97, at API prices. For a founder paying for an MVP, that gap is small. The bigger differences in his results are how much JavaScript each framework sends to the user, from 0 KiB to 142 KiB, and how reliably the agent finished the job. Pick the stack for the kind of app you're building, then ask your developer how they check what the agent writes.

I build MVPs and web apps for founders, and this site runs on Next.js. Lawson's benchmark drew hundreds of comments on Hacker News this week, and it's the first public test I've seen that puts numbers on a question clients now ask me: does the framework matter if AI writes most of the code?

How did Nolan Lawson test the AI cost of frameworks?

Lawson gave Claude Opus 5.5, at high effort, the same task in each framework: a small but non-trivial Pokémon app built on the PokéAPI, with search and filtering. The agent used each framework's official MCP server or skills where one existed. He ran each framework five times and reported the median, then checked every result with a conformance suite and Lighthouse on a throttled mobile profile.

The 12 frameworks were Angular, Astro, Gracile with Lit, Hono with htmx, Next.js, Nuxt, Qwik, React Router, SolidStart, SvelteKit, TanStack Start and plain Vite.

Which framework was cheapest and fastest for the agent?

FrameworkMedian cost per buildJavaScript shippedNotes from the benchmark
Hono + htmx$2.6718 KiBCheapest, fewest lines of code (1,370)
Astro$2.760 KiBFastest build (8.2 min), best LCP (810 ms)
Nuxt$2.8284 KiBFewest tokens (3.85 million)
SvelteKit$4.2836 KiBAgent spent extra effort learning the framework
Angular$4.9793 KiBSlowest (17.2 min), most tokens (9.76 million), two failed runs
Next.jsNot in the top or bottom three142 KiBMost JavaScript, slowest LCP (about 2.1 s)

Two results surprised me. Every framework scored 100 for accessibility, so the agent got the basics right everywhere. And plain Vite with no framework did worse than several frameworks, which suggests a good framework still saves the agent work. Lawson notes the costs are API-equivalent prices, since he ran the tests on a subscription plan.

Does the framework change what your MVP costs?

Barely, at build time. A $2 difference per run is noise next to the hours a developer spends planning, reviewing and testing. If an agent builds a feature ten times while you iterate, you're still talking about tens of dollars. The test I use for whether AI spend pays off is in why AI pays off for some companies and not others.

The costs that do add up come later:

  • What your users download. Astro shipped no JavaScript for this app. Next.js shipped 142 KiB and had the slowest largest contentful paint. On a content-heavy site, that is page speed you pay for in search rankings and conversions.
  • How reliably the agent finishes. Angular had two failed runs, and the agent built server-rendered apps that rejected outside requests. Every failed run is time someone spends finding out what went wrong.
  • How much code there is to maintain. Hono with htmx did roughly the same job as Angular in about 70% of the code. Less code means less for the next developer, or the next agent, to read.

Which framework should you choose for your MVP?

Choose by the kind of app, then by evidence. Lawson's test used a content-heavy app with little interactivity, and he points out that this favours lightweight, multi-page approaches. Your app may not look like his.

My rule of thumb from the projects I take on:

  • Mostly content, a few forms: a marketing site, a directory or a docs site. A light framework such as Astro ships less JavaScript and loads faster.
  • An app people log in to: dashboards, account areas, AI features with live data. React-based frameworks such as Next.js earn their weight here, because the interactivity is the product.
  • An app you started in Lovable or Bolt: keep the stack it was built on unless it's failing. A rewrite usually costs more than fixing what's there.

The one thing I'd never do is pick a framework because it's what the developer always uses. Lawson asks the same question: "Are you really picking your tech stack based on evidence? Or are you just going with what you already know?"

What should you ask a developer about their stack?

Ask these four before you sign off on an MVP:

  1. Why does this framework suit my kind of app?
  2. How much JavaScript does the first page send, and how fast does it load on a phone?
  3. How do you check and test the code an AI agent writes before it ships?
  4. If you stopped working on this tomorrow, could another developer or agent pick it up?

A good answer to question 3 matters more than the framework. Clear prompts help too. PrePrompt rewrites a prompt with the context and constraints an agent needs, which cuts down the reruns that cost tokens.

I build MVPs and web apps from $2,400 to $15,000, and I finish and harden apps started in Lovable or Bolt from $2,000, on my published pricing. Tell me what you're building and I'll tell you which stack I'd use and why.

FAQ

Frequently asked questions

  • Which JavaScript framework is cheapest for AI coding agents?

    In Nolan Lawson's October 2026 benchmark with Claude Opus 5.5, Hono with htmx was cheapest at a median $2.67 per build, followed by Astro at $2.76 and Nuxt at $2.82. Angular was the most expensive at $4.97.
  • Is Next.js a bad choice if AI writes the code?

    No. Next.js cost a mid-range amount to build in the benchmark, but it shipped the most JavaScript, 142 KiB, and had the slowest largest contentful paint at about 2.1 seconds. That matters for content sites more than for apps with logins and dashboards.
  • Does framework choice change what an MVP costs?

    The AI build cost differs by a few dollars a run, which is small next to developer time. Framework choice matters more for page speed, hosting and how easily the code can be extended by people and agents later.
  • What should I ask a developer about their stack?

    Ask why that framework fits your app type, how much JavaScript the first page ships, how they test what an AI agent writes, and whether another developer could pick up the code if they left.

Last updated November 12, 2026

mvpjavascriptnextjsai-codingbriefing