babel-preset-react-app-new 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/create.js +4 -2
  2. package/package.json +1 -1
package/create.js CHANGED
@@ -48,6 +48,8 @@ module.exports = function (api, opts, env) {
48
48
  absoluteRuntimePath = path.dirname(require.resolve('@babel/runtime/package.json'));
49
49
  }
50
50
 
51
+ var reactRuntime = opts.runtime || (hasJsxRuntime ? 'automatic' : 'classic');
52
+
51
53
  var corejsVerson = '3.31';
52
54
 
53
55
  try {
@@ -103,8 +105,8 @@ module.exports = function (api, opts, env) {
103
105
  development: isEnvDevelopment || isEnvTest,
104
106
  // Will use the native built-in instead of trying to polyfill
105
107
  // behavior for any plugins that require one.
106
- ...(opts.runtime !== 'automatic' ? { useBuiltIns: true } : {}),
107
- runtime: opts.runtime || (hasJsxRuntime ? 'automatic' : 'classic')
108
+ ...(reactRuntime !== 'automatic' ? { useBuiltIns: true } : {}),
109
+ runtime: reactRuntime
108
110
  }
109
111
  ],
110
112
  isTypeScriptEnabled && [require('@babel/preset-typescript').default]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babel-preset-react-app-new",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Babel preset used by Create React App",
5
5
  "repository": {
6
6
  "type": "git",