{"id":18074880,"url":"https://github.com/robinloeffel/esbuild-plugin-browser-sync","last_synced_at":"2025-04-05T18:49:44.661Z","repository":{"id":183444755,"uuid":"618888670","full_name":"robinloeffel/esbuild-plugin-browser-sync","owner":"robinloeffel","description":"easily integrate browser-sync into your esbuild development flow 🌊 ","archived":false,"fork":false,"pushed_at":"2023-03-25T17:50:23.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T18:13:23.333Z","etag":null,"topics":["browser-sync","browsersync","esbuild","esbuild-plugin"],"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/robinloeffel.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"license","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":"2023-03-25T16:37:36.000Z","updated_at":"2023-03-25T18:27:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"652c7efe-a19e-4566-b511-899946f5125e","html_url":"https://github.com/robinloeffel/esbuild-plugin-browser-sync","commit_stats":null,"previous_names":["robinloeffel/esbuild-plugin-browser-sync"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinloeffel%2Fesbuild-plugin-browser-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinloeffel%2Fesbuild-plugin-browser-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinloeffel%2Fesbuild-plugin-browser-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinloeffel%2Fesbuild-plugin-browser-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robinloeffel","download_url":"https://codeload.github.com/robinloeffel/esbuild-plugin-browser-sync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247385704,"owners_count":20930600,"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":["browser-sync","browsersync","esbuild","esbuild-plugin"],"created_at":"2024-10-31T10:23:40.618Z","updated_at":"2025-04-05T18:49:44.629Z","avatar_url":"https://github.com/robinloeffel.png","language":"JavaScript","readme":"# @rbnlffl/esbuild-plugin-browser-sync\n\n[![latest version on npm](https://img.shields.io/npm/v/@rbnlffl/esbuild-plugin-browser-sync)](https://www.npmjs.com/package/@rbnlffl/esbuild-plugin-browser-sync)\n[![npm downloads a month](https://img.shields.io/npm/dm/@rbnlffl/esbuild-plugin-browser-sync)](https://www.npmjs.com/package/@rbnlffl/esbuild-plugin-browser-sync)\n[![browser-sync dep](https://img.shields.io/npm/dependency-version/@rbnlffl/esbuild-plugin-browser-sync/browser-sync)](https://github.com/BrowserSync/browser-sync)\n[![required node version](https://img.shields.io/node/v/@rbnlffl/esbuild-plugin-browser-sync)](https://github.com/nodejs/Release)\n[![package license](https://img.shields.io/npm/l/@rbnlffl/esbuild-plugin-browser-sync)](license)\n\n\u003e easily integrate [`browser-sync`](https://github.com/BrowserSync/browser-sync) into your [`esbuild`](https://github.com/esbuild/esbuild) development flow 🌊\n\n## install\n\n```bash\nyarn install --dev @rbnlffl/esbuild-plugin-browser-sync\n```\n\n## use\n\n```typescript\nimport esbuild from \"esbuild\";\nimport browserSync from \"@rbnlffl/esbuild-plugin-browser-sync\";\n\nconst context = await esbuild.context({\n  /* esbuild config */\n  plugins: [\n    browserSync({ /* options */ })\n  ]\n});\ncontext.watch();\n```\n\n## config\n\nall of the supplied configuration options get directly forwarded to `browser-sync`. you can find the official docs here: https://browsersync.io/docs/options\n\n## caveats\n\nsince `esbuild` doesn't expose to its plugins whether it's in watch mode or not, whenever you include this bad boy, it will spin up a brand new `browser-sync` session for you. even if you just once call `esbuild.build`. so be mindful of that.\n\nfurthermore, if you are in `esbuild`'s watch mode, and you've configured `browser-sync` to watch certain files, as well, make sure there are no overlaps in your [`files`](https://browsersync.io/docs/options#option-files) prop and the actual sources you're piping to `esbuild`. the plugin will automatically trigger a [`reload`](https://browsersync.io/docs/api#api-reload) every time one of the source files that `esbuild` knows of, change. this may otherwise lead to multiple reloads, and unnecessary work for your cpu.\n\nthe best way to use this plugin is to have `esbuild` take care of watching the source files, and instruct `browser-sync` to watch assets that are outside of what you process via esbuild, like html files, an svg sprite, images, and so on. this allows you to have a smooth and very performant dx for web pages.\n\n## license\n\n[mit](license)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinloeffel%2Fesbuild-plugin-browser-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobinloeffel%2Fesbuild-plugin-browser-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinloeffel%2Fesbuild-plugin-browser-sync/lists"}