1
votes

I'm trying to use browsersync with Laravel. I followed this tutorial from laracasts but my browsersync isn't syncing.

Here's my gulpfile:

var elixir = require('laravel-elixir');
elixir(function(mix) {
    mix.sass('app.scss');
    mix.browserSync();
});

My app is homestead.app. So, after starting gulp watch, I go to homestead.app:3000 and see my app without BrowserSync.

I go to homestead.app:3001 and I can access BrowserSync dashboard, which shows this:

Local http://localhost:3000

External http://10.0.2.15:3000

Proxying: http://homestead.app

Current Connections Connected browsers will be listed here.

Local and external links not responding.

No matter what I did, I couldn't see any connection in Current Connections tab.

What I tried:

tried running gulp watch from my local environment instead of homestead.

This time both Local and external links were pointing to my app, but no syncing.

I'm using windows 8.1

Any help would be appreciated.

1

1 Answers

1
votes

Well, after trying to achieve the desired result for couple of hours I decided to go with plain old gulp, rather than Laravel Elixir.

I removed the node_modules folder, cleaned up the default package.json and gulpfile.js files and customized them, then ran clean npm install.

After that, i used gulp watch on my local machine. Also, i went with LiveReload instead of BrowserSync.