What is Nuxt? The full-stack framework built on Vue.js

Published on September 26, 2025

nuxt-header1

Vue.js has a low learning curve and is great for building reactive, component-based interfaces. But as soon as you need server-side rendering (SSR) or a hybrid rendering strategy, things can become a little more complex. 

Nuxt (also known as Nuxt.js) solves these complexities by providing developers with a Vue.js-based framework for full-stack development, simplifying complex rendering strategies, improving performance, and adding server capabilities with Nuxt Nitro.

What is Nuxt?

Nuxt is a full-stack JavaScript framework built on Vue.js. Vue.js provides a progressive framework with declarative rendering, reactive data binding, and a component-based architecture. Nuxt builds upon this foundation by giving developers an easy way to set up multiple rendering strategies (SSR, SSG, hybrid), performance benefits like automatic code splitting and lazy loading, as well as server capabilities such as API routes and middleware. It also improves developer experience with features like the file-based routing system and built-in TypeScript support.

Nuxt is similar to Next.js. Just as React developers use Next.js for full stack capabilities and flexible rendering, Vue developers reach for Nuxt to achieve the same.

What is Nuxt used for?

Nuxt is ideal for small- to medium-sized projects. The syntax is intuitive, and flexibility allows developers to create reusable, modular components with minimal setup. This enables teams to move faster in the initial stages of a project, perfect for startups looking to get to market quickly. This doesn't rule it out for other projects, as its modern architecture also makes it capable of powering large-scale applications.

As Nuxt makes SSR and other rendering strategies like static site generation (SSG) and hybrid rendering less complicated with Vue.js, it's particularly well suited to content-heavy sites like blogs with dynamic content and SEO requirements, documentation sites, and marketing pages. Pairing Nuxt with Contentful also makes sense since Contentful provides built-in support for localization, personalization, and structured content management. This also makes Nuxt a good choice for ecommerce storefronts where performance and SEO matter.

How does Nuxt work?

Nuxt code is arranged into components, and interactivity is added through changes in the application state. Nuxt promotes convention over configuration. As such, it provides a default structure for your project to simplify development. Nuxt also promotes the DRY (don't repeat yourself) principle by encouraging you to build reusable components, which can then be automatically imported and easily used across your project’s codebase.

In addition, Nuxt provides a plugin system for third-party integrations and has middleware to check auth and cookies that can be applied globally or across specific routes and pages.

Understanding the Nuxt request lifecycle

In a typical Nuxt SSR client request:

  1. The request first hits the Nuxt server (powered by Nuxt Nitro). 

  2. Nuxt then matches the incoming request to the correct component using the file-based routing system. 

  3. Middleware runs before the component renders, for both global and route-specific logic, which can check on authentication or cookies for any redirection required. 

  4. During the server render phase, useAsyncData executes server side before the server sends the fully rendered HTML. 

  5. Any API requests also execute server side here, and the data gets embedded in the HTML, which is then rendered and sent to the browser.

If running Nuxt in SPA mode (ssr: false), on startup the server or static host sends a minimal HTML shell and JavaScript bundle. The app then mounts in the browser, routes are resolved client side, and $fetch runs in the client to fetch and render data.

nuxt-image1

Nuxt community and Vercel

Nuxt has a small but growing developer community with more than 57,000 stars on GitHub, active open-source contributions, lots of engagement on Stack Overflow to help if you get stuck, and extensive educational resources and documentation.

Now, with Nuxt developer NuxtLabs having joined Vercel, this community momentum is set to continue. By integrating with Vercel, NuxtLabs gains access to greater resources, a wider network, and a global platform. This is likely to increase Nuxt's adoption, spark broader international contributions, and foster rapid community-driven innovation. For Vercel, the acquisition helps cement its role as a leader supporting the modern web framework ecosystem, ensuring their platform is appealing regardless of framework choice.

The best developer features of Nuxt (and when to use them)

Nuxt was built to remove the complexity of building modern, performant Vue.js applications. To do this, it provides some core features that address common challenges like implementing routing, state management, and build configuration. Other core features include the file-based routing system, built-in middleware support, modular architecture, and hot module replacement for rapid iteration.

With the release of Nuxt 4, the developer experience improves further with the addition of a new app directory structure, smarter data fetching with a new data layer, better TypeScript support, and Faster CLI development (internal sockets and a faster CLI).

Performance and optimization features in Nuxt

Nuxt provides preconfigured performance tools and flexible features that help you optimize how your app loads, renders, and scales.

The file-based routing system in Nuxt automatically generates routes from the pages/ directory in your project. This removes the need for you to manually configure routing, saving development time. When you create a route in the file system and develop the code for that component, the code is automatically split into separate chunks so only the necessary code loads for each page, reducing initial load times and improving overall performance compared to SPAs that load everything on startup.

Although the code is split automatically according to the file-based routing system, if you have a large, rarely used component or some kind of module, you can still lazy load components manually by using defineAsyncComponent().

Another performance optimization, tree shaking, removes unused code from your build so you ship only the code you need. This reduces bundle size, improving load times. Nuxt also comes configured with Webpack and Babel, which give you a pre-optimized build setup with no manual configuration required.

To handle data fetching, Nuxt provides you with two built-in utilities. One is called $fetch, which is a direct HTTP client (a wrapper around ofetch). This is for fetching data in the browser, which is good for requests you do after page load or in response to events like submitting a form. The other way to fetch data is useAsyncData, which is composable for fetching and caching asynchronous data. This is to be used for fetching data on initial page render, especially when using SSR mode (load once on the server and pass to the client). These two data fetching utilities allow you to load and handle data regardless of the rendering strategy you use.

Middleware in Nuxt allows you to run custom logic before your components render. The middleware can be global or scoped to specific routes (for example, authentication middleware running on the dashboard but not the login page). Middleware is useful for tasks like authentication, reading cookies, and redirecting users before the page's code executes.

SEO capabilities in Nuxt

Nuxt comes with built-in features which help your site to rank well with search engines. It supports SSR and SSG out of the box, helping crawlers to index your sites well. Nuxt also includes features for managing meta tags, customizing page titles, and handling dynamic URLs. All of these features help to keep your site's SEO healthy.

Nuxt rendering strategies

Nuxt is flexible and comes with an array of rendering strategies to choose from, helping with performance, scalability, and SEO.

Server-side rendering (SSR)

Server-side rendering in Nuxt allows you to fetch data and render HTML on the server, improving load times while still providing users with a responsive, app-like experience. SSR allows search engine crawlers to find and index the content on your site more easily (as the HTML is ready when it reaches the browser), improving visibility and ranking. Nuxt handles most of the SSR setup automatically.

Static site generation (SSG)

Static site generation in Nuxt gives you the ability to pre-render your application’s pages at build time into static HTML. Unlike SSR, which generates HTML on every request, SSG Nuxt builds the pages once, then serves them directly from a CDN or hosting provider. This approach offers the best possible performance as static files can be served instantly without preprocessing. This rendering strategy is perfect for static sites like marketing pages or blogs where dynamic content isn't needed.

SPA mode

SPA is a distinct rendering mode that makes the Nuxt app behave like a traditional Vue.js SPA where all rendering happens on the client side. The server delivers a single HTML file and the necessary JavaScript to the browser, and subsequent navigation between pages is handled in the browser without full-page reloads. You might opt for this mode if you want to leverage Nuxt’s developer experience benefits without using SSR/SSG.

Hybrid rendering

Nuxt also allows you to combine different rendering modes within the same app. You can statically generate high-traffic pages like the homepage with SSG, render dynamic but SEO-sensitive pages with SSR, and use CSR for less frequently visited or highly dynamic pages to save on server resources. This allows you to give public-facing, content-heavy pages an SEO boost. At the same time, you can choose the right rendering approach for each page without committing the entire app to one rendering strategy.

Edge-side rendering

Edge-side rendering (ESR) in Nuxt allows you to cache certain parts of your pages at the edge, which is closer to the user via a CDN. This is useful for delivering personalized content quickly without having to hit the origin server for every request. Some parts can be cached, and the rest dynamically generated. The benefits of this are to reduce load on the origin server and improve load times. This also allows you to dynamically insert user-specific content while still serving most of the page instantly from the cache.

Universal rendering

Universal rendering in Nuxt uses both SSR and CSR. On the first request, the application uses SSR, improving load speed and SEO. From then on, it uses CSR so the app behaves as a single page application. This offers a fast initial load time and good interactivity, and it's SEO friendly. While not as granular as hybrid rendering where you can choose the rendering strategy on a per-page basis, universal rendering offers a simpler setup that provides good SEO and an app-like browsing experience for the user.

Here's a table to give you an idea of when you might best employ each rendering strategy:

Use case

Recommended rendering strategy

Reason

Blog or docs site

SSG

Pre-renders static pages for fast load times and improved SEO

Ecommerce with dynamic data

SSR or hybrid

Allows you to personalize content while keeping SEO benefits

Real-time dashboard

Client-only rendering

No server overhead, fastest interactivity after initial load

Global marketing pages

Edge rendering

Minimizes latency globally; also great for localized/personalized content

Large public-facing app

Universal

SEO friendly with SPA feel

Nuxt Nitro and server capabilities in Nuxt

Nuxt Nitro is an open-source backend TypeScript framework, as well as the server layer of Nuxt, that enables full-stack development in Nuxt. It allows you to create API routes in Nuxt with ease, so you can define backend endpoints in projects and consume them without additional setup. You don't need to configure a server or deal with middleware boilerplate; you can just create a file in server/api in your Nuxt project and start defining API routes, speeding up backend development.

What is Nuxt's role in your composable web stack?

nuxt-image2

Nuxt pairs well with other modern platforms allowing you to compose your web stack and tailor it to your specific needs. By combining Nuxt with Contentful and Vercel, you can move quickly from the ideation stage to a fully fledged app deployed to the cloud in no time. By using Nuxt as part of a composable web stack, you could:

  • Build a blog or news site: Contentful is a digital experience platform (DXP), which can handle the content layer including personalization, omnichannel delivery, and GraphQL APIs backed by a global CDN. Vercel can handle frontend deployment and delivery from the edge, along with live preview integrations with Contentful.

  • Build an online store: Use Nuxt, Contentful, and a headless ecommerce platform like Commerce.js to create a storefront that's fast and SEO friendly, where it’s easy to personalize and update content from the Contentful dashboard.

  • Build a community or social app: Combine Nuxt, Contentful, and Auth0 for authentication and access control. This enables you to gate content and deliver personalized experiences for logged-in users.

Using Vercel with Contentful can help you ship fast, scalable, high-performance digital experiences. Contentful provides structured content modeling tools and editorial workflows for the content in your Nuxt apps. Vercel powers fast frontend builds, edge delivery, and live previews. Used together, they give marketing, product, and engineering teams the tools they need to launch campaigns, update content in real time, and iterate quickly.

Subscribe for updates

Build better digital experiences with Contentful updates direct to your inbox.

Meet the authors

Ely Lucas

Ely Lucas

Developer Experience Engineer

Contentful

Ely is a developer experience engineer at Contentful and loves all things web and mobile. He lives in Denver with his wife and four kids.

Marco Cristofori

Marco Cristofori

Product Marketing Manager

Contentful

Marco is a B2B content creator and product marketer blending technical with creative skills. From the early stages of product ideation to a successful market launch, all the way through to sales enablement, he loves to take products and translate them into clear, relatable messages.

Related articles

GraphQL variables let you create reusable queries and mutations that are type-safe. This article explains how to use them, with examples.
Guides

How to use GraphQL variables to give queries type safety

March 25, 2024

Illustration showing middleware components with authorization tokens, session ID, and dashboard settings on a bright green background
Guides

Next.js Middleware guide, tutorial, and code examples

July 6, 2025

API-first means the API is the primary and most important focus during the development process for a new product. Why does it matter? Allow us to explain.
Guides

Why API-first is the key to fast development and scalable AI integration

June 13, 2025

Contentful Logo 2.5 Dark

Ready to start building?

Put everything you learned into action. Create and publish your content with Contentful — no credit card required.

Get started