Skip to content

Commit 9c86bf4

Browse files
authored
build(angular): Avoid loading all @types/ packages (#8466)
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. See https://www.typescriptlang.org/tsconfig/types.html for details.
1 parent d439fc5 commit 9c86bf4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/angular/tsconfig.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
"compilerOptions": {
77
// package-specific options
8-
"experimentalDecorators": true
8+
"experimentalDecorators": true,
9+
// Avoid loading all @types/... packages as they may not be TS 4.0 compatible
10+
// We have no types packages here we directly depend on,
11+
// if we ever add some we need to allowlist them here
12+
"types": []
913
}
1014
}

0 commit comments

Comments
 (0)