@module-federation/sdk 0.0.0-next-20240613022740 → 0.0.0-next-20240617024822

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 CHANGED
@@ -256,6 +256,12 @@ var parseEntry = function(str, devVerOrUrl) {
256
256
  // Check if the string starts with a type
257
257
  if (strSplit.length >= 2) {
258
258
  var _strSplit = _to_array(strSplit), name = _strSplit[0], versionOrEntryArr = _strSplit.slice(1);
259
+ if (str.startsWith(separator)) {
260
+ versionOrEntryArr = [
261
+ devVersionOrUrl || strSplit.slice(-1)[0]
262
+ ];
263
+ name = strSplit.slice(0, -1).join(separator);
264
+ }
259
265
  var versionOrEntry = devVersionOrUrl || versionOrEntryArr.join(separator);
260
266
  if (isEntry(versionOrEntry)) {
261
267
  return {
@@ -813,7 +819,8 @@ function createScript(info) {
813
819
  if (script) {
814
820
  if (name === 'async' || name === 'defer') {
815
821
  script[name] = attrs[name];
816
- } else {
822
+ // Attributes that do not exist are considered overridden
823
+ } else if (!script.getAttribute(name)) {
817
824
  script.setAttribute(name, attrs[name]);
818
825
  }
819
826
  }
@@ -882,7 +889,7 @@ function createLink(info) {
882
889
  var attrs = info.attrs;
883
890
  if (attrs) {
884
891
  Object.keys(attrs).forEach(function(name) {
885
- if (link) {
892
+ if (link && !link.getAttribute(name)) {
886
893
  link.setAttribute(name, attrs[name]);
887
894
  }
888
895
  });
package/dist/index.esm.js CHANGED
@@ -252,6 +252,12 @@ var parseEntry = function(str, devVerOrUrl) {
252
252
  // Check if the string starts with a type
253
253
  if (strSplit.length >= 2) {
254
254
  var _strSplit = _to_array(strSplit), name = _strSplit[0], versionOrEntryArr = _strSplit.slice(1);
255
+ if (str.startsWith(separator)) {
256
+ versionOrEntryArr = [
257
+ devVersionOrUrl || strSplit.slice(-1)[0]
258
+ ];
259
+ name = strSplit.slice(0, -1).join(separator);
260
+ }
255
261
  var versionOrEntry = devVersionOrUrl || versionOrEntryArr.join(separator);
256
262
  if (isEntry(versionOrEntry)) {
257
263
  return {
@@ -809,7 +815,8 @@ function createScript(info) {
809
815
  if (script) {
810
816
  if (name === 'async' || name === 'defer') {
811
817
  script[name] = attrs[name];
812
- } else {
818
+ // Attributes that do not exist are considered overridden
819
+ } else if (!script.getAttribute(name)) {
813
820
  script.setAttribute(name, attrs[name]);
814
821
  }
815
822
  }
@@ -878,7 +885,7 @@ function createLink(info) {
878
885
  var attrs = info.attrs;
879
886
  if (attrs) {
880
887
  Object.keys(attrs).forEach(function(name) {
881
- if (link) {
888
+ if (link && !link.getAttribute(name)) {
882
889
  link.setAttribute(name, attrs[name]);
883
890
  }
884
891
  });
@@ -82,6 +82,7 @@ export interface PluginManifestOptions {
82
82
  export interface PluginDevOptions {
83
83
  disableLiveReload?: boolean;
84
84
  disableHotTypesReload?: boolean;
85
+ disableDynamicRemoteTypeHints?: boolean;
85
86
  }
86
87
  export interface DtsHostOptions {
87
88
  typesFolder?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/sdk",
3
- "version": "0.0.0-next-20240613022740",
3
+ "version": "0.0.0-next-20240617024822",
4
4
  "license": "MIT",
5
5
  "description": "A sdk for support module federation",
6
6
  "keywords": [