rewrite prepare dist