This commit is contained in:
Alistair Smith
2025-09-24 21:34:49 -07:00
parent c1931c11fe
commit f65d89ff8b
5 changed files with 17 additions and 19 deletions

View File

@@ -294,7 +294,7 @@ pub const Framework = struct {
/// the above react configuration.
/// The provided allocator is not stored.
pub fn auto(
arena: std.mem.Allocator,
_: std.mem.Allocator,
resolver: *bun.resolver.Resolver,
file_system_router_types: []FileSystemRouterType,
) !Framework {
@@ -313,16 +313,6 @@ pub const Framework = struct {
if (resolveOrNull(resolver, "react-refresh/runtime")) |rfr| {
fw.react_fast_refresh = .{ .import_source = rfr };
} else if (resolveOrNull(resolver, "react")) |_| {
fw.react_fast_refresh = .{ .import_source = "react-refresh/runtime/index.js" };
try fw.built_in_modules.put(
arena,
"react-refresh/runtime/index.js",
if (Environment.codegen_embed)
.{ .code = @embedFile("node-fallbacks/react-refresh.js") }
else
.{ .code = bun.runtimeEmbedFile(.codegen, "node-fallbacks/react-refresh.js") },
);
}
return fw;

View File

@@ -80,10 +80,6 @@ declare var IS_BUN_DEVELOPMENT: unknown;
/** If this is the fallback error page */
declare const IS_ERROR_RUNTIME: boolean;
interface Window {
__bun_f: Array<string | Uint8Array<ArrayBuffer>>;
}
declare module "react-dom/server.node" {
export * from "react-dom/server";
}