Skip to content

Conversation

@R-Delfino95
Copy link
Collaborator

Description

Fixes #444, which caused a crash when running sanity schema extract because @mux/mux-player-react tried to access browser-only APIs (like DOMParser) in a Node environment.

Thanks to @RJWadley for identifying the issue and opening the initial PR (#445) 🙏
@mux/mux-player-react already provides a built-in lazy loading implementation, which ensures the player only loads in the browser. Using that version fully resolves the crash without requiring other component changes.

Testing

  • Run npm ci && npx sanity schema extract
  • Run npx sanity typegen generate

Notes

@vercel
Copy link

vercel bot commented Nov 6, 2025

@R-Delfino95 is attempting to deploy a commit to the Sanity Sandbox Team on Vercel.

A member of the Team first needs to authorize it.

@R-Delfino95 R-Delfino95 changed the title Impot lazy MuxPlayer to avoid schema extraction errors fix: import lazy MuxPlayer to avoid schema extraction errors Nov 6, 2025
@vercel
Copy link

vercel bot commented Nov 6, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sanity-plugin-mux-input Ready Ready Preview Comment Nov 6, 2025 6:06pm
sanity-plugin-mux-input-example Ready Ready Preview Comment Nov 6, 2025 6:06pm

Copy link
Member

@stipsan stipsan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

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.

schema extraction fails when plugin included

2 participants