@module-federation/sdk 0.0.0-next-20240612203225 → 0.0.0-next-20240613063612
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/dist/index.cjs.js +7 -16
- package/dist/index.esm.js +7 -16
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -813,7 +813,8 @@ function createScript(info) {
|
|
|
813
813
|
if (script) {
|
|
814
814
|
if (name === 'async' || name === 'defer') {
|
|
815
815
|
script[name] = attrs[name];
|
|
816
|
-
|
|
816
|
+
// Attributes that do not exist are considered overridden
|
|
817
|
+
} else if (!script.getAttribute(name)) {
|
|
817
818
|
script.setAttribute(name, attrs[name]);
|
|
818
819
|
}
|
|
819
820
|
}
|
|
@@ -882,7 +883,7 @@ function createLink(info) {
|
|
|
882
883
|
var attrs = info.attrs;
|
|
883
884
|
if (attrs) {
|
|
884
885
|
Object.keys(attrs).forEach(function(name) {
|
|
885
|
-
if (link) {
|
|
886
|
+
if (link && !link.getAttribute(name)) {
|
|
886
887
|
link.setAttribute(name, attrs[name]);
|
|
887
888
|
}
|
|
888
889
|
});
|
|
@@ -1140,37 +1141,27 @@ function createScriptNode(url, cb, attrs, createScriptHook) {
|
|
|
1140
1141
|
return _ts_generator(this, function(_state) {
|
|
1141
1142
|
switch(_state.label){
|
|
1142
1143
|
case 0:
|
|
1143
|
-
if (!(typeof globalThis['webpackChunkLoad'] !== 'undefined')) return [
|
|
1144
|
-
3,
|
|
1145
|
-
1
|
|
1146
|
-
];
|
|
1147
|
-
//@ts-ignore
|
|
1148
|
-
return [
|
|
1149
|
-
2,
|
|
1150
|
-
globalThis['webpackChunkLoad']
|
|
1151
|
-
];
|
|
1152
|
-
case 1:
|
|
1153
1144
|
if (!(typeof fetch === 'undefined')) return [
|
|
1154
1145
|
3,
|
|
1155
|
-
|
|
1146
|
+
2
|
|
1156
1147
|
];
|
|
1157
1148
|
return [
|
|
1158
1149
|
4,
|
|
1159
1150
|
importNodeModule('node-fetch')
|
|
1160
1151
|
];
|
|
1161
|
-
case
|
|
1152
|
+
case 1:
|
|
1162
1153
|
fetchModule = _state.sent();
|
|
1163
1154
|
//@ts-ignore
|
|
1164
1155
|
return [
|
|
1165
1156
|
2,
|
|
1166
1157
|
(fetchModule === null || fetchModule === void 0 ? void 0 : fetchModule.default) || fetchModule
|
|
1167
1158
|
];
|
|
1168
|
-
case
|
|
1159
|
+
case 2:
|
|
1169
1160
|
return [
|
|
1170
1161
|
2,
|
|
1171
1162
|
fetch
|
|
1172
1163
|
];
|
|
1173
|
-
case
|
|
1164
|
+
case 3:
|
|
1174
1165
|
return [
|
|
1175
1166
|
2
|
|
1176
1167
|
];
|
package/dist/index.esm.js
CHANGED
|
@@ -809,7 +809,8 @@ function createScript(info) {
|
|
|
809
809
|
if (script) {
|
|
810
810
|
if (name === 'async' || name === 'defer') {
|
|
811
811
|
script[name] = attrs[name];
|
|
812
|
-
|
|
812
|
+
// Attributes that do not exist are considered overridden
|
|
813
|
+
} else if (!script.getAttribute(name)) {
|
|
813
814
|
script.setAttribute(name, attrs[name]);
|
|
814
815
|
}
|
|
815
816
|
}
|
|
@@ -878,7 +879,7 @@ function createLink(info) {
|
|
|
878
879
|
var attrs = info.attrs;
|
|
879
880
|
if (attrs) {
|
|
880
881
|
Object.keys(attrs).forEach(function(name) {
|
|
881
|
-
if (link) {
|
|
882
|
+
if (link && !link.getAttribute(name)) {
|
|
882
883
|
link.setAttribute(name, attrs[name]);
|
|
883
884
|
}
|
|
884
885
|
});
|
|
@@ -1136,37 +1137,27 @@ function createScriptNode(url, cb, attrs, createScriptHook) {
|
|
|
1136
1137
|
return _ts_generator(this, function(_state) {
|
|
1137
1138
|
switch(_state.label){
|
|
1138
1139
|
case 0:
|
|
1139
|
-
if (!(typeof globalThis['webpackChunkLoad'] !== 'undefined')) return [
|
|
1140
|
-
3,
|
|
1141
|
-
1
|
|
1142
|
-
];
|
|
1143
|
-
//@ts-ignore
|
|
1144
|
-
return [
|
|
1145
|
-
2,
|
|
1146
|
-
globalThis['webpackChunkLoad']
|
|
1147
|
-
];
|
|
1148
|
-
case 1:
|
|
1149
1140
|
if (!(typeof fetch === 'undefined')) return [
|
|
1150
1141
|
3,
|
|
1151
|
-
|
|
1142
|
+
2
|
|
1152
1143
|
];
|
|
1153
1144
|
return [
|
|
1154
1145
|
4,
|
|
1155
1146
|
importNodeModule('node-fetch')
|
|
1156
1147
|
];
|
|
1157
|
-
case
|
|
1148
|
+
case 1:
|
|
1158
1149
|
fetchModule = _state.sent();
|
|
1159
1150
|
//@ts-ignore
|
|
1160
1151
|
return [
|
|
1161
1152
|
2,
|
|
1162
1153
|
(fetchModule === null || fetchModule === void 0 ? void 0 : fetchModule.default) || fetchModule
|
|
1163
1154
|
];
|
|
1164
|
-
case
|
|
1155
|
+
case 2:
|
|
1165
1156
|
return [
|
|
1166
1157
|
2,
|
|
1167
1158
|
fetch
|
|
1168
1159
|
];
|
|
1169
|
-
case
|
|
1160
|
+
case 3:
|
|
1170
1161
|
return [
|
|
1171
1162
|
2
|
|
1172
1163
|
];
|