Good defaults
Currently the user has to add babel-preset-env every single time. Should we bake this in and provide good defaults? I think it's always good to have good defaults.
What if it uses the .babelrc of each module, if present?
The downside is that the consumer needs to install every babel plugin or preset, and versions may not match.
.babelrcs and package.json etc should be honoured I think.
@stevemao from the root project you mean right?
Babel will look for a .babelrc in the current directory of the file being transpiled. If one does not exist, it will travel up the directory tree until it finds either a .babelrc, or a package.json with a "babel": {} hash within. Use "babelrc": false in options to stop lookup behavior, or provide the --no-babelrc CLI flag.
Looks like package.json should live in the root. But I'm not sure. As long as this plugin behaves the same as the conventional way :)
https://babeljs.io/docs/usage/babelrc/#lookup-behavior
Running new BabelEnginePlugin() currently uses the .babelrc file, if present - which works for us, I think.