seer-dynamic-component
Advanced tools
Comparing version 1.0.11 to 1.3.0
@@ -78,3 +78,5 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
_targetComp$packageHa = targetComp.packageHash, | ||
packageHash = _targetComp$packageHa === void 0 ? "" : _targetComp$packageHa; | ||
packageHash = _targetComp$packageHa === void 0 ? "" : _targetComp$packageHa, | ||
_targetComp$splitChun = targetComp.splitChunkName, | ||
splitChunkName = _targetComp$splitChun === void 0 ? '' : _targetComp$splitChun; | ||
var jsName = "".concat(packageName).concat(packageHash ? "." + packageHash : "", ".js"); | ||
@@ -87,20 +89,34 @@ window.seerConfig[key] = window.seerConfig[key] || {}; | ||
} else { | ||
window.System["import"]("".concat(relativePath + module, "/js/").concat(jsName)).then(function (res) { | ||
delete window["default"]; | ||
var importModule = function importModule() { | ||
window.System["import"]("".concat(relativePath + module, "/js/").concat(jsName)).then(function (res) { | ||
delete window["default"]; | ||
if (res && res["default"] && res["default"]["default"]) { | ||
window.seerConfig[key][module] = res["default"]["default"]; | ||
} else { | ||
window.seerConfig[key][module] = res["default"]; | ||
} | ||
if (res && res["default"] && res["default"]["default"]) { | ||
window.seerConfig[key][module] = res["default"]["default"]; | ||
} else { | ||
window.seerConfig[key][module] = res["default"]; | ||
} | ||
var comp = window.seerConfig[key][module][tranCompId]; | ||
resolve(comp); | ||
})["catch"](function (e) { | ||
delete window["default"]; | ||
console.warn(e); | ||
reject(); | ||
}); | ||
var comp = window.seerConfig[key][module][tranCompId]; | ||
resolve(comp); | ||
})["catch"](function (e) { | ||
delete window["default"]; | ||
console.warn(e); | ||
reject(); | ||
}); | ||
}; | ||
window.loadedSplitChunk = window.loadedSplitChunk || {}; | ||
if (splitChunkName && !window.loadedSplitChunk[splitChunkName]) { | ||
var chunkUrl = "".concat(relativePath + module, "/js/").concat(splitChunkName, ".chunk.js"); | ||
window.System["import"](chunkUrl).then(function () { | ||
window.loadedSplitChunk[splitChunkName] = 1; | ||
importModule(); | ||
}); | ||
} else { | ||
importModule(); | ||
} | ||
} | ||
}); | ||
}; |
{ | ||
"name": "seer-dynamic-component", | ||
"version": "1.0.11", | ||
"version": "1.3.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
16666
287