Skip to content

Conversation

@catFurr
Copy link

@catFurr catFurr commented Sep 24, 2025

Switched from webpack to vite with minimal source code changes. This provides:

  • significantly faster dev server start up time
  • massive dx improvements. Everything is HMR, including scss, html, config, etc.
  • HMR actually works inside meetings. No need for page reloads which were breaking the xmpp connection.
  • Automatic cache invalidation. No need to manually update the version number anymore (still needed for lib-jitsi-meet)
  • faster build times with lower memory usage. This can reduce CI/CD costs.
  • built in SSI during dev/preview

Build metrics:

Tool Avg Build Time Avg Memory Usage
Webpack 150.26s 7.36 GB
Vite 9.87s (⚡ 15.2x faster) 3.72 GB (🎯 49% less)

Dev server metrics:

Tool Avg Startup Time
Webpack 20.48s
Vite 5.16s (⚡ 4x faster)

Source code changes:

  • replaced __filename with new URL(import.meta.url).pathname
  • renamed index.web.js, VideoContainer.js, LargeVideoManager.js to JSX files.
  • changed require to import
  • updated worker imports to vite syntax.

Also tested with Rolldown-Vite and the improvements are even better.
3.66-second builds and 2.08GB memory usage
that's 41x faster than Webpack while using 72% less memory.

@catFurr
Copy link
Author

catFurr commented Sep 24, 2025

This PR is almost ready, just need to test a few more things. I'm trying to keep this as a non-breaking change.

I created the draft PR to get some early feedback on this. Thanks!

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

@saghul
Copy link
Member

saghul commented Sep 25, 2025

This is really exciting, thanks for getting the ball rolling! It may take us a bit to review this, since we have no experience with Vite 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants