aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/hmr.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/hmr.ts')
-rw-r--r--src/runtime/hmr.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/runtime/hmr.ts b/src/runtime/hmr.ts
index f89223f95..0d63c2f5c 100644
--- a/src/runtime/hmr.ts
+++ b/src/runtime/hmr.ts
@@ -354,7 +354,7 @@ var __HMRModule, __FastRefreshModule, __HMRClient;
}
}
- class HMRClient {
+ class HMRClient extends EventTarget {
static client: HMRClient;
socket: WebSocket;
hasWelcomed: boolean = false;
@@ -366,6 +366,7 @@ var __HMRModule, __FastRefreshModule, __HMRClient;
loaders = {
css: new CSSLoader(),
};
+
start() {
if (runOnce) {
__hmrlog.warn(
@@ -460,7 +461,7 @@ var __HMRModule, __FastRefreshModule, __HMRClient;
this.client = new HMRClient();
this.client.verbose = verbose;
this.client.start();
- globalThis["SPEEDY_HMR"] = this.client;
+ globalThis["BUN_HMR"] = this.client;
}
handleBuildFailure(buffer: ByteBuffer, timestamp: number) {