compile main.js to index.js