ES6 packages moved to es2021

Hello good people,
Just wanted to give a heads up to a change made in the latest version, published just yesterday.
For those of you who use our es6 packages (i.e. the ones that start with “@babylonjs”), we have moved the target of the compiled code to es2021. This target is supported by all browsers we support (including safari! Amazing…), so there shouldn’t be any change in your part. If there is, please let me know and we can address it.

14 Likes

LOL :slight_smile:

4 Likes

famous last words :wink:

2 Likes

Don’t jinx it! :rofl:

1 Like

Should I update my tsconfig’s Compiler Options? Right now they’re set to:

(...)

"target": "es6",
    "lib": [
      "dom",
      "es6"
    ],
"module": "ESNext",

(...)

I don’t think you need to but I’ll cc @RaananW just in case

No. What version of es you deliver your typescript code is your own decision :slight_smile:
We deliver .js files (with declarations). these js files now have es2021 syntax. you don’t re-compile them. If you do need to support an older version, we recommend transpiling using (for example) babel

2 Likes