Skip to content

Commit

Permalink
feat(babel): include es6.object.assign by default
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkdo committed Mar 4, 2019
1 parent 70047c7 commit 52fe145
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-preset-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Below is a list of all available parameters:
* **loose**, default `false` - '[@babel/preset-env](https://babeljs.io/docs/en/babel-preset-env#loose)' parameter and also sets `loose=true` for `@babel/plugin-proposal-class-properties`
* **modern** passed by builder, either `true` or `false`
* **modules**, default `false` - '[@babel/preset-env](https://babeljs.io/docs/en/babel-preset-env#modules)' parameter
* **polyfills**, default `['es6.array.iterator','es6.promise','es7.promise.finally']`, more [in the corresponding repository](https://github.com/zloirock/core-js)
* **polyfills**, default `['es6.array.iterator','es6.promise','es6.object.assign','es7.promise.finally']`, more [in the corresponding repository](https://github.com/zloirock/core-js)
* **shippedProposals** - '[@babel/preset-env](https://babeljs.io/docs/en/babel-preset-env#shippedproposals)' parameter
* **spec** - '[@babel/preset-env](https://babeljs.io/docs/en/babel-preset-env#spec)' parameter
* **targets** - '[@babel/preset-env](https://babeljs.io/docs/en/babel-preset-env#targets)' parameter
Expand Down
3 changes: 3 additions & 0 deletions packages/babel-preset-app/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ const defaultPolyfills = [
'es6.array.iterator',
// This is required for webpack code splitting, vuex etc.
'es6.promise',
// this is needed for object rest spread support in templates
// as vue-template-es2015-compiler 1.8+ compiles it to Object.assign() calls.
'es6.object.assign',
// #2012 es6.promise replaces native Promise in FF and causes missing finally
'es7.promise.finally'
]
Expand Down

0 comments on commit 52fe145

Please sign in to comment.