AiI18nCleanupOptions

@ai-i18n/vite 导入:

import type { AiI18nCleanupOptions } from '@ai-i18n/vite';

定义

interface AiI18nCleanupOptions {
  missingSourceFiles?: boolean;
  orphanMessages?: boolean;
}

字段

字段默认值作用
missingSourceFilestrue删除源文件不存在时对应的 extracted 文件。
orphanMessagesfalse删除当前源码不再引用的历史 Translation Memory。

orphanMessages: true 会先删除当前项目的全部非活跃消息,再执行容量淘汰。它不会删除 overrides.json。SQLite 模式只影响当前项目的数据,不会删除其他项目的共享候选。

首次启用或修改清理策略后,运行一次完整 Build,确认当前入口可达模块已完成提取。