add compiler middware