Move require code from main.js to index.html