Hot reload stoped working after updating laravel mix
See original GitHub issue- Laravel Mix Version: 0.11.3
- Node Version: 6.10.2
- NPM Version: 4.5.0
- OS: windows 10
My composer json script for hot:
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
After updating laravel mix, hot reload stoped working. Scripts cannot be loaded, and when I visit http://localhost:8080/ or http://localhost:8080/js/app.js I get message: Cannot get / or Cannot get /js/app.js
Nothing else was changed and npm run dev still works.
If I use the fix that was posted in https://github.com/JeffreyWay/laravel-mix/issues/599 I can get it to work, but I need to disable extract because they suffer from the same error of Cannot GET /js/manifest.js.
Was there a breaking change and docs don’t reflect it?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Hot reloading not working with laravel/sail [laravel 8] #2719
test because Laravel Mix seems to use the host and port values from hmrOptions to (1) set the values for webpack-dev-server but also...
Read more >Laravel Mix HMR not updating after compiling - Stack Overflow
It just sits there waiting indefinitely. I have to restart npm run hot and then reload the page. Both JS/Vue and SASS doesn't...
Read more >Hot Module Replacement | Laravel Mix Documentation
Hot Module Replacement (or Hot Reloading) allows you to, not just refresh the page when a piece of JavaScript is changed, but it...
Read more >laravel - vue, no hot reload - Laracasts
Hot reloading is using webpack-dev-server, it doesn't use any static js file in your public folder and that is why npm run hot...
Read more >Laravel Mix Hot Module Reloading With React - Medium
Note we are using webpack-dev-server v2 and webpack v3. This is as webpack dev server v2 is for webpack 3, webpack-dev-server v3 is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just merged a PR to fix this.
I added the
headers
option to the following insetup/webpack.config.js
:This allows CORS requests from all hosts, which is ideal for Laravel Mix IMO (since it’s designed to be portable with minimal config, and allow for dev environments with random local domains). However, this defeats the purpose of the aforementioned patch.
I’d be happy to submit a PR for this, however I’d like @JeffreyWay’s thoughts first. Perhaps Mix’s hot-reload functionality should require this config?