Files
main/rules-v0-deprecated/javascript-astro-tailwind-css-cursorrules-prompt-f/astro-performance-optimization.mdc
T
2025-03-03 23:40:27 +05:30

13 lines
589 B
Plaintext

---
description: Rules for performance optimization in Astro, emphasizing static generation and partial hydration.
globs: src/**/*.*
---
Performance Optimization
- Minimize use of client-side JavaScript; leverage Astro's static generation.
- Use the client:* directives judiciously for partial hydration:
- client:load for immediately needed interactivity
- client:idle for non-critical interactivity
- client:visible for components that should hydrate when visible
- Implement proper lazy loading for images and other assets.
- Utilize Astro's built-in asset optimization features.