Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9747480

Browse files
authored
Turn on certain TypeScript options (#5607)
1 parent eca0ec0 commit 9747480

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

‎packages/react-scripts/config/webpack.config.dev.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,14 @@ module.exports = {
424424
async: false,
425425
checkSyntacticErrors: true,
426426
tsconfig: paths.appTsConfig,
427+
compilerOptions: {
428+
module: 'esnext',
429+
moduleResolution: 'node',
430+
resolveJsonModule: true,
431+
isolatedModules: true,
432+
noEmit: true,
433+
jsx: 'preserve',
434+
},
427435
watch: paths.appSrc,
428436
silent: true,
429437
formatter: typescriptFormatter,

‎packages/react-scripts/config/webpack.config.prod.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,14 @@ module.exports = {
544544
async: false,
545545
checkSyntacticErrors: true,
546546
tsconfig: paths.appTsConfig,
547+
compilerOptions: {
548+
module: 'esnext',
549+
moduleResolution: 'node',
550+
resolveJsonModule: true,
551+
isolatedModules: true,
552+
noEmit: true,
553+
jsx: 'preserve',
554+
},
547555
watch: paths.appSrc,
548556
silent: true,
549557
formatter: typescriptFormatter,

‎packages/react-scripts/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"eslint-plugin-jsx-a11y": "6.1.2",
4646
"eslint-plugin-react": "7.11.1",
4747
"file-loader": "2.0.0",
48-
"fork-ts-checker-webpack-plugin-alt": "0.4.10",
48+
"fork-ts-checker-webpack-plugin-alt": "0.4.14",
4949
"fs-extra": "7.0.0",
5050
"html-webpack-plugin": "4.0.0-alpha.2",
5151
"identity-obj-proxy": "3.0.0",

‎packages/react-scripts/scripts/utils/verifyTypeScriptSetup.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ function verifyTypeScriptSetup() {
101101
forceConsistentCasingInFileNames: { suggested: true },
102102

103103
// These values are required and cannot be changed by the user
104+
// Keep this in sync with the webpack config
104105
module: {
105106
parsedValue: ts.ModuleKind.ESNext,
106107
value: 'esnext',

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /