BrowserSync

Another useful development tool is BrowserSync. Similar to watch mode, BrowserSync monitors your files for changes, and when one occurs inserts the change into the browser. This saves you from having to do a manual browser refresh after every build.

To use BrowserSync, you'll need to have the Yarn package manager installed. If you're running terminal commands from within the Vagrant Box, you're all set, as Yarn is pre-installed with Homestead. Otherwise, follow the installation instructions for Yarn here: https://yarnpkg.com/en/docs/install.

BrowserSync has been integrated with Mix and can be used by chaining a call to the browserSync method in your Mix configuration. Pass an options object with the app's URL as a proxy property, ...

Get Full-Stack Vue.js 2 and Laravel 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.