Skip to content

Commit

Permalink
type hack
Browse files Browse the repository at this point in the history
  • Loading branch information
evantahler committed Apr 2, 2024
1 parent d76d22e commit 8809e8b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions servers/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ import { type HTTP_METHOD } from "../classes/Action";
import type { BunFile } from "bun";
import { ErrorType, TypedError } from "../classes/TypedError";

// @ts-ignore TODO: Hack because react-dom wants to load the node package, but wa want the browser package for some reason
import { renderToReadableStream } from "react-dom/server.browser.js";
// TODO: Hack because react-dom wants to load the node package, but wa want the browser package for some reason
import ReactDOM from "react-dom/server";
// @ts-ignore
import reactDomBrowser from "react-dom/server.browser.js";
const {
renderToReadableStream,
}: { renderToReadableStream: typeof ReactDOM.renderToReadableStream } =
reactDomBrowser;

type URLParsed = import("url").URL;

Expand Down

0 comments on commit 8809e8b

Please sign in to comment.