diff --git a/gatsby.js b/gatsby.js index f6bcad1..a05d426 100644 --- a/gatsby.js +++ b/gatsby.js @@ -14,8 +14,9 @@ Cypress.on('window:load', (win) => { } const source = new EventSource(`${baseUrl}/__webpack_hmr`); - source.onopen = () => console.debug(LOG_TAG, 'Connected to HMR event source'); + let timeout; + source.onopen = () => console.debug(LOG_TAG, 'Connected to HMR event source'); source.addEventListener('message', function (e) { const { action } = JSON.parse(e.data); switch (action) {