Vue (general) implementation checklist
This checklist provides a technical framework for validating Vue 3 applications before production deployment, focusing on performance, type safety, and state management integrity.
Performance and Build Optimization
0/5Route-based Code Splitting
criticalVerify all non-initial routes in the Vue Router configuration use dynamic imports to reduce the main bundle size.
Tree-shaking Verification
recommendedRun a production build and use a bundle visualizer to ensure that unused components and heavy libraries are not included in the final assets.
Async Component Implementation
recommendedWrap heavy third-party components (e.g., charts, editors) in 'defineAsyncComponent' to defer loading until they are rendered.
Image and Asset Optimization
recommendedConfigure Vite plugins to compress static assets and ensure responsive image sets are used for high-resolution displays.
Prefetching Strategy
optionalImplement link prefetching for high-probability navigation paths using the browser's idle time.
TypeScript and Type Safety
0/5Build-time Type Checking
criticalIntegrate 'vue-tsc --noEmit' into the CI/CD pipeline to catch template-level type errors that 'tsc' ignores.
Prop and Emit Typing
criticalEnsure all components use generic 'defineProps' and 'defineEmits' interfaces rather than runtime-only declarations.
Template Ref Typing
recommendedVerify all DOM and component refs are strictly typed (e.g., ref<HTMLButtonElement | null>(null)) to prevent runtime null pointers.
Strict Mode Configuration
criticalEnable 'strict: true' and 'noImplicitAny' in tsconfig.json to ensure full coverage across the codebase.
External Data Typing
recommendedApply Zod or similar schema validation to API responses before casting them to TypeScript interfaces.
State Management with Pinia
0/5Reactivity Preservation
criticalAudit all store usage to ensure 'storeToRefs' is used when destructuring state to avoid losing reactivity.
Action-based State Updates
recommendedEnforce a pattern where state is only modified through actions to ensure updates are traceable in DevTools.
Subscription Cleanup
recommendedManually unsubscribe from store '$subscribe' or '$onAction' listeners in the 'onUnmounted' hook if they are created outside of setup.
State Reset Logic
criticalImplement and call a '$reset' method for all user-related stores during the logout flow to prevent data leakage.
Persisted State Validation
recommendedVerify that any state persisted to LocalStorage is versioned and cleared if the schema changes.
Error Handling and Resilience
0/5Global Error Hook
criticalConfigure 'app.config.errorHandler' to pipe runtime errors to a monitoring service like Sentry or LogRocket.
Component Error Boundaries
recommendedWrap high-risk components (e.g., third-party widgets) in parent components using the 'onErrorCaptured' hook.
API Feedback Loops
criticalEnsure every network request has a corresponding loading state and a user-facing error message for 4xx/5xx responses.
Watcher Cleanup
recommendedVerify that manually created 'watch' or 'effect' calls have their stop handles invoked to prevent memory leaks.
Environment Variable Validation
criticalConfirm that only non-sensitive variables are prefixed with 'VITE_' and that secrets are never committed to the repository.
Testing and Quality Assurance
0/5Composable Unit Testing
recommendedVerify that business logic extracted into composables has 100% test coverage using Vitest.
Component Mount Testing
recommendedTest critical UI components using Vue Test Utils to verify correct event emission and prop rendering.
E2E Critical Path Testing
criticalExecute Playwright or Cypress tests for the primary user flows (login, checkout, profile updates).
Accessibility (A11y) Audit
recommendedRun an automated accessibility scanner (e.g., axe-core) to check for missing ARIA labels and low contrast ratios.
Linting and Formatting
criticalRun 'eslint --ext .js,.vue' and 'prettier --check' to ensure code consistency and prevent common syntax anti-patterns.