-
Notifications
You must be signed in to change notification settings - Fork 542
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
feat(detectors): generate esm build files too #2636
feat(detectors): generate esm build files too #2636
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2636 +/- ##
=======================================
Coverage 90.79% 90.79%
=======================================
Files 169 169
Lines 8059 8059
Branches 1645 1645
=======================================
Hits 7317 7317
Misses 742 742 |
e3e0a8c
to
e6d363e
Compare
Looks like this is done the same way as our other ESM libraries like the aws propagator etc. You should know that this method of ESM publishing is actually not standards compliant and we've had problems with it in the past. There is an issue in the main repo to revamp our ESM publishing strategy. For now I don't see a problem applying the strategy we already use to other packages, but you should be aware it might be changing in the near future. |
@dyladan Yes, I know. I just wanted to be sync with the current approach and if it will be changed in the future, this one also can be changed along with all the others together. |
@serkan-ozal sorry i was mostly putting that there for people in the future wondering why things might be the way they are, and for other reviewers. |
Which problem is this PR solving?
As OTEL FAAS SIG, we are working on reducing OTEL Lambda Nodejs layer coldstart overhead and bundling has the biggest impact. But bundling tools like webpack, esbuild don't like CJS modules while tree-shaking, but ESM modules. So, in this PR, we are configuring build process to generate ESM build files too.
Short description of the changes
To be able to generate ESM build files too, this PR is
tsconfig.esm.json
filespackage.json
files
section of thepackage.json
for their discoverability