BrowserSync
mix.browserSync('my-site.test');
BrowserSync will automatically monitor your files for changes, and insert your changes into the browser - all without requiring a manual refresh. You may enable support by calling the mix.browserSync()
method, like so:
mix.browserSync('my-domain.test');
// Or:
// https://browsersync.io/docs/options/
mix.browserSync({
proxy: 'my-domain.test'
})
You may pass either a string (proxy) or object (BrowserSync settings) to this method. The domain name you declare as your proxy is vital. This will proxy output from webpack Dev Server through BrowserSync.
Other options can be seen in the Browsersync Documentation.
Now, boot up the dev server, run:
npm run watch
And you're all set to go!