ScriptsApr 13, 2026·3 min read

Nuxt — The Full-Stack Vue Framework

Nuxt is the intuitive full-stack framework built on Vue.js. It provides server-side rendering, auto-imports, file-based routing, data fetching, and a powerful module ecosystem — making Vue applications production-ready with minimal configuration.

TL;DR
Nuxt 3 adds SSR, auto-imports, and file-based routing to Vue.js for production apps.
§01

What it is

Nuxt is the full-stack framework built on Vue.js. It provides server-side rendering (SSR), auto-imports for components and composables, file-based routing, built-in data fetching, and a module ecosystem that covers everything from authentication to SEO. Nuxt makes Vue applications production-ready with minimal configuration.

Nuxt targets Vue.js developers building SEO-friendly websites, web applications, and full-stack projects. It handles the server, routing, state management, and build tooling so you focus on features rather than infrastructure.

§02

Why it saves time or tokens

Without Nuxt, setting up SSR with Vue requires configuring Vite, a Node.js server, route generation, and head management manually. Nuxt provides all of this out of the box. Auto-imports eliminate boilerplate import statements, reducing file size and cognitive overhead. When AI assistants generate Vue code, targeting Nuxt conventions produces cleaner output because the framework handles wiring automatically.

§03

How to use

  1. Create a new project: npx nuxi init my-project
  2. Install dependencies: cd my-project && npm install
  3. Start development: npm run dev (runs on localhost:3000 with HMR)
§04

Example

<!-- pages/posts/[id].vue -->
<template>
  <article>
    <h1>{{ post.title }}</h1>
    <div v-html='post.content' />
  </article>
</template>

<script setup>
const route = useRoute()
const { data: post } = await useFetch(`/api/posts/${route.params.id}`)
</script>

This page automatically gets SSR, a dynamic route from the filename, and data fetching that works on both server and client.

FeatureWhat Nuxt Provides
SSR/SSG/SPAAll rendering modes from one config
File-based routingpages/ directory = routes
Auto-importsNo import statements needed
useFetchSSR-aware data fetching
Modules200+ community modules
§05

Related on TokRepo

§06

Common pitfalls

  • Using onMounted for initial data fetching breaks SSR; always use useFetch or useAsyncData for data that should render on the server
  • Auto-imports can confuse AI assistants that expect explicit imports; specify 'Nuxt 3 with auto-imports' in your prompts
  • Mixing SSR and client-only code without <ClientOnly> wrapper causes hydration mismatches

Frequently Asked Questions

What is the difference between Nuxt and Vue?+

Vue is the reactive UI library for building components. Nuxt is the full-stack framework built on top of Vue that adds server-side rendering, routing, data fetching, build tooling, and deployment configuration. Think of Vue as the engine and Nuxt as the complete vehicle.

Does Nuxt 3 support static site generation?+

Yes. Nuxt 3 supports SSR (server-side rendering), SSG (static site generation), and SPA (single-page application) modes. You can mix modes per route. Run nuxt generate for static output or nuxt build for SSR. The same codebase works in all modes.

How does Nuxt handle SEO?+

Nuxt provides SSR out of the box, which means search engines receive fully rendered HTML. The useHead and useSeoMeta composables let you set meta tags, Open Graph, and structured data per page. Nuxt modules like @nuxtjs/sitemap and @nuxtjs/robots handle sitemap and robots.txt generation.

Can Nuxt 3 work with TypeScript?+

Yes. Nuxt 3 has first-class TypeScript support. It generates type declarations for auto-imported composables, components, and API routes. You get full type safety without manual configuration. Just rename files to .ts or add a tsconfig.json and Nuxt handles the rest.

What is the Nuxt module ecosystem?+

Nuxt modules extend the framework with pre-built features: authentication (nuxt-auth-utils), i18n (@nuxtjs/i18n), image optimization (@nuxt/image), SEO (@nuxtjs/sitemap), and many more. Modules integrate deeply with Nuxt's build system and lifecycle hooks, providing capabilities that would take significant effort to implement manually.

Citations (3)
  • Nuxt GitHub— Nuxt is the intuitive full-stack framework built on Vue.js
  • Nuxt Docs— Nuxt 3 provides SSR, auto-imports, and file-based routing
  • Vue.js— Vue.js is the progressive JavaScript framework

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets