From 8561dcdee486e696152e50c6c96f14941c897ce0 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Fri, 8 Apr 2022 16:44:08 -0700 Subject: Immediately inject fast refresh once --- src/bundler.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bundler.zig b/src/bundler.zig index d5c01a03a..63ebdcce5 100644 --- a/src/bundler.zig +++ b/src/bundler.zig @@ -1095,7 +1095,6 @@ pub const Bundler = struct { return null; } - // Delay by one tick so that the rest of the file loads first if (include_refresh_runtime and refresh_runtime_module_id > 0) { var refresh_runtime_injector_buf: [1024]u8 = undefined; var fixed_buffer = std.io.fixedBufferStream(&refresh_runtime_injector_buf); @@ -1103,7 +1102,7 @@ pub const Bundler = struct { fixed_buffer_writer.print( \\if ('window' in globalThis) {{ - \\ (async function() {{ + \\ (function() {{ \\ BUN_RUNTIME.__injectFastRefresh(${x}()); \\ }})(); \\}} -- cgit v1.2.3