diff --git a/cardigan/tsconfig.json b/cardigan/tsconfig.json index de32dd7045..515e10500c 100644 --- a/cardigan/tsconfig.json +++ b/cardigan/tsconfig.json @@ -1,3 +1,7 @@ { "extends": "../config/tsconfig-base", + "compilerOptions": { + "module": "esnext", + "moduleResolution": "bundler", + } } diff --git a/common/tsconfig.json b/common/tsconfig.json index 407efb39d4..515e10500c 100644 --- a/common/tsconfig.json +++ b/common/tsconfig.json @@ -1,4 +1,7 @@ { "extends": "../config/tsconfig-base", - "include": ["**/*.ts", "**/*.tsx"] + "compilerOptions": { + "module": "esnext", + "moduleResolution": "bundler", + } } diff --git a/config/tsconfig-base.json b/config/tsconfig-base.json index 4446b6735f..5686a91a7b 100644 --- a/config/tsconfig-base.json +++ b/config/tsconfig-base.json @@ -8,8 +8,6 @@ "isolatedModules": true, "jsx": "preserve", "lib": ["esnext"], - "module": "esnext", - "moduleResolution": "bundler", "noEmit": true, "noFallthroughCasesInSwitch": true, "resolveJsonModule": true, @@ -18,5 +16,6 @@ "strictNullChecks": true, "target": "es6", }, - "exclude": ["**/node_modules"] + "exclude": ["/**/node_modules"], + "include": ["/**/*.ts", "/**/*.tsx"], } \ No newline at end of file diff --git a/content/webapp/tsconfig.json b/content/webapp/tsconfig.json index a162fe4531..a7b6d73f3f 100644 --- a/content/webapp/tsconfig.json +++ b/content/webapp/tsconfig.json @@ -1,6 +1,9 @@ { "extends": "../../config/tsconfig-base", - "include": ["**/*.ts", "**/*.tsx"], + "compilerOptions": { + "module": "esnext", + "moduleResolution": "node" // Forced by NextJs on build + }, "ts-node": { "preferTsExts": true } diff --git a/identity/webapp/tsconfig.json b/identity/webapp/tsconfig.json index a162fe4531..a7b6d73f3f 100644 --- a/identity/webapp/tsconfig.json +++ b/identity/webapp/tsconfig.json @@ -1,6 +1,9 @@ { "extends": "../../config/tsconfig-base", - "include": ["**/*.ts", "**/*.tsx"], + "compilerOptions": { + "module": "esnext", + "moduleResolution": "node" // Forced by NextJs on build + }, "ts-node": { "preferTsExts": true } diff --git a/toggles/webapp/tsconfig.json b/toggles/webapp/tsconfig.json index 32e5ec9e0e..bb9341c0a2 100644 --- a/toggles/webapp/tsconfig.json +++ b/toggles/webapp/tsconfig.json @@ -1,5 +1,9 @@ { "extends": "../../config/tsconfig-base", + "compilerOptions": { + "module": "esnext", + "moduleResolution": "bundler", + }, // This is for https://github.com/wellcomecollection/ts-aws "ts-node": { "skipIgnore": true