UNPKG

quasar-app-extension-ssg

Version:
20 lines (14 loc) 445 B
import SockJSClient from 'webpack-dev-server/client/clients/SockJSClient.js'; export default class CustomSockJSClient extends SockJSClient { onMessage(f) { this.sock.onmessage = (e) => { const message = JSON.parse(e.data); if (message.type === 'reload') { console.info('[webpack-dev-server] Generator updated. Reloading...'); window.location.reload(); return; } f(e.data); }; } }