用途:帮助配置 Nuxt 应用的 nuxt.config.ts 与 app.config.ts,并处理环境变量、runtimeConfig 及 Cloudflare 部署相关配置。
主要能力:提供完整配置模式(config.md);Cloudflare Workers Builds + NuxtHub + D1 的部署说明,包括 routeRules 混合渲染、wrangler.json 绑定在部署时 vars 被清空的注意事项、secrets 与 nitro.cloudflare.wrangler.vars 的区别、手动 D1 迁移流程、构建期与运行期环境变量差异及常见构建失败。
使用方式:在 nuxt.config.ts 中用 defineNuxtConfig 配置 ssr、extends、modules、components、runtimeConfig 等;在 app.config.ts 中用 defineAppConfig 配置 repositories、interceptors、errorHandlers。环境变量示例:NUXT_PUBLIC_API_URL=https://api.example.com,NUXT_PUBLIC_REPOSITORIES_LEADS_FETCH_OPTIONS_BASE_URL=https://leads-api.example.com。
适用场景:Nuxt 项目初始化与配置、分层(layers)复用、SPA 模式、认证模块与 UI 模块集成、Cloudflare 部署与 D1 数据库迁移。
限制:资料未提供具体版本要求、收费信息或完整部署步骤,部分细节需参考对应文档。