milankinen / livereactload

Live code editing with Browserify and React
MIT License
865 stars 61 forks source link

browserSync compatibility #37

Closed gilbarbara closed 9 years ago

gilbarbara commented 9 years ago

I got livereactload 0.4 to work with browserSync but since 0.5 isn't working at all. Is it possible?

milankinen commented 9 years ago

Hmmm. Can you give more details? Do you get any errors to the console?

I just tried your previous codes (https://github.com/geoRG77/react-hot-reload) with version 0.5.2 and it worked fine.

gilbarbara commented 9 years ago

hey!

No errors, I just get sending reload request to 0 clients And that's not my code.

I've added the transform to browserify with:

bundler = browserify({
    transform: watch ? [['livereactload', {global: true}], 'reactify'] : ['reactify']
});

and I'm starting it with:

if (watch) {
    lrload.monitor('.tmp/scripts/app.js', {displayNotification: true});
}

and in the index.html:

<!-- build:js({app,.tmp}) scripts/app.js -->
<script src="scripts/app.js"></script>
<!-- endbuild -->

Maybe I need to change the script path to something else?

milankinen commented 9 years ago

If you open JavaScript console from your browser, what is the value of window.__livereactload?

jakubwolny commented 9 years ago

I use livereactload with browserSync and I do not have any issues - I think this is not a bug but issue related with your setup.

gilbarbara commented 9 years ago

I will try again in the weekend with the new version and post it back