I can't get HMR running either, it just shows "Cannot GET /". Anyone knows how to fix this?
Laravel Mix and BrowserSync
Anyone have any luck getting browsersync working with laravel mix in a fresh laravel 5.4 install? I've gotten so used to 5.3 with gulp and browsersync I don't think I can go back. HMR I understand is supposed to be better with stateful updates, but I can't get that to trigger on a view or styl update either. In fact once I do the npm run anything on a fresh install of laravel 5.4 my localhost:8080 just returns
Cannot GET /
Instead of the welcome page.
EDIT: POST BEST ANSWER: You can find the docs for mix.browserSync('your-domain.dev'); https://github.com/JeffreyWay/laravel-mix/blob/master/docs/browsersync.md
BrowserSync seems to have been ditched from the official docs, but looking into the source code it is still there, also conveniently configured and ready to be launched.
Just edit your webpack.mix.js file to include mix.browserSync(); and then run npm run watch on your console.
By default, a browser window will open pointing to localhost:3000. Change and save any file and you should see your browser instantly refresh to reflect the change.
Please or to participate in this conversation.