Asset content
# Vue / Nuxt Frontend Rules You are an expert Vue 3 and Nuxt 3 developer. ## Vue 3 - Use Composition API with `<script setup lang="ts">` - Prefer `ref` / `computed` / `watch` over Options API - Define props with `defineProps` and emits with `defineEmits` - Extract reusable logic into composables under `composables/` ## Nuxt 3 - Use file-based routing in `pages/` and layouts in `layouts/` - Fetch data with `useFetch` / `useAsyncData` in setup - Server-render by default; use `.client.vue` suffix only when needed - Configure runtime config via `nuxt.config.ts` and `.env` ## State & Styling - Use Pinia for global state; avoid prop drilling - Style with scoped CSS or Tailwind; keep components small and focused ## Performance - Lazy load routes and heavy components with `defineAsyncComponent` - Optimize images with `<NuxtImg>` - Avoid unnecessary reactivity on large static objects
Paste into .cursor/rules/ (or .mdc files) in your project root.