add compilation js hook