From c17c4707fb21fdffb7cadc6afe38cd9514cc84eb Mon Sep 17 00:00:00 2001 From: Elliot Winkler Date: Mon, 13 Nov 2023 12:11:08 -0700 Subject: [PATCH 1/2] Exclude node_modules from TS compilation TypeScript excludes `node_modules` by default (among other directories) if you don't specify `exclude` in the TS config, but if you specify `exclude`, then you need to make to explicitly list `node_modules`. --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 23c8ceb..097cac2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,5 +12,5 @@ "strict": true, "target": "es2020" }, - "exclude": ["./dist/**/*"] + "exclude": ["./dist", "./node_modules"] } From 615790aafaacd7225faa46cb11ac9e14d39d34ec Mon Sep 17 00:00:00 2001 From: Elliot Winkler Date: Tue, 14 Nov 2023 11:38:50 -0700 Subject: [PATCH 2/2] Ensure we exclude node_modules in root + any subdirectory --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 097cac2..56f6531 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,5 +12,5 @@ "strict": true, "target": "es2020" }, - "exclude": ["./dist", "./node_modules"] + "exclude": ["./dist", "**/node_modules"] }