Skip to content

chore: Update typescript compilation target

Enrique Alcántara requested to merge update-typescript-compilation-targets into main

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

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)

Edited by Enrique Alcántara

Merge request reports