Make gax-nodejs an ESM compatible package
Thanks for stopping by to let us know something could be better!
Is your feature request related to a problem? Please describe. Currently this library does not integrate into other ESM usages cleanly
Describe the solution you'd like gax-nodejs publishes new versions which are ESM compatible.
Describe alternatives you've considered Nothing is really available as an alternative, besides staying on CJS. Unfortunately this is not an option long term as the ecosystem moves forward.
@alexander-fenster, what would you think about releasing this as dual-format, CJS and ESM? If so, we'd need to do it in the next major bump.
@josephperrott, FYI we wouldn't be able to make this just ESM, or else it would break consumers of this library (gapics). But it would potentially be possible for us to publish this in dual-format.
A possible alternative would be to release into two separate packages, one for ESM, another one for CJS, but it's not really clear how we would manage that in the libraries unless we also publish each of them separately as both ESM and CJS (which we probably won't do).
I'm assuming the only way forward here is to publish a combined package (2x code size), and then drop CJS in some later major version bump.