Fix vite webpack node polyfills #233
Merged
+5,930
−6,061
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
setImmediate
andclearImmediate
insrc/polyfills.ts
, and ensured it loads at app startup viasrc/main.tsx
. This improves compatibility when using Node.js-style asynchronous APIs in the browser. [1] [2]package.json
dependencies: bumped@formant/data-sdk
to^1.80.8
, addedprocess
andsetimmediate
packages, and includedvite-plugin-node-polyfills
for broader Node.js compatibility.vite.config.ts
to usevite-plugin-node-polyfills
, enabling polyfills for Node.js globals likeprocess
,Buffer
, and timers (setImmediate
,clearImmediate
).Development Workflow Enhancements:
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.