CMS-2605 Implement require support in javascript. Resource loading now works, but missing evaluation of exports.