Fix requires in javascript files