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.
- package/dist/client/client.mjs +4 -6
- package/dist/node/chunks/{dep-BZ_CwQkz.js → dep-BHXIdTzn.js} +274 -170
- package/dist/node/chunks/{dep-DiM5uMHt.js → dep-BabmomGK.js} +1 -1
- package/dist/node/chunks/{dep-BZeeNeMJ.js → dep-DTHr9Se7.js} +1 -1
- package/dist/node/cli.js +7 -7
- package/dist/node/constants.js +7 -2
- package/dist/node/index.d.ts +42 -20
- package/dist/node/index.js +7 -115
- package/dist/node/module-runner.d.ts +71 -49
- package/dist/node/module-runner.js +141 -149
- package/dist/node-cjs/publicUtils.cjs +137 -12
- package/package.json +13 -13
package/dist/client/client.mjs
CHANGED
@@ -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(
|
120
|
-
this.queue.push(
|
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: (
|
591
|
+
send: (payload) => socket.send(JSON.stringify(payload))
|
594
592
|
},
|
595
593
|
async function importUpdatedModule({
|
596
594
|
acceptedPath,
|