Auto reload in laravel using laravel-mix and browserSync

ilham_s

jasuke-dev

Posted on December 25, 2022

Auto reload in laravel using laravel-mix and browserSync

if you want to auto reload the page every time your project file change you can use browserSync

Prerequisite

in this method you must already have laravel project and install and use laravel-mix

Install browserSync and browserSync web[ack plugin

npm install browser-sync browser-sync-webpack-plugin --save-dev
Enter fullscreen mode Exit fullscreen mode

add following code to webpack.mix.js

mix.browserSync('127.0.0.1:8000');
Enter fullscreen mode Exit fullscreen mode

then you can watch your project

watch your project with npm run watch (mix watch)

💖 💪 🙅 🚩
ilham_s
jasuke-dev

Posted on December 25, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related