File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/react-scripts/scripts/utils Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ const resolve = require('resolve');
1414const path = require ( 'path' ) ;
1515const paths = require ( '../../config/paths' ) ;
1616const os = require ( 'os' ) ;
17+ const semver = require ( 'semver' ) ;
1718const immer = require ( 'react-dev-utils/immer' ) . produce ;
1819const globby = require ( 'react-dev-utils/globby' ) . sync ;
1920
@@ -133,7 +134,8 @@ function verifyTypeScriptSetup() {
133134 noEmit : { value : true } ,
134135 jsx : {
135136 parsedValue : ts . JsxEmit . React ,
136- suggested : 'react' ,
137+ value : semver . gte ( ts . version , '4.1.0-beta' ) ? 'react-jsx' : 'react' ,
138+ reason : 'to support the new JSX transform in React 17'
137139 } ,
138140 paths : { value : undefined , reason : 'aliased imports are not supported' } ,
139141 } ;
You can’t perform that action at this time.
0 commit comments