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.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/hmr.ts b/src/runtime/hmr.ts
index 0d63c2f5c..99cdf634a 100644
--- a/src/runtime/hmr.ts
+++ b/src/runtime/hmr.ts
@@ -2,8 +2,8 @@ import { ByteBuffer } from "peechy";
import * as API from "../api/schema";
var __HMRModule, __FastRefreshModule, __HMRClient;
-// We add a scope here to minimize chances of namespace collisions
-{
+if (typeof window !== "undefined") {
+ // We add a scope here to minimize chances of namespace collisions
var runOnce = false;
var clientStartTime = 0;
@@ -354,7 +354,7 @@ var __HMRModule, __FastRefreshModule, __HMRClient;
}
}
- class HMRClient extends EventTarget {
+ class HMRClient {
static client: HMRClient;
socket: WebSocket;
hasWelcomed: boolean = false;