nuxt is a full-stack application framework for Vue that supports server-side rendering (SSR), static site generation (SSG), and single-page applications (SPA). It provides a complete structure for building complex web apps with API routes and middleware. vitepress is a static site generator designed specifically for documentation. It uses Vue for theming and interactivity but focuses on speed and simplicity for content-heavy sites. @astrojs/vue is an integration package that allows you to use Vue components within an Astro project. It enables you to add interactive Vue islands to mostly static HTML pages generated by Astro.
nuxt, vitepress, and @astrojs/vue all leverage Vue.js, but they solve different problems. nuxt is a full application framework. vitepress is a documentation generator. @astrojs/vue is a bridge to use Vue inside Astro. Let's compare how they handle common development tasks.
nuxt provides a complete folder structure out of the box.
pages/ for routes and composables/ for logic.nuxt.config.ts.// nuxt: nuxt.config.ts
export default defineNuxtConfig({
modules: ['@nuxtjs/tailwindcss'],
app: { head: { title: 'My App' } }
});
vitepress focuses on markdown files with a config folder.
.md files inside a docs folder..vitepress/config.ts.// vitepress: .vitepress/config.ts
export default {
title: 'My Docs',
themeConfig: { nav: [{ text: 'Home', link: '/' }] }
};
@astrojs/vue requires an Astro project first.
.astro files for pages and .vue files for components.astro.config.mjs.// @astrojs/vue: astro.config.mjs
import { defineConfig } from 'astro/config';
import vue from '@astrojs/vue';
export default defineConfig({ integrations: [vue()] });
nuxt uses file-based routing for full pages.
pages/about.vue becomes the /about route.<!-- nuxt: pages/users/[id].vue -->
<template>
<div>User {{ $route.params.id }}</div>
</template>
vitepress uses markdown files for routes.
docs/guide/intro.md becomes /guide/intro.<!-- vitepress: docs/guide/intro.md -->
---
title: Introduction
---
# Welcome
This is the guide content.
@astrojs/vue relies on Astro's file-based routing.
src/pages/about.astro becomes /about.<!-- @astrojs/vue: src/pages/about.astro -->
---
import MyComponent from '../components/MyComponent.vue';
---
<html>
<body>
<MyComponent client:load />
</body>
</html>
nuxt has built-in data fetching composable.
useFetch or useAsyncData inside components.<!-- nuxt: pages/index.vue -->
<script setup>
const { data } = await useFetch('/api/items');
</script>
vitepress fetches data at build time or via client-side hooks.
onMounted for client-side fetching.<!-- vitepress: .vitepress/theme/index.vue -->
<script setup>
import { onMounted } from 'vue';
onMounted(() => { console.log('Loaded'); });
</script>
@astrojs/vue fetches data in the Astro frontmatter.
fetch in the code fence of the .astro file.<!-- @astrojs/vue: src/pages/index.astro -->
---
const res = await fetch('https://api.example.com/data');
const data = await res.json();
---
<MyComponent client:load {data} />
nuxt supports SSR, SSG, and SPA modes.
// nuxt: nuxt.config.ts
export default defineNuxtConfig({
ssr: true // Server-side rendering enabled
});
vitepress is primarily Static Site Generation (SSG).
// vitepress: .vitepress/config.ts
export default {
// SSG is default behavior
vite: { /* config */ }
};
@astrojs/vue uses Partial Hydration (Islands Architecture).
<!-- @astrojs/vue: src/pages/index.astro -->
<!-- Hydrates only when user interacts -->
<InteractiveWidget client:only="vue" />
While their goals differ, all three tools share core Vue concepts.
.vue) for logic and UI.<script setup>, props, and emits.<!-- Shared Vue Component -->
<script setup>
defineProps({ msg: String });
</script>
<template>
<h1>{{ msg }}</h1>
</template>
<!-- Shared Scoped CSS -->
<style scoped>
h1 { color: red; }
</style>
// Shared Pinia Store
import { defineStore } from 'pinia';
export const useStore = defineStore('main', { /* ... */ });
| Feature | nuxt | vitepress | @astrojs/vue |
|---|---|---|---|
| Primary Use | Full Web Apps | Documentation | Interactive Islands |
| Routing | File-based (pages/) | File-based (docs/) | Astro File-based (src/pages/) |
| Rendering | SSR, SSG, SPA | SSG | Static + Partial Hydration |
| Data Fetching | useFetch (Universal) | Client-side / Build | Astro Frontmatter |
| Config | nuxt.config.ts | .vitepress/config.ts | astro.config.mjs |
nuxt is the heavy lifter 🏋️. It handles everything from routing to server logic. Use it when you are building a product.
vitepress is the specialist 📚. It optimizes for reading and navigation. Use it when you are writing docs.
@astrojs/vue is the enhancer 🎨. It adds Vue power to static sites without the bloat. Use it when you want speed with specific interactive bits.
Final Thought: All three tools let you write Vue code, but they decide how that code reaches the browser. Pick the one that matches your delivery goal.
Choose @astrojs/vue when you are building an Astro site and need specific interactive components written in Vue. It is ideal for content sites where you want to keep JavaScript payload low by only hydrating small parts of the page. Use this if you prefer Astro's file-based routing and static-first approach but need Vue's ecosystem for widgets.
Choose nuxt when you are building a full-featured web application that requires server-side rendering, complex state management, or API routes. It is suitable for dashboards, e-commerce platforms, and dynamic apps where SEO and performance are critical. Use this if you want a batteries-included framework that handles routing, data fetching, and deployment configuration for you.
Choose vitepress when you need to create documentation, blogs, or simple marketing sites quickly. It is perfect for projects where content is the primary focus and you need built-in search, theme customization, and markdown support. Use this if you want a fast static site generator without the complexity of a full application framework.
This Astro integration enables server-side rendering and client-side hydration for your Vue 3 components.
Read the @astrojs/vue docs
Get help in the Astro Discord. Post questions in our #support forum, or visit our dedicated #dev channel to discuss current development and more!
Check our Astro Integration Documentation for more on integrations.
Submit bug reports and feature requests as GitHub issues.
This package is maintained by Astro's Core team. You're welcome to submit an issue or PR! These links will help you get started:
MIT
Copyright (c) 2023–present Astro