nuxt
Nuxt 是一个全栈 Vue 框架,提供服务器端渲染、基于文件的路由、自动导入和强大的模块系统。它使用 Nitro 作为其服务器引擎,可在 Node.js、无服务器和边缘平台上进行通用部署。
该技能基于 Nuxt 3.x,生成于 2026-01-28。
核心
| 主题 | 描述 | 参考 |
|---|---|---|
| 目录结构 | 项目文件夹结构、约定、文件组织 | core-directory-structure |
| 配置 | nuxt.config.ts、app.config.ts、运行时配置、环境变量 | core-config |
| CLI 命令 | 开发服务器、构建、生成、预览和实用命令 | core-cli |
| 路由 | 基于文件的路由、动态路由、导航、中间件、布局 | core-routing |
| 数据获取 | useFetch、useAsyncData、$fetch、缓存、刷新 | core-data-fetching |
| 模块 | 创建和使用 Nuxt 模块、Nuxt Kit 工具 | core-modules |
| 部署 | 基于 Nitro 的平台无关部署,支持 Vercel、Netlify、Cloudflare | core-deployment |
特性
| 主题 | 描述 | 参考 |
|---|---|---|
| 组合式函数自动导入 | Vue API、Nuxt 组合式函数、自定义组合式函数、工具 | features-composables |
| 组件自动导入 | 组件命名、懒加载、水合策略 | features-components-autoimport |
| 内置组件 | NuxtLink、NuxtPage、NuxtLayout、ClientOnly 等 | features-components |
| 状态管理 | useState 组合式函数、SSR 友好状态、Pinia 集成 | features-state |
| 服务器路由 | API 路由、服务器中间件、Nitro 服务器引擎 | features-server |
渲染
| 主题 | 描述 | 参考 |
|---|---|---|
| 渲染模式 | 通用(SSR)、客户端(SPA)、混合渲染、路由规则 | rendering-modes |
最佳实践
| 主题 | 描述 | 参考 |
|---|---|---|
| 数据获取模式 | 高效获取、缓存、并行请求、错误处理 | best-practices-data-fetching |
| SSR 和水合 | 避免上下文泄漏、水合不匹配、组合式函数模式 | best-practices-ssr |
高级
| 主题 | 描述 | 参考 |
|---|---|---|
| 层 | 使用可重用层扩展应用程序 | advanced-layers |
| 生命周期钩子 | 构建时、运行时和服务器钩子 | advanced-hooks |
| 模块创作 | 使用 Nuxt Kit 创建可发布的 Nuxt 模块 | advanced-module-authoring |
More from tnnevol/skills
memos
Assistant for Memos (https://github.com/usememos/memos), an open-source self-hosted memo/note tool. Use when the user asks about Memos, creating/listing/updating/deleting memos, managing tags, or securely interacting with a Memos instance via API.
13pnpm
Node.js 包管理器,具有严格的依赖解析。在运行 pnpm 特定命令、配置工作区或使用目录、补丁或覆盖管理依赖项时使用。
8vue
Vue 3 组合式 API、script setup 宏、响应式系统和内置组件。在编写 Vue SFC、defineProps/defineEmits/defineModel、监视器或使用 Transition/Teleport/Suspense/KeepAlive 时使用。
6vitepress
VitePress static site generator powered by Vite and Vue. Use when building documentation sites, configuring themes, or writing Markdown with Vue components.
6tsdown
Bundle TypeScript and JavaScript libraries with blazing-fast speed powered by Rolldown. Use when building libraries, generating type declarations, bundling for multiple formats, or migrating from tsup.
6vitest
Vitest fast unit testing framework powered by Vite with Jest-compatible API. Use when writing tests, mocking, configuring coverage, or working with test filtering and fixtures.
6