···11-// Safari doesn't implement ReadableByteStreamController.
22-// The standard web-streams-polyfill only polyfills ReadableStream, not byte streams.
33-// This adds the missing byte stream support.
44-55-import {
66- ReadableStream as PolyfillReadableStream,
77- ReadableByteStreamController as PolyfillReadableByteStreamController,
88-} from "web-streams-polyfill";
99-1010-if (typeof globalThis.ReadableByteStreamController === "undefined") {
1111- // Safari doesn't have byte stream support - use the polyfill's ReadableStream
1212- // which includes full byte stream support
1313- globalThis.ReadableStream = PolyfillReadableStream as typeof ReadableStream;
1414- // @ts-expect-error: ReadableByteStreamController polyfill assignment
1515- globalThis.ReadableByteStreamController = PolyfillReadableByteStreamController;
1616-}
+2-6
src/client/embed.tsx
···11-// Must be first - shims webpack globals for react-server-dom-webpack
22-import "./webpack-shim.ts";
33-44-import "./byte-stream-polyfill.ts";
55-import "web-streams-polyfill/polyfill";
66-import "text-encoding";
11+import "../shared/webpack-shim.ts";
22+import "../shared/polyfill.ts";
7384import React, { useState, useEffect } from "react";
95import { createRoot } from "react-dom/client";
+2-6
src/client/index.tsx
···11-// Must be first - shims webpack globals for react-server-dom-webpack
22-import "./webpack-shim.ts";
33-44-import "./byte-stream-polyfill.ts";
55-import "web-streams-polyfill/polyfill";
66-import "text-encoding";
11+import "../shared/webpack-shim.ts";
22+import "../shared/polyfill.ts";
7384import { createRoot } from "react-dom/client";
95import { App } from "./ui/App.tsx";