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 <sora@morimoto.io>
  • Loading branch information
smorimoto committed Apr 3, 2024
1 parent 577984d commit 1c7d1e6
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": "pnpm@8.11.0",
"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 1c7d1e6

Please sign in to comment.