Thursday, March 2, 2017

Laravel "gulp watch" compiles assets automatically but doesn't reload the browser

I am running gulp on a laravel 5.3 and it seems that gulp watch runs and sync via browsersync only once. Whenever I made changes on my scripts, assets are being compiled automatically but the browser doesn't reload.

Here's my gulpfile.js

const elixir = require('laravel-elixir');
const browserSync = require('laravel-elixir-browsersync');

elixir(mix => {
    mix.browserSync({
        proxy: 'local.app'
    });

    // these files are located under [resources/assets/app/css/..] that will be compiled to [public/app/css/...]
    mix.styles([
        '../app/css/bootstrap.min.css',
        '../app/css/animate.css',
        '../app/css/style.css'
    ], 'public/app/css/plugins.min.css');
});

I checked http://localhost:3001/ and everything is enabled on the browserSync settings.



via basagabi

Advertisement