diogosalazar / vue-cli-plugin-browser-sync

A Vue Cli 3 plugin for BrowserSync with no required configuration
MIT License
5 stars 3 forks source link

Vue CLI Plugin Browser Sync

A Vue Cli 3 plugin for BrowserSync with no required configuration that uses Browser Sync with webpack-dev-middleware and webpack-hot-middleware.

Install

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!

Starting a development server

If you use Yarn (strongly recommended):

yarn serve:bs

or if you use NPM:

npm run serve:bs

BrowserSync Configuration

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
    }
  }
};