frappe-ui
frappe-ui copied to clipboard
Vite hot reload on Windows with WSL
Add hot reload in windows with the following code in ./vite.js for Users developing on Windows.
I've added the watch:{usePolling:true}, after this, hot reload on windows (Docker on WSL2) works.
return {
name: 'frappeui-vite-plugin',
config: () => ({
server: {
watch: {
usePolling: true
},
port: port,
proxy: {
'^/(app|login|api|assets|files)': {
target: `http://127.0.0.1:${webserver_port}`,
ws: true,
router: function (req) {
const site_name = req.headers.host.split(':')[0]
return `http://${site_name}:${webserver_port}`
},
},
},
},
}),
}
Is it possible to add this to the code?
@cdiethelm does vite hmr not work at all when you're editing frappe-ui dir?