Coder Social home page Coder Social logo

Works great with <script> tags but failes with npm package about twilio-video.js HOT 4 CLOSED

enahum avatar enahum commented on May 24, 2024
Works great with

Comments (4)

enahum avatar enahum commented on May 24, 2024

I made it work but I had to comment this line https://github.com/twilio/twilio-conversations.js/blob/01bf25157561d64413336b5e776d5af1165e8f6e/lib/client.js#L5 because for some reason require('twilio-common') returns undefined while loading with webpack.

Feedback on this?

from twilio-video.js.

markandrus avatar markandrus commented on May 24, 2024

Hi @enahum, and thanks for writing in.

I think what you are seeing is due to the browser override we have in place for twilio-common. It's defined here in package.json and points to src/twilio-common.js. So the line you point out ends up trying to require a browser global (Twilio) that does not exist when you go the Webpack/Browserify route.

We created the browser override for <script> tag users, thinking it would be nice if they could include twilio-common.js and twilio-conversations.js separately. But since then we've decided against it (makes updating harder, doesn't really give the user anything, etc.).

So I think in the next release we will change this: the <script> version of twilio-conversations.js will begin bundling twilio-common.js, and using Webpack/Browserify should "just work".

from twilio-video.js.

enahum avatar enahum commented on May 24, 2024

Thanks @markandrus so far I forked the project and made the change to that line of code and now it works with webpack.

BTW you should update dependancies and review tests cause two of them were failing for me

from twilio-video.js.

markandrus avatar markandrus commented on May 24, 2024

@enahum this should be fixed in 0.13.6. Can you retest? Thanks! (also, integration tests should be a little more robust now)

from twilio-video.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.