From 8815f69aea46c052132d6937543d1528b1216e39 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Thu, 6 Jul 2023 14:38:13 +0200 Subject: [PATCH] build(angular): Avoid loading all `@types/` packages As `@sentry/angular` uses TS 4.0, but the default behavior of TS is to load _all_ `@types/xxx` packages it can find in node_modules, the build will fail if _any_ other package uses a types package that uses newer TS features. In order to avoid this, we opt out of the automatic types resolution - since we are not using any `@types/xxx` package in angular as of now, this doesn't change anything. --- packages/angular/tsconfig.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/angular/tsconfig.json b/packages/angular/tsconfig.json index ed785543d690..2f88305e15e5 100644 --- a/packages/angular/tsconfig.json +++ b/packages/angular/tsconfig.json @@ -5,6 +5,10 @@ "compilerOptions": { // package-specific options - "experimentalDecorators": true + "experimentalDecorators": true, + // Avoid loading all @types/... packages as they may not be TS 4.0 compatible + // We have no types packages here we directly depend on, + // if we ever add some we need to allowlist them here + "types": [] } }