sekoyo / universal-react

A universal react starter, with routing, meta, title, and data features
242 stars 50 forks source link

Hot reload not working (windows 8.1) #21

Closed awhitehouse104 closed 8 years ago

awhitehouse104 commented 8 years ago

Can't speak for everyone, but I had to modify a couple of things to get hot reload to work on windows.

First, remove localhost binding in server.js (reference).

server.listen(port, (err) => {
    if (err) {
        console.error(err);
    }
    console.info('==> 🌎 Listening on port %s. Open up http://localhost:%s/ in your browser.', port, port);
});

Also, add base public path in webpack.config (reference).

output: {
    path: path.join(__dirname, 'dist'),
    filename: 'app.js',
    publicPath: '/'
},
sekoyo commented 8 years ago

Excellent thanks, it was never working well for me good catches, note that it still won't work with react pure functional components but that's a limitation of the hot reloader (looking forward to the new one). I'll verify this later and update.

awhitehouse104 commented 8 years ago

Yes I considered playing with the new one but this fix was simple enough for now :)