[astro-browser-sync] 🌎
Add BrowserSync in your Astro project.
This plugin supports Astro 2.0 and Above.
Usage
BrowserSync starts alongside your Astro Server. By default, it uses the proxy
mode of BrowserSync based on your Astro server options : no need to pass any options to make it work !
import { defineConfig } from "astro/config";
import BroswerSync from 'astro-browser-sync'
export default defineConfig({
integrations: [
BrowserSync(),
]
})
If you want to manage BrowserSync or override default behavior of this integration
, you can pass a bs
object with your BrowserSync options in it :
import { defineConfig } from "astro/config";
import broswerSync from 'astro-browser-sync'
export default defineConfig({
integrations: [
browserSync({
mode: 'proxy'
bs: {
port: 4000,
ui: { port: 4040 },
notify: false,
open: true,
},
}),
]
})
Changelog
See CHANGELOG.md for a history of changes to this integration.