Skip to content

Custom BrowserSync Options

Posted on: Feb 25, 2021 by Stephanie Eckles
🍿 1 min. read

Learn how to open the browser when Eleventy is served by BrowserSync.

#Including Opening a Browser on Launch

By default, Eleventy has the BrowserSync option to open a browser set to false.

Fortunately, it also provides a way to override the BrowserSync settings, so we can allow opening a browser with the following:

eleventyConfig.setBrowserSyncConfig({
open: true,
});

If you use VSCode, you may also be interested in creating a launch task to enable running your Eleventy start command when you open your project.

Review the official 11ty docs on BrowserSync for more info.

View more config samples