My application requires a very extensive loading for certain functions, but vite updates the page by itself causing the loading to restart and lose all the progress already made on the page, I would like to know how to disable vite's auto reload.
vite.config.ts:
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
server: {
host: true,
port: 5173, // This is the port which we will use in docker
// Thanks @sergiomoura for the window fix
// add the next lines if you're using windows and hot reload doesn't work
hmr: { overlay: false },
watch: {
usePolling: true
}
}
})