Skip to content

Conversation

@mpfau
Copy link

@mpfau mpfau commented Jan 7, 2016

Hi there,
I just added hot reloading capabilities to this plugin (see https://github.com/capaj/systemjs-hot-reloader).
Precondition is, that you wait for the initialization of the hot reloader and that the hot reloader is present at System.hotReloader.

Therefore, the bootstrapping should look like:

var bootstrap = Promise.resolve()
if (location.origin.match(/localhost/)) {
    System.trace = true
    bootstrap = System.import('capaj/systemjs-hot-reloader').then(function(HotReloader){
        System.hotReloader = new HotReloader.default('http://localhost:9080')  // chokidar-socket-emitter port
    })
}
bootstrap.then(function() {
    return System.import('src/app.js')
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant