{"id":14976329,"url":"https://github.com/va1/browser-sync-webpack-plugin","last_synced_at":"2025-05-15T17:06:44.914Z","repository":{"id":34235890,"uuid":"38103069","full_name":"Va1/browser-sync-webpack-plugin","owner":"Va1","description":"Easily use BrowserSync in your Webpack project.","archived":false,"fork":false,"pushed_at":"2024-08-15T08:09:52.000Z","size":36,"stargazers_count":371,"open_issues_count":18,"forks_count":45,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-15T17:06:38.051Z","etag":null,"topics":["browsersync","dev-server","javascript","livereload","webpack","webpack-plugin","webpack2"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Va1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-26T09:36:15.000Z","updated_at":"2025-03-14T20:21:52.000Z","dependencies_parsed_at":"2024-08-15T14:04:07.233Z","dependency_job_id":null,"html_url":"https://github.com/Va1/browser-sync-webpack-plugin","commit_stats":{"total_commits":49,"total_committers":13,"mean_commits":3.769230769230769,"dds":0.5510204081632653,"last_synced_commit":"d57e35250c2a6f23eb6672545ab77e077a4c2eca"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Va1%2Fbrowser-sync-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Va1%2Fbrowser-sync-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Va1%2Fbrowser-sync-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Va1%2Fbrowser-sync-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Va1","download_url":"https://codeload.github.com/Va1/browser-sync-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254384988,"owners_count":22062422,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browsersync","dev-server","javascript","livereload","webpack","webpack-plugin","webpack2"],"created_at":"2024-09-24T13:53:43.724Z","updated_at":"2025-05-15T17:06:39.898Z","avatar_url":"https://github.com/Va1.png","language":"JavaScript","readme":"# [BrowserSync](https://browsersync.io/) plugin for [Webpack](https://webpack.js.org/)\n\nEasily use BrowserSync in your Webpack project.\n\n## Install:\n\n```bash\n$ npm install --save-dev browser-sync-webpack-plugin\n```\nor\n```bash\n$ yarn add --dev browser-sync-webpack-plugin\n```\n\nWith release of 2.0.0 the plugin is expected to be used in Node v4+ environment.\nSupport for Node v3 and lower was dropped, but you can install and use the plugin version of 1.2.0 in older environments.\n\n## Usage:\n\nBrowserSync will start only when you run Webpack in [watch mode](http://webpack.github.io/docs/tutorials/getting-started/#watch-mode):\n\n```bash\n$ webpack --watch\n```\n\n### Basic:\n\nIf you're not using Webpack Dev Server, you can make BrowserSync to serve your project.\nThe setup is pretty easy: just pass the [BrowserSync options](http://www.browsersync.io/docs/options/) to the plugin as the first argument.\n\nIn your `webpack.config.js`:\n\n```javascript\nconst BrowserSyncPlugin = require('browser-sync-webpack-plugin')\n\nmodule.exports = {\n  // ...\n  plugins: [\n    new BrowserSyncPlugin({\n      // browse to http://localhost:3000/ during development,\n      // ./public directory is being served\n      host: 'localhost',\n      port: 3000,\n      server: { baseDir: ['public'] }\n    })\n  ]\n}\n```\n\n### Advanced:\n\nThe advanced usage is about using [Webpack Dev Server](https://github.com/webpack/webpack-dev-server) with BrowserSync in order to use awesome features of both.\n\nTo achieve this, BrowserSync offers the [proxy](http://www.browsersync.io/docs/options/#option-proxy) option.\nSo, basically, you are about to proxy the output from the Webpack Dev Server through BrowserSync to get the best out of both.\n\nIn your `webpack.config.js`:\n\n```javascript\nconst BrowserSyncPlugin = require('browser-sync-webpack-plugin')\n\nmodule.exports = {\n  // ...\n  plugins: [\n    new BrowserSyncPlugin(\n      // BrowserSync options\n      {\n        // browse to http://localhost:3000/ during development\n        host: 'localhost',\n        port: 3000,\n        // proxy the Webpack Dev Server endpoint\n        // (which should be serving on http://localhost:3100/)\n        // through BrowserSync\n        proxy: 'http://localhost:3100/'\n      },\n      // plugin options\n      {\n        // prevent BrowserSync from reloading the page\n        // and let Webpack Dev Server take care of this\n        reload: false\n      }\n    )\n  ]\n}\n```\n\n---\n\nOther supported plugin options are:\n\n* `name` - default: `bs-webpack-plugin`, BrowserSync [instance name](http://www.browsersync.io/docs/api/#api-name)\n* `callback` - default: `undefined`, BrowserSync [instance init callback](http://www.browsersync.io/docs/api/#api-cb).\n* `injectCss` - default: `false`, allows BrowserSync to inject changes inplace instead of reloading the page when changed chunks are all CSS files\n\n## Contributing:\n\nFeel free to open issues to propose stuff and participate. Pull requests are also welcome.\n\n## Licence:\n\n[MIT](http://en.wikipedia.org/wiki/MIT_License)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fva1%2Fbrowser-sync-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fva1%2Fbrowser-sync-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fva1%2Fbrowser-sync-webpack-plugin/lists"}