-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add clarification for otel-js apps written in CJS and ESM #8666
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
base: main
Are you sure you want to change the base?
Add clarification for otel-js apps written in CJS and ESM #8666
Conversation
|
I've incorporated the feedback from the original PR, and created new as I wasn't sure what would be easiest to review. Happy to reopen the old if that's better. |
vitorvasc
left a comment
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.
Hi @JamieDanielson, thanks for this!
I left a small suggestion from a technical perspective so we can reuse these without needing to copy and paste.
|
/fix:refcache |
|
✅ |
cartermp
left a comment
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.
Overall LGTM, but I recommend moving the second notice in the nodejs.md file down under Troubleshooting.
|
|
||
| {{% /tab %}} {{< /tabpane >}} | ||
|
|
||
| {{% include esm-support-node.md %}} |
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.
I'm not sure which one is intended, but the file is currently named sm-support-note.md, while the includes are referring to it as esm-support-node.md:
| {{% include esm-support-node.md %}} | |
| {{% include esm-support-note.md %}} |
Node.js has two module systems: CommonJS(CJS) and ECMAScript modules(ESM). As ESM becomes more common in usage, we need to better document the current assumptions and requirements.
This is a start with the bare minimum, which is to specify the assumption that the app is running as CJS... as well as document the loader hook currently required for ESM apps. It seemed useful to start here based on issues like #4812.