Skip to content

Commit

Permalink
feat: use builtins for preset react
Browse files Browse the repository at this point in the history
  • Loading branch information
swashata committed Oct 7, 2018
1 parent 3fc2423 commit 11ec4e6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/babel-preset-base/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ export const preset = (opts: PresetOptions | null = {}) => {
'@babel/preset-react',
{
// Put development based on BABEL_ENV
// Adds component stack to warning messages
// Adds __self attribute to JSX which React will use for some warnings
development: process.env.BABEL_ENV !== 'production',
// Will use the native built-in instead of trying to polyfill
// behavior for any plugins that require one.
useBuiltIns: true,
// But spread later, so that user can override it
...presetReact,
},
Expand Down

0 comments on commit 11ec4e6

Please sign in to comment.