chore: Update typescript compilation target
What does this MR do and why?
It updates the Typescript and ESBuild compilation targets. The effect of this change is that the javascript output of the Web IDE build system assumes that newer features of the ECMAScript standard are already supported in modern browsers. As a result, the typescript and esbuild compilers do less "transpilation" to ensure backward compatibility with browsers that do not support modern ECMAScript versions.
How did we choose the compilation targets
- es2022 was chosen based on the compilation target chosen by the VSCode Fork https://gitlab.com/gitlab-org/gitlab-web-ide-vscode-fork/-/blob/main/src/tsconfig.base.json#L20
- the target browsers are based on the targets used by the GitLab application https://gitlab.com/gitlab-org/gitlab/-/blob/master/.browserslistrc?ref_type=heads
Why are we implementing this change?
This change was triggered by the poor debugging support for ES private fields when this language feature is transpiled gitlab-vscode-extension#1298 (closed). A more general motivation is that assuming browsers support more modern standards will allow us to improve the Developer Experience and output more efficient/performant ECMAScript.
When should this change be released?
Given that we are removing support for older web browsers, we should release this change in 17.0 which is a major release for GitLab. It's worth indicating that the VSCode fork doesn't support the targets that we currently support in the Web IDE. It's logical to infer that the Web IDE could break older web browser because of that.
NOTICE This change will break the GitLab build system because GitLab's webpack can't process ES private fields syntax. I opened an MR that sets up webpack to process the gitlab/web-ide
package using babel-loader
Use babel loader to process web-ide package in ... (gitlab!150112 - closed)