Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make MUI + react-i18next peer dependencies #4113

Merged
merged 2 commits into from
Feb 27, 2025
Merged

Make MUI + react-i18next peer dependencies #4113

merged 2 commits into from
Feb 27, 2025

Conversation

cbeer
Copy link
Collaborator

@cbeer cbeer commented Feb 25, 2025

React isn't sharing contexts across plugins + apps the way it used to (because webpack did something special? React 18 changed something?). In order to get shared contexts, Mirador (we believe) has to treat those as peer dependencies and require the installing app to provide them (like we're already doing for React etc).

... but that's slightly annoying for people who use the UMD build ("just render me a mirador"), so this PR also adds a separate Vite configuration that (should?) include all the peer dependencies so it can be used directly 🤷‍♂️ .

Copy link

codecov bot commented Feb 25, 2025

Codecov Report

Attention: Patch coverage is 0% with 55 lines in your changes missing coverage. Please review.

Project coverage is 94.76%. Comparing base (20f12e1) to head (17439b0).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
vite-umd.config.js 0.00% 54 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4113      +/-   ##
==========================================
- Coverage   94.94%   94.76%   -0.19%     
==========================================
  Files         317      318       +1     
  Lines       16006    16061      +55     
  Branches     2501     2510       +9     
==========================================
+ Hits        15197    15220      +23     
- Misses        805      836      +31     
- Partials        4        5       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cbeer cbeer marked this pull request as ready for review February 27, 2025 16:15
@cbeer
Copy link
Collaborator Author

cbeer commented Feb 27, 2025

Merging this per today's committers meeting

…ntexts) and use separate builds for ES + UMD (which includes peer dependencies)
@cbeer cbeer merged commit a8a1a96 into main Feb 27, 2025
7 of 9 checks passed
@cbeer cbeer deleted the peer-deps branch February 27, 2025 19:57
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.

2 participants