-
Notifications
You must be signed in to change notification settings - Fork 821
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
ESM build targets ES5 resulting in polyfills for await #2471
Comments
ESM is available since ECMAScript 2015 (aka. |
as far as I remember ECMAScript 2015 is es6. |
@Flarna sorry, a typo.
A naive investigation on feature matrix of modern browsers:
So I'm a bit confident that we can safely switch to |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue was closed because it has been stale for 14 days with no activity. |
The ESM typescript build targets ES5 currently for everything.
see
opentelemetry-js/tsconfig.base.esm.json
Line 2 in 07b19ad
and
opentelemetry-js/tsconfig.es5.json
Line 4 in 07b19ad
As a result typescript generates quite heavy polyfills for e.g.
await
like this extracted from transpiled Meter.ts file:Is this intended? In special for NodeJs users this doesn't make much sense as ESM is only supported by newer NodeJs versions which support
await
out of the box.The current ESM support was done for browsers as far as I remember. Are there any browsers supporting ESM but not
await
?The text was updated successfully, but these errors were encountered: