Skip to content

Commit

Permalink
build(devtools): target es2020 explicitly
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AleksanderBodurri committed May 1, 2023
1 parent df30710 commit 3281967
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions devtools/projects/shell-browser/src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ esbuild(
minify = True,
platform = "browser",
splitting = False,
target = "esnext",
target = "es2020",
deps = LINKER_PROCESSED_FW_PACKAGES + [":src"],
)

Expand All @@ -76,7 +76,7 @@ esbuild(
minify = True,
platform = "browser",
splitting = False,
target = "esnext",
target = "es2020",
deps = [":devtools"],
)

Expand Down
2 changes: 1 addition & 1 deletion devtools/src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ esbuild(
entry_points = [":main.ts"],
platform = "browser",
splitting = True,
target = "es2016",
target = "es2020",
deps = LINKER_PROCESSED_FW_PACKAGES + [":demo"],
)

Expand Down

0 comments on commit 3281967

Please sign in to comment.