Skip to content

Commit

Permalink
Use new JSX setting with TypeScript 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
iansu committed Sep 30, 2020
1 parent d5c0fe2 commit 8563066
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const resolve = require('resolve');
const path = require('path');
const paths = require('../../config/paths');
const os = require('os');
const semver = require('semver');
const immer = require('react-dev-utils/immer').produce;
const globby = require('react-dev-utils/globby').sync;

Expand Down Expand Up @@ -133,7 +134,8 @@ function verifyTypeScriptSetup() {
noEmit: { value: true },
jsx: {
parsedValue: ts.JsxEmit.React,
suggested: 'react',
value: semver.gte(ts.version, '4.1.0-beta') ? 'react-jsx' : 'react',
reason: 'to support the new JSX transform in React 17'
},
paths: { value: undefined, reason: 'aliased imports are not supported' },
};
Expand Down

0 comments on commit 8563066

Please sign in to comment.