twilio-video.js
twilio-video.js copied to clipboard
Twilio future development discussion: esm & following node release schedule
- [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 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.
+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?
I submitted an internal ticket to investigate this further.
@charliesantos any updates?
I'm getting this kind of error when I try to use twilio-video^2.16.0 with sveltekit or Angular 12
Sveltekit

Angular12

Is there any workaround to this?
Is this project still being actively developed? Would really, really like ESM.