From bb930b74794ffd25e51d05d3c1d39d3889d65b4a Mon Sep 17 00:00:00 2001 From: Lauri Harpf Date: Sat, 14 Aug 2021 15:03:12 +0300 Subject: [PATCH] fix: Fix #120 (running "yarn web" on Expo fails). The "dist" output in the v6 alpha packages contains JSX and ESNext constructs. Browsers can't handle these natively, so "yarn web" fails on Expo. Fix by using slightly less modern constructs in our dist outputs. --- addons/ondevice-controls/tsconfig.json | 7 +++---- addons/ondevice-notes/tsconfig.json | 7 +++---- app/react-native/tsconfig.json | 7 +++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/addons/ondevice-controls/tsconfig.json b/addons/ondevice-controls/tsconfig.json index 0e79b78f6b..6ccd72e0af 100644 --- a/addons/ondevice-controls/tsconfig.json +++ b/addons/ondevice-controls/tsconfig.json @@ -1,13 +1,12 @@ { "compilerOptions": { "baseUrl": ".", - "jsx": "react-native", + "jsx": "react", "rootDir": "./src", - "module": "ESNext", + "module": "ES6", "skipDefaultLibCheck": true, "skipLibCheck": true, - "target": "ESNext", - "lib": ["ESNext"], + "target": "ES2016", "allowSyntheticDefaultImports": true, "paths": { "@emotion/native": ["src/typings.d.ts"] diff --git a/addons/ondevice-notes/tsconfig.json b/addons/ondevice-notes/tsconfig.json index 03e11b9f27..76099d7016 100644 --- a/addons/ondevice-notes/tsconfig.json +++ b/addons/ondevice-notes/tsconfig.json @@ -1,13 +1,12 @@ { "compilerOptions": { "baseUrl": ".", - "jsx": "react-native", + "jsx": "react", "rootDir": "./src", - "module": "ESNext", + "module": "ES6", "skipDefaultLibCheck": true, "skipLibCheck": true, - "target": "ESNext", - "lib": ["ESNext"], + "target": "ES2016", "allowSyntheticDefaultImports": true, "outDir": "dist/", "moduleResolution": "node", diff --git a/app/react-native/tsconfig.json b/app/react-native/tsconfig.json index 72b5d05182..c77199d3b2 100644 --- a/app/react-native/tsconfig.json +++ b/app/react-native/tsconfig.json @@ -1,13 +1,12 @@ { "compilerOptions": { "baseUrl": ".", - "jsx": "react-native", + "jsx": "react", "rootDir": "./src", - "module": "ESNext", + "module": "ES6", "skipDefaultLibCheck": true, "skipLibCheck": true, - "target": "ESNext", - "lib": ["ESNext"], + "target": "ES2016", "allowSyntheticDefaultImports": true, "paths": { "@emotion/native": ["src/typings.d.ts"]