require to import
exports are not working
This commit is contained in:
parent
f7a5481fd2
commit
da075e5beb
7 changed files with 69 additions and 72 deletions
22
gulp/tasks/sync.mjs
Normal file
22
gulp/tasks/sync.mjs
Normal 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();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue