There can be a race of data-main in index.html with main.js Worklight bootstrap.  In this case, we should load the data-main file with a require before we initiate the app.