Answer the question
In order to leave comments, you need to log in
BrowserSync doesn't work offline, but XAMPP and WP work, why?
Hello!
Given:
127.0.0.1 test.loc
<VirtualHost *:80>
DocumentRoot "F:/xampp/htdocs/projects/test.loc/www"
ServerName test.loc
<Directory />
Options Indexes FollowSymLinks Includes ExecCGI
DirectoryIndex index.php index.html
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
var gulp = require('gulp'),
browserSync = require('browser-sync'),
reload = browserSync.reload;
var path = {
watch : {
php : '*.php'
}
};
gulp.task('sync', function(done) {
browserSync({
proxy: 'dev.loc',
open : false,
online : false,
});
done();
});
gulp.task('php', function(done){
reload();
done();
});
gulp.task('watch', function() {
gulp.watch(path.watch.php, gulp.parallel('php'));
});
gulp.task('default', gulp.parallel('sync', 'watch'));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question