add beforeCompile option.