Switch to no bundling and let extensions decide how they would like to bundle#119
Conversation
| commonProperties["common.extname"] = this.extensionId; | ||
| commonProperties["common.extversion"] = this.extensionVersion; | ||
| // TODO @lramos15, this should be dynamic but loading JSON modules didn't play nicely | ||
| commonProperties["common.telemetryclientversion"] = "0.6.3"; |
There was a problem hiding this comment.
@connor4312 Any ideas on how to import a JSON file across node12, node 14, and node16. Seems node 16 gets upset that I don't use import assertions but then node12 and node14 get upset when I do. I don't really want to rely on require because I use no var requires and fs wouldn't work in a common layer
There was a problem hiding this comment.
Prior to Node 16, JSON modules required a flag to be used in an ES6 import, so this is tricky.
Can the version be passed in from a higher level outside of the common layer?
There was a problem hiding this comment.
I could pass it in from the browser layer and node layer respectively. Not sure how that helps especially in the browser case. Normally I would use something like the bundler to compile time inject the value here but the idea is to avoid bundlers
There was a problem hiding this comment.
Honestly the easiest way would probably be just having a npm postversion script that would update the version number in a ts file when the version gets bumped
No longer even bundle source code. Let extensions decide how they would like to bundle everything.
TODO: Can we re-use the common code somehow? Right now I create two spearate directories because node gets compiled as commonjs while browser compiled as esm