Skip to content

Commit

Permalink
Pass useBuiltIns directly to react-preset
Browse files Browse the repository at this point in the history
  • Loading branch information
existentialism committed Mar 15, 2018
1 parent 0c648ab commit 394b21b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
10 changes: 3 additions & 7 deletions packages/babel-preset-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ module.exports = function(api, opts) {
// Adds component stack to warning messages
// Adds __self attribute to JSX which React will use for some warnings
development: isEnvDevelopment || isEnvTest,
// Will use the native built-in instead of trying to polyfill
// behavior for any plugins that require one.
useBuiltIns: true,
},
],
isFlowEnabled && [require('@babel/preset-flow').default],
Expand All @@ -99,13 +102,6 @@ module.exports = function(api, opts) {
useBuiltIns: true,
},
],
// Transforms JSX
[
require('@babel/plugin-transform-react-jsx').default,
{
useBuiltIns: true,
},
],
// Polyfills the runtime needed for async/await and generators
[
require('@babel/plugin-transform-runtime').default,
Expand Down
1 change: 0 additions & 1 deletion packages/babel-preset-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"@babel/plugin-transform-destructuring": "7.0.0-beta.42",
"@babel/plugin-transform-react-constant-elements": "7.0.0-beta.42",
"@babel/plugin-transform-react-display-name": "7.0.0-beta.42",
"@babel/plugin-transform-react-jsx": "7.0.0-beta.42",
"@babel/plugin-transform-regenerator": "7.0.0-beta.42",
"@babel/plugin-transform-runtime": "7.0.0-beta.42",
"@babel/preset-env": "7.0.0-beta.42",
Expand Down

0 comments on commit 394b21b

Please sign in to comment.