•
5 min read
Inertia hot reload with Laravel mix
The following steps show how you can use hot module replacement in Laravel Mix through Homestead on Windows:
- Add script
"hot": "mix watch --hot"
topackage.json
- Call browserSync from Mix using a proxy in
webpack.mix.js
A quick tip!
This should install any additional dev dependencies but remember to restart the npm process to ensure your webpack changes are picked up
Optional:
- Use the
mix()
in your base layout for styles and scripts
- Start
npm run hot
- Any changes to your Laravel application code should be reflected in the current browser with any existing state.
For reference: