@module-federation/sdk 0.0.0-feat-node-support-1702930274548 → 0.0.0-feat-node-support-1703050615268
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +7 -8
- package/index.esm.js +7 -8
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -934,13 +934,14 @@ function _ts_generator(thisArg, body) {
|
|
|
934
934
|
}
|
|
935
935
|
function importNodeModule(name1) {
|
|
936
936
|
if (!name1) {
|
|
937
|
-
throw new Error("import specifier is
|
|
937
|
+
throw new Error("import specifier is required");
|
|
938
938
|
}
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
939
|
+
var importModule1 = new Function("name", "return import(name)");
|
|
940
|
+
return importModule1(name1).then(function(res1) {
|
|
941
|
+
return res1.default;
|
|
942
|
+
}).catch(function(error1) {
|
|
943
|
+
console.error("Error importing module ".concat(name1, ":"), error1);
|
|
944
|
+
throw error1;
|
|
944
945
|
});
|
|
945
946
|
}
|
|
946
947
|
function createScriptNode(url, cb, attrs, createScriptHook) {
|
|
@@ -1065,8 +1066,6 @@ function loadScriptNode(url1, info1) {
|
|
|
1065
1066
|
reject1(error1);
|
|
1066
1067
|
} else {
|
|
1067
1068
|
var _info_attrs, _info_attrs1;
|
|
1068
|
-
// Handle the loaded script context as needed
|
|
1069
|
-
console.log("Script loaded successfully:", scriptContext1);
|
|
1070
1069
|
var remoteEntryKey1 = (info1 === null || info1 === void 0 ? void 0 : (_info_attrs = info1.attrs) === null || _info_attrs === void 0 ? void 0 : _info_attrs["globalName"]) || "__FEDERATION_".concat(info1 === null || info1 === void 0 ? void 0 : (_info_attrs1 = info1.attrs) === null || _info_attrs1 === void 0 ? void 0 : _info_attrs1["name"], ":custom__");
|
|
1071
1070
|
var entryExports1 = globalThis[remoteEntryKey1] = scriptContext1;
|
|
1072
1071
|
resolve1(entryExports1);
|
package/index.esm.js
CHANGED
|
@@ -930,13 +930,14 @@ function _ts_generator(thisArg, body) {
|
|
|
930
930
|
}
|
|
931
931
|
function importNodeModule(name1) {
|
|
932
932
|
if (!name1) {
|
|
933
|
-
throw new Error("import specifier is
|
|
933
|
+
throw new Error("import specifier is required");
|
|
934
934
|
}
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
935
|
+
var importModule1 = new Function("name", "return import(name)");
|
|
936
|
+
return importModule1(name1).then(function(res1) {
|
|
937
|
+
return res1.default;
|
|
938
|
+
}).catch(function(error1) {
|
|
939
|
+
console.error("Error importing module ".concat(name1, ":"), error1);
|
|
940
|
+
throw error1;
|
|
940
941
|
});
|
|
941
942
|
}
|
|
942
943
|
function createScriptNode(url, cb, attrs, createScriptHook) {
|
|
@@ -1061,8 +1062,6 @@ function loadScriptNode(url1, info1) {
|
|
|
1061
1062
|
reject1(error1);
|
|
1062
1063
|
} else {
|
|
1063
1064
|
var _info_attrs, _info_attrs1;
|
|
1064
|
-
// Handle the loaded script context as needed
|
|
1065
|
-
console.log("Script loaded successfully:", scriptContext1);
|
|
1066
1065
|
var remoteEntryKey1 = (info1 === null || info1 === void 0 ? void 0 : (_info_attrs = info1.attrs) === null || _info_attrs === void 0 ? void 0 : _info_attrs["globalName"]) || "__FEDERATION_".concat(info1 === null || info1 === void 0 ? void 0 : (_info_attrs1 = info1.attrs) === null || _info_attrs1 === void 0 ? void 0 : _info_attrs1["name"], ":custom__");
|
|
1067
1066
|
var entryExports1 = globalThis[remoteEntryKey1] = scriptContext1;
|
|
1068
1067
|
resolve1(entryExports1);
|