gulpgulp-livereload

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.


Solution

  • 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.