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.
- package/create.js +4 -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
|
-
...(
|
|
107
|
-
runtime:
|
|
108
|
+
...(reactRuntime !== 'automatic' ? { useBuiltIns: true } : {}),
|
|
109
|
+
runtime: reactRuntime
|
|
108
110
|
}
|
|
109
111
|
],
|
|
110
112
|
isTypeScriptEnabled && [require('@babel/preset-typescript').default]
|