Created by: vikr01
See docs for api.env. There are various ways of setting the envName for babel, and this makes sure that all are taken into account.
If accessing process.env.BABEL_ENV and process.env.NODE_ENV directly is still wanted, we should use api.cache.using.
I also noticed @babel/core was in dependencies when it shouldn't be (since users will install @babel/core to use the preset with), this usually happens after running babel-upgrade. It should go in peerDependencies.