Skip to content

Instantly share code, notes, and snippets.

@vades
Last active November 11, 2024 17:41
Show Gist options
  • Save vades/28f7e487192b3fbb61c429efd200cf1f to your computer and use it in GitHub Desktop.
Save vades/28f7e487192b3fbb61c429efd200cf1f to your computer and use it in GitHub Desktop.
Auto refresh after changes with Laravel Mix

Laravel auto refresh after changes

To achieve this you can use Laravel Mix

  1. Ensure that Node.js and NPM are installed: run node -v and npm -v.
  2. Install Laravel Mix npm install.
  3. Open webpack.mix.js and add mix.browserSync('127.0.0.1:8000');.
  4. Run php artisan serve.
  5. And the npm run watch.

Sources

@ashirsaleh
Copy link

Works for me thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment