Skip to content

Conversation

amirna2
Copy link
Contributor

@amirna2 amirna2 commented Sep 18, 2025

This pull request introduces several improvements to the examples/realtime-video project, primarily focused on adding Node.js polyfills for browser compatibility and enhancing development workflows. The main changes include updating dependencies, adding polyfills for Node.js globals, and expanding the Makefile with more granular commands.

Polyfill and Dependency Updates:

  • Added a custom polyfill for setImmediate and clearImmediate in src/polyfills.ts, and ensured it loads at app startup via src/main.tsx. This improves compatibility when using Node.js-style asynchronous APIs in the browser. [1] [2]
  • Updated package.json dependencies: bumped @formant/data-sdk to ^1.80.8, added process and setimmediate packages, and included vite-plugin-node-polyfills for broader Node.js compatibility.
  • Updated vite.config.ts to use vite-plugin-node-polyfills, enabling polyfills for Node.js globals like process, Buffer, and timers (setImmediate, clearImmediate).

Development Workflow Enhancements:

  • Expanded the Makefile with new commands (clean, install, clean-install, local-dev, local-build, local-preview, deploy-prep, deploy-with-upstream) to streamline local development, building, and deployment processes.

@amirna2 amirna2 merged commit 9a89833 into master Sep 19, 2025
@amirna2 amirna2 deleted the fix-vite-webpack-node-polyfills branch September 19, 2025 20:28
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.

1 participant