From b9bedffa8b10b94740f905946ec8c3d5bc47786a Mon Sep 17 00:00:00 2001 From: Emily Xiong Date: Thu, 17 Nov 2022 11:25:35 -0500 Subject: [PATCH] fix(react-native): fix the tsc command for react-native and expo (#12888) --- .../src/generators/application/files/tsconfig.json.template | 5 +++-- .../generators/application/files/app/tsconfig.json.template | 5 +++-- .../src/generators/library/files/lib/tsconfig.json__tmpl__ | 2 +- .../generators/library/files/lib/tsconfig.lib.json__tmpl__ | 3 +-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/expo/src/generators/application/files/tsconfig.json.template b/packages/expo/src/generators/application/files/tsconfig.json.template index 819d3b3033b4c..2cd7843271bf6 100644 --- a/packages/expo/src/generators/application/files/tsconfig.json.template +++ b/packages/expo/src/generators/application/files/tsconfig.json.template @@ -5,10 +5,11 @@ "jsx": "react-native", "lib": ["dom", "esnext"], "moduleResolution": "node", - "noEmit": true, "skipLibCheck": true, "resolveJsonModule": true, - "strict": true + "strict": true, + "composite": true, + "declaration": true }, "files": [ "../../node_modules/@nrwl/expo/typings/svg.d.ts" diff --git a/packages/react-native/src/generators/application/files/app/tsconfig.json.template b/packages/react-native/src/generators/application/files/app/tsconfig.json.template index bed1e573009c6..fc5620b9e6c08 100644 --- a/packages/react-native/src/generators/application/files/app/tsconfig.json.template +++ b/packages/react-native/src/generators/application/files/app/tsconfig.json.template @@ -5,9 +5,10 @@ "jsx": "react-native", "lib": ["dom", "esnext"], "moduleResolution": "node", - "noEmit": true, "skipLibCheck": true, - "resolveJsonModule": true + "resolveJsonModule": true, + "composite": true, + "declaration": true }, "files": [ "../../node_modules/@nrwl/react-native/typings/svg.d.ts" diff --git a/packages/react-native/src/generators/library/files/lib/tsconfig.json__tmpl__ b/packages/react-native/src/generators/library/files/lib/tsconfig.json__tmpl__ index d9affba903da0..dacf3c7f5e0ac 100644 --- a/packages/react-native/src/generators/library/files/lib/tsconfig.json__tmpl__ +++ b/packages/react-native/src/generators/library/files/lib/tsconfig.json__tmpl__ @@ -1,7 +1,7 @@ { "extends": "<%= rootTsConfigPath %>", "compilerOptions": { - "jsx": "react-jsx", + "jsx": "react-native", "allowJs": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true diff --git a/packages/react-native/src/generators/library/files/lib/tsconfig.lib.json__tmpl__ b/packages/react-native/src/generators/library/files/lib/tsconfig.lib.json__tmpl__ index f78209302ef29..756d907421bff 100644 --- a/packages/react-native/src/generators/library/files/lib/tsconfig.lib.json__tmpl__ +++ b/packages/react-native/src/generators/library/files/lib/tsconfig.lib.json__tmpl__ @@ -2,8 +2,7 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "<%= offsetFromRoot %>dist/out-tsc", - "types": ["node"], - "jsx": "react-native" + "types": ["node"] }, "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.spec.tsx", "test-setup.ts"], "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]