Skip to content

Conversation

@Zaid0412
Copy link
Contributor

@Zaid0412 Zaid0412 commented Aug 3, 2025

Summary

This PR fixes the warning about multiple instances of @emotion/react being loaded at runtime:

You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems.

Root Cause

The issue was caused by dependencies like @giphy/react-components using an older version of @emotion/react (11.9.3), while the app and other packages use 11.10.6. This resulted in multiple builds of Emotion being bundled.

Fix

  • Used overrides in package.json to force a single version (@emotion/[email protected] and @emotion/[email protected]) across all dependencies.
  • Added Webpack resolve.alias to ensure that all Emotion imports resolve to the same instance in node_modules.

Result

  • Eliminated Emotion multiple-instance runtime warning.
  • Ensured consistent styling behavior and reduced bundle bloat.
  • Confirmed app renders correctly with no UI regressions.

Notes

  • Affected packages: @giphy/react-components, @mui/material, tss-react
  • This does not downgrade or alter any functional behavior — only deduplicates Emotion.

@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 Aug 4, 2025

Jenkins please test this please.

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