Skip to content

Commit

Permalink
Use server.hot instead of deprecated server.ws
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <[email protected]>
  • Loading branch information
smorimoto committed Apr 2, 2024
1 parent f26660d commit 7a80e5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
"peerDependencies": {
"rescript": ">=9",
"vite": ">=3"
"vite": ">=5.1.0"
},
"packageManager": "[email protected]",
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default function createReScriptPlugin(config?: Config): Plugin {
(data) => {
const log = data.toString();
const err = parseCompilerLog(log);
if (err) server.ws.send({ type: 'error', err });
if (err) server.hot.send({ type: 'error', err });
}
);
},
Expand Down Expand Up @@ -195,7 +195,7 @@ export default function createReScriptPlugin(config?: Config): Plugin {
} else if (file.endsWith('.compiler.log')) {
const log = await read();
const err = parseCompilerLog(log);
if (err) server.ws.send({ type: 'error', err });
if (err) server.hot.send({ type: 'error', err });
}

return;
Expand Down

0 comments on commit 7a80e5a

Please sign in to comment.