BrowserSync / browser-sync

Keep multiple browsers & devices in sync when building websites. https://browsersync.io
https://discord.gg/2d2xUThp
Apache License 2.0
12.19k stars 757 forks source link

When using import to import browser-sync, it can run without using create. Does this mean that create is not needed? #2068

Open aboutjquery opened 6 months ago

aboutjquery commented 6 months ago

Issue details

Browser-sync can run without using create. Does this mean that create is not needed?

Please provide issue details here.

In the official documentation create is included in each example, but I found that it can run correctly without it.

Steps to reproduce/test case

import browserSync from 'browser-sync';

gulp.task('browser-sync', function() {
    browserSync.init({
        server: {
            baseDir: "./"
        }
    });
});

Please provide necessary steps for reproduction of this issue, or better the reduced test case (without any external dependencies).

Please specify which version of Browsersync, node and npm you're running

Affected platforms

Browsersync use-case

If CLI, please paste the entire command below

{cli command here}

for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync

{Browsersync init code here}