Add preBuild hook for addons