Files
vue-ts-example-2025/AGENTS.md
严浩 e50d699a2a
Some checks failed
/ playwright (push) Successful in 1m33s
/ build-and-test (push) Failing after 2m7s
CI/CD Pipeline / build-and-deploy (push) Successful in 2m16s
CI/CD Pipeline / playwright (push) Successful in 3m26s
chore: initial commit
2025-10-15 16:27:39 +08:00

1.7 KiB

AGENTS.md

This file provides guidance to AI when working with code in this repository.

Project Overview

Vue 3 TypeScript application with Vite.

Routing & Layouts

  • File-based routing: Uses unplugin-vue-router with .page.vue and .page.md extensions in src/pages/
  • Route naming: Converts to PascalCase (e.g., user-profile.page.vueUserProfile)
  • Layouts: vite-plugin-vue-meta-layouts with default layout base-layout/base-layout

Auto-Import Configuration

Multiple auto-import systems are active:

  • Vue APIs: Core Vue, VueUse, Pinia, Vue Router, vue-i18n
  • Components: Auto-registered from multiple UI libraries (Naive UI, PrimeVue)
  • Icons: Uses unplugin-icons with icon- prefix; custom SVGs from src/assets/icons/svgs/ available via icon-svg:filename

IMPORTANT - Auto-Import Limitations:

  • Auto-imported components do NOT work with dynamic components (e.g., <component :is="dynamicName" />)
  • When using icons or components conditionally, use v-if/v-else-if/v-else instead of dynamic component syntax
  • Example: Use <icon-foo v-if="condition" /> instead of <component :is="icon-${name}" />

UI Component Libraries

Project has multiple UI frameworks configured:

  • Naive UI
  • PrimeVue:

Styling

  • UnoCSS: Wind preset
  • SCSS: Modern compiler API with global imports from @/styles/scss/global.scss

State Management

Pinia stores

Cloudflare Workers Integration

  • Server entry: server/index.ts handles /api/* routes with KV storage
  • KV binding: Named KV

Vite Plugins (notable)

  • vue-macros: Enhanced Vue features
  • unplugin-vue-markdown: .md files as Vue components with frontmatter

Path Aliases

  • @/ maps to src/ directory