dojo / webpack-contrib

Plugins and loaders for webpack used with Dojo
Other
4 stars 19 forks source link

The connection to http://localhost:9999/__webpack_hmr was interrupted while the page was loading. #205

Closed samends closed 5 years ago

samends commented 5 years ago

Bug Getting the following error using Firefox 69.0.2 (64-bit). The error specifically is: The connection to http://localhost:9999/__webpack_hmr was interrupted while the page was loading. I am not getting this error when I load the app on chrome.

Package Version: 6.0.0

Code

I paired down the code to a very simple app and this error still occured: app.tsx

import icache from '@dojo/framework/core/middleware/icache';
import store from './middleware/store';
import { ensure } from './middleware/ensure';

const factory = create({ store, icache, ensure });

export default factory(function App({ middleware: { store: { get, path }, icache, ensure }}) {
        return (
            <div> Sample </div>
        )
});

main.tsx

import renderer, { tsx } from '@dojo/framework/core/vdom';
import App from './app';

const r = renderer(() => <App />);
r.mount();
agubler commented 5 years ago

@samenz I think this is fine, the error is indicating that the open connection (using server side events) used by HMR has been interrupted by the refresh of the page (either manually or triggered by a change to code). The HMR connection is re-established when the page is loaded.

matt-gadd commented 5 years ago

As @agubler said this doesn't materially affect anything (the page still updates correctly), but granted the firefox warning is annoying so I've raised https://github.com/dojo/webpack-contrib/pull/206.

samends commented 5 years ago

Thanks @matt-gadd! It was pretty annoying 😄