Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable LiveReload with Yeoman

When testing in IE8, LiveReload throws errors since web sockets is not supported. Is there a way to configure yeoman to disable LiveReload?

like image 843
brewster Avatar asked Oct 10 '12 23:10

brewster


3 Answers

IE8 isn't supported by Yeoman, for good reason.

However, you could do what Allan describes, or you could override the server task, by putting this in your Gruntfile:

grunt.registerTask('server', 'yeoman-server');
like image 119
Sindre Sorhus Avatar answered Sep 21 '22 01:09

Sindre Sorhus


Try to use <!--[if !IE]><!--></body><!--<![endif]--><!--[if IE]></body><!--<![endif]--> instead of </body>.

Generator would try to replace first </body> element and add livereload snippet before it, so code would be placed in invisible for IE space.

P.S. It`s dirty hack so use this carefuly

like image 30
DKard Avatar answered Sep 20 '22 01:09

DKard


Put this in your Gruntfile:

grunt.registerHelper('reload:inject', function () {
  return function inject(req, res, next) {
      return next();
  }});
like image 30
mloar Avatar answered Sep 22 '22 01:09

mloar