vite 6.0.0-beta.1 → 6.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -94,9 +94,7 @@ class HMRContext {
94
94
  removeFromMap(this.newListeners);
95
95
  }
96
96
  send(event, data) {
97
- this.hmrClient.messenger.send(
98
- JSON.stringify({ type: "custom", event, data })
99
- );
97
+ this.hmrClient.messenger.send({ type: "custom", event, data });
100
98
  }
101
99
  acceptDeps(deps, callback = () => {
102
100
  }) {
@@ -116,8 +114,8 @@ class HMRMessenger {
116
114
  this.connection = connection;
117
115
  this.queue = [];
118
116
  }
119
- send(message) {
120
- this.queue.push(message);
117
+ send(payload) {
118
+ this.queue.push(payload);
121
119
  this.flush();
122
120
  }
123
121
  flush() {
@@ -590,7 +588,7 @@ const hmrClient = new HMRClient(
590
588
  },
591
589
  {
592
590
  isReady: () => socket && socket.readyState === 1,
593
- send: (message) => socket.send(message)
591
+ send: (payload) => socket.send(JSON.stringify(payload))
594
592
  },
595
593
  async function importUpdatedModule({
596
594
  acceptedPath,