Skip to content

Commit 3281967

Browse files
build(devtools): target es2020 explicitly
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.
1 parent df30710 commit 3281967

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

devtools/projects/shell-browser/src/BUILD.bazel

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ esbuild(
6464
minify = True,
6565
platform = "browser",
6666
splitting = False,
67-
target = "esnext",
67+
target = "es2020",
6868
deps = LINKER_PROCESSED_FW_PACKAGES + [":src"],
6969
)
7070

@@ -76,7 +76,7 @@ esbuild(
7676
minify = True,
7777
platform = "browser",
7878
splitting = False,
79-
target = "esnext",
79+
target = "es2020",
8080
deps = [":devtools"],
8181
)
8282

devtools/src/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ esbuild(
4545
entry_points = [":main.ts"],
4646
platform = "browser",
4747
splitting = True,
48-
target = "es2016",
48+
target = "es2020",
4949
deps = LINKER_PROCESSED_FW_PACKAGES + [":demo"],
5050
)
5151

0 commit comments

Comments
 (0)