79435642

Date: 2025-02-13 09:27:10
Score: 2
Natty:
Report link

I have a similar setup: a host and a remote with native federation. both are using ngx-translate and are working fine.

But when the remote is displayed inside the host, it reuses the language files like en.json from the host because all the ngx-translate files are acting as singletons, even when I set everything to singleton: false:

...shareAll({singleton: false, strictVersion: true, requiredVersion: 'auto'})

generally, native federation seems to ignore all parameters of the shareAll(), even if they show up correctly in the remoteEntry.json.

I also tried to add ngx-translate to the skip list, hoping it would stop the singleton behavior but it did not help either

skip: [
    (p) => p.startsWith('@ngx-translate')
]

Any idea how to prevent singltonism on libraries?

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: stephan