Fix requires in Javascript files