Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gulp: How to implement livereload without Chrome's livereload plugin?

It looks like gulp-livereload requires Chrome's livereload plugin to work.

Is there a way to implement livereload that doesn't require any browser plugin, and will work in all browsers?

Any examples will be appreciated.

like image 974
Misha Moroshko Avatar asked Sep 26 '14 23:09

Misha Moroshko


1 Answers

How I've missed that.

You should add the livereload script in your index.html, and change the port to which you're currently using.

<script src="http://localhost:35729/livereload.js?snipver=1"></script>

You may want to inject this only on a development version, so I think you should have a look to gulp-inject to get this behaviour.

like image 190
Preview Avatar answered Oct 07 '22 00:10

Preview