Add afterCompile hook