Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(babel-preset-app): pass full config to @babel/preset-env (#5522)
Pass not just the useBuiltIns and corejs options, but the whole envOptions object, into the @babel/preset-env preset that is used to transform @babel/runtime, just like for the @babel/preset-env that is used for the application source code. This allows users to also specify other options, such as `exclude` and `polyfills`, and have them apply here too. In particular, this can be used to exclude the Promise polyfill, e. g. if Promise is already polyfilled in some other way. Previously, exclude: ['es.promise'], polyfills: ['es.array.iterator', 'es.object.assign'], could be used to configure the preset for the application source code, but the babel runtime would be transformed without those options, and so es.promise would still end up being included. Closes #5208
- Loading branch information