You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I have found the issue regarding both packages: secondary entrypoint in the packages being imported from a third-party lib.
Both packages, beside the main module, exposes multiple submodules for ease of use, for instance : chart.js/auto - for automatic full import of everything in charts.js; data-fns/format - for direct access to the format function (data-fns seems to expose all it functions this way).
The workaround is to duplicate the sharing of the lib (one for the main module via the NF plugin and another for the problematic(s) submodule(s) manually).
I don't know if that is enough for you or if you will want to add some logic to the NF plugin to take these secondary entrypoints into account...
@vahidsamimi, the offending piece of code is not in the service that you posted but in a function from the date-fns-tz package that your using in your codebase.
The function (most likely culprit is formatInTimeZone, look around for the imports from date-fns-tz) is importing the format function from date-fns via the secondary entrypoint (in my case it was the PrimeNG chart component that imports charts.js/auto).
I added the following two packages as dependencies in the
package.json
fileHowever, when I run the remote app that uses these packages, I encounter the error
Below is the code where I define the
DateHelperService
, which I import into the remote app.and here is federation.config.js
The text was updated successfully, but these errors were encountered: