Skip to content

Commit

Permalink
refactor: replace vite server.ws.send usages
Browse files Browse the repository at this point in the history
The above mentioned API is deprecated.
  • Loading branch information
alan-agius4 committed Apr 16, 2024
1 parent 51d956b commit 28906b8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ function handleUpdate(
if (serverOptions.liveReload || serverOptions.hmr) {
if (updatedFiles.every((f) => f.endsWith('.css'))) {
const timestamp = Date.now();
server.ws.send({
server.hot.send({
type: 'update',
updates: updatedFiles.map((filePath) => {
return {
Expand All @@ -363,7 +363,7 @@ function handleUpdate(

// Send reload command to clients
if (serverOptions.liveReload) {
server.ws.send({
server.hot.send({
type: 'full-reload',
path: '*',
});
Expand Down

0 comments on commit 28906b8

Please sign in to comment.