94 words
1 minute
7. 自定义构建插件 (Custom Plugins)
2026-06-20
No Tags
This article has no translation for the current language. Falling back to the main language.

本文档指明了自定义 Vite/Astro 构建插件的存放目录及使用逻辑,以供 AI 在修改时参考。

# AI Collaboration Reference: Custom Build Plugins
## Context & Rules
- **Plugin System**: To keep `astro.config.mjs` clean, custom Vite or Astro build-time plugins (such as the automatic `i18nKeyPrefixPlugin` for modular partials) are stored in the `src/astro-plugins/` directory.
- **Rule**: If you need to debug or extend compile-time transformations, look inside `src/astro-plugins/`. Do not write large inline plugin logic directly inside `astro.config.mjs`.
7. 自定义构建插件 (Custom Plugins)
https://blog.aquamarinez.com/en/docs/fuwari/advanced-customization/ai-guide/07-custom-plugins/
Author
Aquamarine
Published at
2026-06-20