Skip to content

Instantly share code, notes, and snippets.

@chestozo
Created January 22, 2019 07:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chestozo/acd651382f9590988d4679f8dbb21d19 to your computer and use it in GitHub Desktop.
Save chestozo/acd651382f9590988d4679f8dbb21d19 to your computer and use it in GitHub Desktop.
// Part of manifest.js generated by webpack:
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.charset = 'utf-8';
script.async = true;
script.timeout = 120000;
script.crossOrigin = "anonymous";
if (__webpack_require__.nc) {
script.setAttribute("nonce", __webpack_require__.nc);
}
script.src = __webpack_require__.p + "_/" + chunkId + ".js";
var timeout = setTimeout(onScriptComplete, 120000);
script.onerror = script.onload = onScriptComplete;
function onScriptComplete() {
// avoid mem leaks in IE.
script.onerror = script.onload = null;
clearTimeout(timeout);
var chunk = installedChunks[chunkId];
if(chunk !== 0) {
if(chunk) {
chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));
}
installedChunks[chunkId] = undefined;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment