To achieve this you can use Laravel Mix
- Ensure that Node.js and NPM are installed: run
node -v
andnpm -v
. - Install Laravel Mix
npm install
. - Open webpack.mix.js and add
mix.browserSync('127.0.0.1:8000');
. - Run
php artisan serve
. - And the
npm run watch
.
it work nice, thanks
npm install browser-sync
npm install browser-sync-webpack-plugin