-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: set target to "es2021" #3840
Conversation
Problem: "es6" is very old and all of our targets support es2021. Targeting es6 disallows new javascript features such as Promise.allSettled(). Solution: - increase target to "es2021". - also update webpack config (why is this duplicated across configs?) - improve logging - invalidate(): use Promise.allSettled() instead of all()
@@ -69,7 +69,7 @@ const baseConfig = { | |||
loader: 'esbuild-loader', | |||
options: { | |||
loader: 'ts', | |||
target: 'es2018', | |||
target: 'es2021', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why isn't this driven by tsconfig...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a design choice by the webpack team. There was an edge case where you could use the same webpack config for multiple projects and it wouldn't know which of the projects targets it should use. So they just made it explicitly required.
@@ -69,7 +69,7 @@ const baseConfig = { | |||
loader: 'esbuild-loader', | |||
options: { | |||
loader: 'ts', | |||
target: 'es2018', | |||
target: 'es2021', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a design choice by the webpack team. There was an edge case where you could use the same webpack config for multiple projects and it wouldn't know which of the projects targets it should use. So they just made it explicitly required.
The failing Insiders CI jobs are unrelated to this PR and are likely an upstream issue in VSCode. Same failures happen on other PRs.
|
Problem:
"es6" is very old and all of our targets support es2021. Targeting es6 disallows new javascript features such as Promise.allSettled().
Solution:
No significant change in (unminified) artifact size:
Sample of webpack'd source changes:
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.