require to import

exports are not working
This commit is contained in:
Stephan Hagedorn 2022-08-11 08:41:39 +02:00
parent f7a5481fd2
commit da075e5beb
7 changed files with 69 additions and 72 deletions

22
gulp/tasks/sync.mjs Normal file
View file

@ -0,0 +1,22 @@
import config from '../config.js';
// const browserSync = require('browser-sync'), server = browserSync.create();
import browserSync from 'browser-sync'
const server = browserSync.create();
// Automagically reload browsers
export function reload(done) {
server.reload;
done();
}
// Serve files to the browser
export function serve(done) {
server.init({
index: config.index,
open: false,
server: config.dev
});
done();
}