twilio-video.js icon indicating copy to clipboard operation
twilio-video.js copied to clipboard

Twilio future development discussion: esm & following node release schedule

Open Niputi opened this issue 4 years ago • 6 comments

  • [x] I have verified that the issue occurs with the latest twilio-video.js release and is not marked as a known issue in the CHANGELOG.md.
  • [x] I reviewed the Common Issues and open GitHub issues and verified that this report represents a potentially new issue.
  • [ ] I verified that the Quickstart application works in my environment.
  • [x] I am not sharing any Personally Identifiable Information (PII) or sensitive account information (API keys, credentials, etc.) when reporting this issue.

Code to reproduce the issue:

https://github.com/Niputi/vite-tests/tree/twilio-video

Expected behavior:

  • being able to import this module and other twilio modules without having to use a bundler.
  • being able to import into modern build tools like Vite.js, snowpack and esbuild without workarounds
  • Not relying on node built-ins.
  • moving to esm output or having multi output via rollup, a build for browsers, one for node.js environment and potentially output for deno.

I see the package.json of this module declares that it can be used from version 0.12 of node.js. if modules code structure would be following node release schedule, it would help help with https://github.com/twilio/twilio-video.js/issues/1272

Actual behavior:

can't use twilio modules in esm environment without workarounds

TODO

Software versions:

  • [x] Browser(s): Microsoft Edge, Version 93.0.953.0 (Official build) (64-bit)
  • [x] Operating System: windows
  • [x] twilio-video.js: 2.15.2
  • [x] Third-party libraries (e.g., Angular, React, etc.): vanilla js with

Niputi avatar Jul 23 '21 12:07 Niputi

@Niputi thanks for this suggestion! This is definitely an improvement and our team will consider it. However, this is currently low in priority due to other higher priority product features. But we can keep this open and continue the discussion.

charliesantos avatar Jul 23 '21 14:07 charliesantos

+1 More and more VueJS projects are migrating now from vue-cli (Webpack) to vite (Rollup). There is a real demand for twilio js sdk to be bundler-agnostic.

@Niputi could you tell what workarounds have you managed to find?

acupofspirt avatar Aug 10 '21 13:08 acupofspirt

I submitted an internal ticket to investigate this further.

charliesantos avatar Aug 10 '21 16:08 charliesantos

@charliesantos any updates?

acupofspirt avatar Aug 19 '21 15:08 acupofspirt

I'm getting this kind of error when I try to use twilio-video^2.16.0 with sveltekit or Angular 12

Sveltekit image

Angular12 image

Is there any workaround to this?

ju4n97 avatar Sep 03 '21 23:09 ju4n97

Is this project still being actively developed? Would really, really like ESM.

Miserlou avatar Oct 31 '22 15:10 Miserlou