Skip to content

Commit 6365af1

Browse files
committed
Update to latest BrowserSync config
1 parent 4d083d3 commit 6365af1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

generators/gulp/templates/gulpfile.babel.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import fs from 'fs';
1818
import parallelize from 'concurrent-transform';
1919
<% } -%>
2020
// BrowserSync is used to live-reload your website
21-
import browserSync from 'browser-sync';
21+
const browserSync = require('browser-sync').create();
2222
const reload = browserSync.reload;
2323
// AutoPrefixer
2424
import autoprefixer from 'autoprefixer';
@@ -251,12 +251,10 @@ gulp.task('lint', () =>
251251
// 'gulp serve' -- open up your website in your browser and watch for changes
252252
// in all your files and update them when needed
253253
gulp.task('serve', () => {
254-
browserSync({
254+
browserSync.init({
255255
// tunnel: true,
256256
// open: false,
257-
server: {
258-
baseDir: ['.tmp', 'dist']
259-
}
257+
server: ['.tmp', 'dist']
260258
});
261259

262260
// Watch various files for changes and do the needful

0 commit comments

Comments
 (0)