Skip to content

Commit

Permalink
fix #1470: allow "ES2021" in "tsconfig.json"
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Jul 25, 2021
1 parent 7d630eb commit 1d3c103
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

However, some people want to run other non-CSS languages through esbuild's CSS bundler anyway. So with this release, esbuild will no longer generate any warnings if you do this. But keep in mind that doing this is still potentially unsafe. Depending on the input language, using esbuild's CSS bundler to bundle non-CSS code can still potentially alter the semantics of your code.

* Allow `ES2021` in `tsconfig.json` ([#1470](https://github.com/evanw/esbuild/issues/1470))

TypeScript recently [added support for `ES2021`](https://github.com/microsoft/TypeScript/pull/41239) in `tsconfig.json` so esbuild now supports this too. This has the same effect as if you passed `--target=es2021` to esbuild. Keep in mind that the value of `target` in `tsconfig.json` is only respected if you did not pass a `--target=` value to esbuild.

## 0.12.15

* Fix a bug with `var()` in CSS color lowering ([#1421](https://github.com/evanw/esbuild/issues/1421))
Expand Down
2 changes: 2 additions & 0 deletions internal/resolver/tsconfig_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ func ParseTSConfigJSON(
constraints[compat.ES] = []int{2019}
case "es2020":
constraints[compat.ES] = []int{2020}
case "es2021":
constraints[compat.ES] = []int{2021}
case "esnext":
// Nothing to do in this case
default:
Expand Down

0 comments on commit 1d3c103

Please sign in to comment.