alexisvincent/systemjs-hot-reloader

Importers not initialized when ES6 transpilation is disabled

mpfau opened this issue · 1 comments

mpfau commented

I noted, that the importers (in System.loads) are only initialized for the modules that are loaded before my initial System.import, when ES6 transpilation is disabled as follows:

        System.babelOptions = {
            es2015: false
        }

As a workaround, you can invoke pushImporters after importing your initial module:

            return System.import('test/gui/playground.js').then(function() {
                // we need to pushImporters if we disable es6 transpilation
                System.hotReloader.pushImporters(System.loads, true)
            })

It looks like pushImporters is called to early (constructor of HotReloader)

Fixed in systemjs-hmr I think