Use window.require and allow for */index.js in module names.