mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-24 05:05:53 +08:00
Turn on certain TypeScript options (#5607)
This commit is contained in:
@@ -424,6 +424,14 @@ module.exports = {
|
||||
async: false,
|
||||
checkSyntacticErrors: true,
|
||||
tsconfig: paths.appTsConfig,
|
||||
compilerOptions: {
|
||||
module: 'esnext',
|
||||
moduleResolution: 'node',
|
||||
resolveJsonModule: true,
|
||||
isolatedModules: true,
|
||||
noEmit: true,
|
||||
jsx: 'preserve',
|
||||
},
|
||||
watch: paths.appSrc,
|
||||
silent: true,
|
||||
formatter: typescriptFormatter,
|
||||
|
||||
@@ -544,6 +544,14 @@ module.exports = {
|
||||
async: false,
|
||||
checkSyntacticErrors: true,
|
||||
tsconfig: paths.appTsConfig,
|
||||
compilerOptions: {
|
||||
module: 'esnext',
|
||||
moduleResolution: 'node',
|
||||
resolveJsonModule: true,
|
||||
isolatedModules: true,
|
||||
noEmit: true,
|
||||
jsx: 'preserve',
|
||||
},
|
||||
watch: paths.appSrc,
|
||||
silent: true,
|
||||
formatter: typescriptFormatter,
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
"eslint-plugin-jsx-a11y": "6.1.2",
|
||||
"eslint-plugin-react": "7.11.1",
|
||||
"file-loader": "2.0.0",
|
||||
"fork-ts-checker-webpack-plugin-alt": "0.4.10",
|
||||
"fork-ts-checker-webpack-plugin-alt": "0.4.14",
|
||||
"fs-extra": "7.0.0",
|
||||
"html-webpack-plugin": "4.0.0-alpha.2",
|
||||
"identity-obj-proxy": "3.0.0",
|
||||
|
||||
@@ -101,6 +101,7 @@ function verifyTypeScriptSetup() {
|
||||
forceConsistentCasingInFileNames: { suggested: true },
|
||||
|
||||
// These values are required and cannot be changed by the user
|
||||
// Keep this in sync with the webpack config
|
||||
module: {
|
||||
parsedValue: ts.ModuleKind.ESNext,
|
||||
value: 'esnext',
|
||||
|
||||
Reference in New Issue
Block a user