Skip to content

Commit

Permalink
Make Vite middleware use current server for HMR WebSocket
Browse files Browse the repository at this point in the history
  • Loading branch information
elturpin committed Dec 20, 2023
1 parent abfd36a commit e360658
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,10 @@ async function startServer(server: http.Server | https.Server) {
mergeConfig(isUsingViteResolvedConfig ? {} : config, {
clearScreen: false,
appType: "custom",
server: { middlewareMode: true },
server: {
middlewareMode: true,
hmr: { server },
},
}),
);

Expand Down

0 comments on commit e360658

Please sign in to comment.