This repository has been archived by the owner on Nov 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 47
AMD/Require Transpilation Option #115
Comments
Can you provide an example that you would expect to work that isn't? |
We have a browser client framework that is consumed by developers as an NPM module. This framework currently uses RequireJS AMD modules. We are trying to uptake the OpenTelemetry API and add @opentelmetry/api as a package.json dependency. The issue is - even if we transpile it ourselves to compile the framework (which we would need to if we're using the standard NoOp impl - see Issue open-telemetry/opentelemetry-js#3311), we run into an issue where:
* Dev installs our framework with dependencies and a predefined Require config
* Dev cannot run the app they've developed with our framework since @opentelemetry/api will not be able to be resolved by RequireJS.
We could instrument our code with untyped objects to get around the direct OT dependency altogether (this is our current solution) but a first-party AMD/Require distribution would make this less painful to consumers of our tools. I'm assuming any framework supporting this standard (ESM isn't really fully baked yet for browsers) for the foreseeable future will run into the same problem.
K
…________________________________
From: Daniel Dyla ***@***.***>
Sent: Friday, August 27, 2021 1:02 PM
To: open-telemetry/opentelemetry-js-api ***@***.***>
Cc: Kevin Cirone ***@***.***>; Author ***@***.***>
Subject: [External] : Re: [open-telemetry/opentelemetry-js-api] AMD/Require Transpilation Option (#115)
Can you provide an example that you would expect to work that isn't?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/open-telemetry/opentelemetry-js-api/issues/115*issuecomment-907344289__;Iw!!ACWV5N9M2RV99hQ!c9yltnjKsd88eoPUQ_2UEaH_Fm8RZv4eW47j6IYYWBOhxKkGOb8WMoGKZFj7DjdPbw$>, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AGKZT7RP42KKJ6OEXG6COR3T67AKNANCNFSM5CBLCNDQ__;!!ACWV5N9M2RV99hQ!c9yltnjKsd88eoPUQ_2UEaH_Fm8RZv4eW47j6IYYWBOhxKkGOb8WMoGKZFh_hdgGeg$>.
Triage notifications on the go with GitHub Mobile for iOS<https://urldefense.com/v3/__https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!ACWV5N9M2RV99hQ!c9yltnjKsd88eoPUQ_2UEaH_Fm8RZv4eW47j6IYYWBOhxKkGOb8WMoGKZFhfAiP7uw$> or Android<https://urldefense.com/v3/__https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign*3Dnotification-email*26utm_medium*3Demail*26utm_source*3Dgithub__;JSUlJSU!!ACWV5N9M2RV99hQ!c9yltnjKsd88eoPUQ_2UEaH_Fm8RZv4eW47j6IYYWBOhxKkGOb8WMoGKZFjr86EsQg$>.
|
After looking into this a little more it seems there are many ways to handle this. Just looking at the https://github.com/umdjs/umd/tree/master/templates repository shows many possible "official" ways of handling this. Can you provide a concrete proposal for changes we can make which would satisfy you concern? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It would be useful to get an AMD/Require source option available in NPM form to avoid a transpilation step for developers. If we provide a dev framework that supports AMD that adds OT as a dependency, they won't be able to use that dependency without manually transpiling.
The text was updated successfully, but these errors were encountered: