A Vue Cli 3 plugin for BrowserSync with no required configuration that uses Browser Sync with webpack-dev-middleware and webpack-hot-middleware.
Open a terminal in the directory of your app created with Vue-CLI 3.
Then, install vue-cli-plugin-browser-sync
by running:
vue add browser-sync
That's It! You're ready to go!
If you use Yarn (strongly recommended):
yarn serve:bs
or if you use NPM:
npm run serve:bs
To see avalible options, check out Browsersync options
Configuration options can be specified via the optional vue.config.js
file in the pluginOptions.browserSync
property.
// vue.config.js
module.exports = {
pluginOptions: {
browserSync: {
// ... BrowserSync options
}
}
};