You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We do this because of a bug caused by evanw/esbuild#2950 and a recent change to how angular static properties are attached to class constructors. Targeting esnext or es2022 will cause the static initializer blocks that attach these static properties on class constructors to reference a class constructor variable that they do not have access to.
Because of this we explicitly target es2020 in our Angular DevTools builds.
PR Close#50086
Copy file name to clipboardExpand all lines: devtools/projects/shell-browser/src/BUILD.bazel
+12-2Lines changed: 12 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,12 @@ esbuild(
64
64
minify=True,
65
65
platform="browser",
66
66
splitting=False,
67
-
target="esnext",
67
+
# todo(aleksanderbodurri): here we target es2020 explicitly.
68
+
# We do this because of a bug caused by https://github.com/evanw/esbuild/issues/2950 and an Angular v16 change
69
+
# to how angular static properties are attached to class constructors.
70
+
# Targeting esnext or es2022 will cause the static initializer blocks that attach these static properties on class
71
+
# constructors to reference a class constructor variable that they do not have access to.
72
+
target="es2020",
68
73
deps=LINKER_PROCESSED_FW_PACKAGES+ [":src"],
69
74
)
70
75
@@ -76,7 +81,12 @@ esbuild(
76
81
minify=True,
77
82
platform="browser",
78
83
splitting=False,
79
-
target="esnext",
84
+
# todo(aleksanderbodurri): here we target es2020 explicitly.
85
+
# We do this because of a bug caused by https://github.com/evanw/esbuild/issues/2950 and an Angular v16 change
86
+
# to how angular static properties are attached to class constructors.
87
+
# Targeting esnext or es2022 will cause the static initializer blocks that attach these static properties on class
88
+
# constructors to reference a class constructor variable that they do not have access to.
Copy file name to clipboardExpand all lines: devtools/src/BUILD.bazel
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,12 @@ esbuild(
45
45
entry_points= [":main.ts"],
46
46
platform="browser",
47
47
splitting=True,
48
-
target="es2016",
48
+
# todo(aleksanderbodurri): here we target es2020 explicitly.
49
+
# We do this because of a bug caused by https://github.com/evanw/esbuild/issues/2950 and an Angular v16 change
50
+
# to how angular static properties are attached to class constructors.
51
+
# Targeting esnext or es2022 will cause the static initializer blocks that attach these static properties on class
52
+
# constructors to reference a class constructor variable that they do not have access to.
0 commit comments