I have a server side rendered production
mode Vite application. My issue is that: routinely the webpage will reload and the console will display [vite] connecting...
. I traced this back to the hot module reload portion of vite's codebase. However, I do not want hmr
on for production
, but it still seems to be on regardless of me setting the two settings below to false
:
In my vite.config.js
file I have:
...
export default defineConfig({
server: {
hmr: false,
},
Also in my NodeJS server.js
file I have:
const vite = await createViteServer({
server: { middlewareMode: 'ssr', hmr: false },
})
How can I turn off Vite's hmr
?