Log status of fallback loading
Helps debugging, and also keeps Karma happen if loading is slow.
This commit is contained in:
parent
ebb1e921bf
commit
dc1f75bbb5
|
|
@ -1442,6 +1442,9 @@
|
|||
}
|
||||
// otherwise we fetch
|
||||
else {
|
||||
if (window.console) {
|
||||
window.console.log('Loading ' + key + '...');
|
||||
}
|
||||
xhrFetch(key, resolve, reject);
|
||||
}
|
||||
})
|
||||
|
|
@ -1456,6 +1459,9 @@
|
|||
}
|
||||
}
|
||||
return new Promise(function (resolve, reject) {
|
||||
if (window.console) {
|
||||
window.console.log('Transpiling ' + key + '...');
|
||||
}
|
||||
promiseMap.set(key, {resolve: resolve, reject: reject});
|
||||
babelWorker.postMessage({key: key, source: source});
|
||||
});
|
||||
|
|
@ -1470,6 +1476,9 @@
|
|||
window.console.warn('Unable to cache transpiled version of ' + key + ': ' + e);
|
||||
}
|
||||
}
|
||||
if (window.console) {
|
||||
window.console.log('Loaded ' + key);
|
||||
}
|
||||
(0, eval)(data.code + '\n//# sourceURL=' + data.key + '!transpiled');
|
||||
processAnonRegister();
|
||||
});
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -243,6 +243,9 @@ BrowserESModuleLoader.prototype[RegisterLoader.instantiate] = function(key, proc
|
|||
}
|
||||
// otherwise we fetch
|
||||
else {
|
||||
if (window.console) {
|
||||
window.console.log('Loading ' + key + '...');
|
||||
}
|
||||
xhrFetch(key, resolve, reject);
|
||||
}
|
||||
})
|
||||
|
|
@ -257,6 +260,9 @@ BrowserESModuleLoader.prototype[RegisterLoader.instantiate] = function(key, proc
|
|||
}
|
||||
}
|
||||
return new Promise(function (resolve, reject) {
|
||||
if (window.console) {
|
||||
window.console.log('Transpiling ' + key + '...');
|
||||
}
|
||||
promiseMap.set(key, {resolve: resolve, reject: reject});
|
||||
babelWorker.postMessage({key: key, source: source});
|
||||
});
|
||||
|
|
@ -271,6 +277,9 @@ BrowserESModuleLoader.prototype[RegisterLoader.instantiate] = function(key, proc
|
|||
window.console.warn('Unable to cache transpiled version of ' + key + ': ' + e);
|
||||
}
|
||||
}
|
||||
if (window.console) {
|
||||
window.console.log('Loaded ' + key);
|
||||
}
|
||||
(0, eval)(data.code + '\n//# sourceURL=' + data.key + '!transpiled');
|
||||
processAnonRegister();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue