Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added hot reloading capabilities #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

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