Skip to content

Commit

Permalink
Further tweak runtime plugin per documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
eagerdev12 authored and Timer committed Sep 20, 2018
1 parent 459ad9c commit 5571db5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/babel-preset-react-app/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,18 @@ module.exports = function(api, opts, env) {
useBuiltIns: true,
},
],
// Polyfills the runtime needed for async/await and generators
// Polyfills the runtime needed for async/await, generators, and friends
// https://babeljs.io/docs/en/babel-plugin-transform-runtime
[
require('@babel/plugin-transform-runtime').default,
{
corejs: false,
helpers: false,
regenerator: true,
// https://babeljs.io/docs/en/babel-plugin-transform-runtime#useesmodules
// We should turn this on once the lowest version of Node LTS
// supports ES Modules.
useESModules: isEnvDevelopment || isEnvProduction,
},
],
isEnvProduction && [
Expand Down

0 comments on commit 5571db5

Please sign in to comment.