Jitsi-meet transpiling/compiling

Hello,

i am trying to get a better understand of jitsi and the environment around. As far as i know there are two repos:

  1. lib-jitsi-meet: this is the source code that is build to lib-jitsi-meet.min.js
  2. jitsi-meet: react implementation and it uses lib-jitsi-meet api

Both repos are transpiled with babel and compilated with node: So for example getLogger(__filename) the __filename gets replaced with the real name of the containing file. After that they get bundled with webpack.

But there is still a mysterious code for me. In the jitsi-meet project react/features folders are always index.js that export or import a ./_ file.

Example:

I read the comments that it is re-exporting the JitsiMeetJS from lib-jitsi-meet, but where is the mapping from lib-jitsi-meet and ./_?

We do that so the code can work both in web and mobile. The mobile part is implemented with React Native, that’s why you’ll see some .web.js / .native.js. On the mobile part we bundle lib-jitsi-meet together with the app, not so on the web, it’s dynamically loaded on a script tag, and here we just re-export it for consistency, so we can use the same imports on both systems.

1 Like

But they names are _.native.js or _.web.js and not ```./_````?

Because Webpack (the web bundler) can use the automattic extension, and so can Metro (for the RN part).

Ok, thank you for your great help! Can you link me the docs where i can read it^^. This would be super useful for me. Sry for so many questions, i am just a beginner developer who wants to understand it all :smiley:

Check this out: Resolve | webpack