Handle compile event