alexisvincent / systemjs-hot-reloader

reloads your modules as needed so that you can have satisfyingly fast feedback loop when developing your app
MIT License
228 stars 36 forks source link

Example broken in FF #83

Closed npbenjohnson closed 7 years ago

npbenjohnson commented 8 years ago

this results in crazy errors on initial load in FF, but only when debugging with a breakpoint somewhere in the app.js tree. app.js cannot be loaded asyncronously along with hot reloader

if (location.origin.match(/localhost/)) { 
  System.trace = true
  System.import('capaj/systemjs-hot-reloader').then(function(HotReloader){
    new HotReloader.default('http://localhost:8090')  // chokidar-socket-emitter port
  })
}
System.import('./app.js')
capaj commented 8 years ago

@npbenjohnson can this be reproduced with jspm-react boilerplate project?

npbenjohnson commented 8 years ago

I should have mentioned the fix is just adjusting it to

if (location.origin.match(/localhost/)) { 
  System.trace = true
  System.import('capaj/systemjs-hot-reloader').then(function(HotReloader){
    new HotReloader.default('http://localhost:8090')  // chokidar-socket-emitter port
    return System.import('./app.js')
  })
}
alexisvincent commented 7 years ago

Closed since your fix is the way its suppose to be done :)