The docs recommends that you use the production flag when running Gulp in production: gulp --production.
Internally, Elixir defines the variable below to check the environment and modify the behaviour of certain recipes:
var inProduction = elixir.config.production;
You could add the above line to your Gulpfile and do the check yourself.
var elixir = require('laravel-elixir');
var inProduction = elixir.config.production;
elixir(function(mix) {
mix.sass("bootstrap.scss");
if (! inProduction) {
// Do the BrowserSync stuff…
}
});
I haven't tested this myself, so please let me know if it works.