Skip to content

Commit ab5d90b

Browse files
note polyfill requirement
1 parent 81a0bf2 commit ab5d90b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

packages/babel-preset-react-app/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ Then create a file named `.babelrc` with following contents in the root folder o
2323
"presets": ["react-app"]
2424
}
2525
```
26+
27+
This preset uses the `useBuiltIns` option with [transform-object-rest-spread](http://babeljs.io/docs/plugins/transform-object-rest-spread/), which assumes `Object.assign` is available or polyfilled.

packages/babel-preset-react-app/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ const plugins = [
1515
require.resolve('babel-plugin-transform-class-properties'),
1616
// { ...todo, completed: true }
1717
[require.resolve('babel-plugin-transform-object-rest-spread'), {
18-
// Use Object.assign directly, instead of extends helper
18+
// Use Object.assign directly, instead of extends helper. Note that this
19+
// assumes Object.assign is available/polyfilled.
1920
useBuiltIns: true
2021
}],
2122
// function* () { yield 42; yield 43; }

0 commit comments

Comments
 (0)