add mainApp._envDict and flatten index.js