Skip to content

Commit

Permalink
[ts] put JSX support in root tsconfig file (#19359)
Browse files Browse the repository at this point in the history
  • Loading branch information
Spencer authored May 23, 2018
1 parent 77cfc94 commit 2d89927
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@
"@types/glob": "^5.0.35",
"@types/listr": "^0.13.0",
"@types/minimatch": "^2.0.29",
"@types/react": "^16.3.14",
"@types/react-dom": "^16.0.5",
"angular-mocks": "1.4.7",
"babel-eslint": "8.1.2",
"babel-jest": "^22.4.3",
Expand Down
1 change: 0 additions & 1 deletion src/optimize/base_optimizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ export default class BaseOptimizer {
experimentalWatchApi: true,
onlyCompileBundledFiles: true,
compilerOptions: {
jsx: 'react',
sourceMap: Boolean(this.sourceMaps),
target: 'es5',
module: 'esnext',
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"compilerOptions": {
"baseUrl": ".",

// Support .tsx files and transform JSX into calls to React.createElement
"jsx": "react",

// Enables all strict type checking options.
"strict": true,

Expand Down
17 changes: 17 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,19 @@
dependencies:
"@types/retry" "*"

"@types/react-dom@^16.0.5":
version "16.0.5"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.0.5.tgz#a757457662e3819409229e8f86795ff37b371f96"
dependencies:
"@types/node" "*"
"@types/react" "*"

"@types/react@*", "@types/react@^16.3.14":
version "16.3.14"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.3.14.tgz#f90ac6834de172e13ecca430dcb6814744225d36"
dependencies:
csstype "^2.2.0"

"@types/retry@*", "@types/retry@^0.10.2":
version "0.10.2"
resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.10.2.tgz#bd1740c4ad51966609b058803ee6874577848b37"
Expand Down Expand Up @@ -3231,6 +3244,10 @@ [email protected], "cssom@>= 0.3.0 < 0.4.0", "cssom@>= 0.3.2 < 0.4.0":
dependencies:
cssom "0.3.x"

csstype@^2.2.0:
version "2.5.2"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.5.2.tgz#4534308476ceede8fbe148b9b99f9baf1c80fa06"

currently-unhandled@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea"
Expand Down

0 comments on commit 2d89927

Please sign in to comment.